fixed nixvim

This commit is contained in:
fwastring 2026-04-04 19:31:04 +02:00
parent d2985c8461
commit 755a563d5c
2 changed files with 95 additions and 1 deletions

View file

@ -63,7 +63,7 @@ with lib;
{
mode = "n";
key = "<leader>f";
action = "<cmd>Telescope find_files<CR>";
action = "<cmd>Telescope find_files hidden=true<CR>";
}
{
mode = "n";
@ -287,6 +287,7 @@ with lib;
settings = {
default_file_explorer = true;
columns = [ "icon" ];
view_options.show_hidden = true;
win_options = {
wrap = false;
signcolumn = "no";
@ -307,6 +308,98 @@ with lib;
enable = true;
settings = {
defaults = {
mappings = {
i = {
"<CR>" = {
__raw = ''
function(prompt_bufnr)
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local picker = action_state.get_current_picker(prompt_bufnr)
local selections = picker:get_multi_selection()
if vim.tbl_isempty(selections) then
actions.select_default(prompt_bufnr)
return
end
local current = action_state.get_selected_entry()
actions.close(prompt_bufnr)
local seen = {}
local first = true
local function open_entry(entry)
local path = entry and (entry.path or entry.filename or entry.value)
if not path or seen[path] then
return
end
seen[path] = true
local escaped = vim.fn.fnameescape(path)
if first then
vim.cmd("edit " .. escaped)
first = false
else
vim.cmd("tabedit " .. escaped)
end
end
open_entry(current)
for _, entry in ipairs(selections) do
open_entry(entry)
end
end
'';
};
};
n = {
"<CR>" = {
__raw = ''
function(prompt_bufnr)
local actions = require("telescope.actions")
local action_state = require("telescope.actions.state")
local picker = action_state.get_current_picker(prompt_bufnr)
local selections = picker:get_multi_selection()
if vim.tbl_isempty(selections) then
actions.select_default(prompt_bufnr)
return
end
local current = action_state.get_selected_entry()
actions.close(prompt_bufnr)
local seen = {}
local first = true
local function open_entry(entry)
local path = entry and (entry.path or entry.filename or entry.value)
if not path or seen[path] then
return
end
seen[path] = true
local escaped = vim.fn.fnameescape(path)
if first then
vim.cmd("edit " .. escaped)
first = false
else
vim.cmd("tabedit " .. escaped)
end
end
open_entry(current)
for _, entry in ipairs(selections) do
open_entry(entry)
end
end
'';
};
};
};
vimgrep_arguments = [
"rg"
"--color=never"