add enter open all
This commit is contained in:
@@ -41,13 +41,38 @@ vim.keymap.set('v','<leader>di', '<Plug>VimspectorBalloonEval')
|
||||
|
||||
|
||||
|
||||
local select_one_or_multi = function(prompt_bufnr)
|
||||
local picker = require('telescope.actions.state').get_current_picker(prompt_bufnr)
|
||||
local multi = picker:get_multi_selection()
|
||||
if not vim.tbl_isempty(multi) then
|
||||
require('telescope.actions').close(prompt_bufnr)
|
||||
for _, j in pairs(multi) do
|
||||
if j.path ~= nil then
|
||||
vim.cmd(string.format('%s %s', 'edit', j.path))
|
||||
end
|
||||
end
|
||||
else
|
||||
require('telescope.actions').select_default(prompt_bufnr)
|
||||
end
|
||||
end
|
||||
|
||||
local telescope = require('telescope')
|
||||
telescope.setup {
|
||||
pickers = {
|
||||
find_files = {
|
||||
hidden = true
|
||||
}
|
||||
}
|
||||
},
|
||||
defaults = {
|
||||
file_ignore_patterns = {
|
||||
"node_modules","%.class","bin/main/","bin/test/","bin/generated-sources/",
|
||||
},
|
||||
mappings= {
|
||||
i = {
|
||||
['<CR>'] = select_one_or_multi,
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
vim.cmd("autocmd FileType python map <buffer> <F9> :w<CR>:exec '!python' shellescape(@%, 1)<CR>")
|
||||
|
||||
Reference in New Issue
Block a user