add enter open all

This commit is contained in:
jonathan.wyss
2025-10-20 10:24:39 +02:00
parent 59e97021cf
commit eb9694d359
3 changed files with 66 additions and 21 deletions

View File

@@ -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>")