diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-05-24 23:01:51 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-05-24 23:01:51 +0200 |
| commit | 6654d77d54c4e6addff00d48e35dce4e9a071b59 (patch) | |
| tree | e282490da92e37142006f242aa876a533a23a55a | |
| parent | f0ad704dec96c888a258fb53a907512535d2bda8 (diff) | |
| download | dotfiles-6654d77d54c4e6addff00d48e35dce4e9a071b59.tar.gz dotfiles-6654d77d54c4e6addff00d48e35dce4e9a071b59.zip | |
Disabled/commented out startup out of possibility it's resetting my CWD
| -rw-r--r-- | lua/plugins/telescope.lua | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 6e8745c..4428a02 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -411,37 +411,37 @@ local with_title = function(opts, extra) }, extra or {}) end ---vim.api.nvim_create_augroup('startup', { clear = true }) ---vim.api.nvim_command('augroup startup') ---vim.api.nvim_command('autocmd!') ---vim.api.nvim_command('autocmd VimEnter * lua require("plugins/telescope").startup()') ---vim.api.nvim_command('augroup END') - - -local startup = function() - -- Open file browser if argument is a folder - local arg = vim.api.nvim_eval('argv(0)') - if arg and (vim.fn.isdirectory(arg) ~= 0 or arg == "") then - vim.defer_fn(function() - require('telescope.builtin').find_files(with_title(dropdown)) --- require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ --- hidden = true, --- results_title = '', --- layout_config = { prompt_position = 'top' }, --- })) - end, 10) - end -end - - - --- Define the custom command startup/findhere -vim.cmd('command! Startup lua require("plugins.telescope").startup()') -vim.cmd('command! Findhere lua require("plugins.telescope").startup()') - ---vim.api.nvim_command('autocmd VimEnter * lua require("plugins/telescope").startup()') - --- Merge the existing M table with the startup function table -M = vim.tbl_extend('force', M, { startup = startup }) +----vim.api.nvim_create_augroup('startup', { clear = true }) +----vim.api.nvim_command('augroup startup') +----vim.api.nvim_command('autocmd!') +----vim.api.nvim_command('autocmd VimEnter * lua require("plugins/telescope").startup()') +----vim.api.nvim_command('augroup END') +-- +-- +--local startup = function() +-- -- Open file browser if argument is a folder +-- local arg = vim.api.nvim_eval('argv(0)') +-- if arg and (vim.fn.isdirectory(arg) ~= 0 or arg == "") then +-- vim.defer_fn(function() +-- require('telescope.builtin').find_files(with_title(dropdown)) +---- require'telescope.builtin'.find_files(require('telescope.themes').get_dropdown({ +---- hidden = true, +---- results_title = '', +---- layout_config = { prompt_position = 'top' }, +---- })) +-- end, 10) +-- end +--end +-- +-- +-- +---- Define the custom command startup/findhere +--vim.cmd('command! Startup lua require("plugins.telescope").startup()') +--vim.cmd('command! Findhere lua require("plugins.telescope").startup()') +-- +----vim.api.nvim_command('autocmd VimEnter * lua require("plugins/telescope").startup()') +-- +---- Merge the existing M table with the startup function table +--M = vim.tbl_extend('force', M, { startup = startup }) return M |
