-
Hi, I'm new to nvim and nixos but as I know telescope can open multiple files at once without any additional setup, right? When I press TAB I can see select icon but when I press That's my config telescope = {
enable = true;
setupOpts = {
defaults = {
pickers = {
find_command = ["\${pkgs.fzf}/bin/fzf"];
};
};
};
mappings = {
buffers = "<leader>fo";
diagnostics = "<leader>fdi";
lspDefinitions = "<leader>fd";
lspDocumentSymbols = "<leader>fs";
};
}; I tried change fzf to fd but it's does not help. For example in that case telescope will open only "animations.conf" file. I tried run [Updated] It looks like the telescope is not behaving as I expected. So I found this implementation from telescope issue #1048 which should do what I want, but how do I implement it through NVF? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There are multiple ways you can approach this, but I'd use {
vim.telescope.setupOpts = {
defaults.mappings.i."<CR>" = lib.mkLuaInline ''
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
'';
};
} Alternatively you can also use |
Beta Was this translation helpful? Give feedback.
There are multiple ways you can approach this, but I'd use
mkLuaInline
and setupOpts.