From 755a563d5c671fabd740fca227baf0c038758654 Mon Sep 17 00:00:00 2001 From: fwastring Date: Sat, 4 Apr 2026 19:31:04 +0200 Subject: [PATCH] fixed nixvim --- moduler/dev.nix | 1 + moduler/programs/nixvim/default.nix | 95 ++++++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/moduler/dev.nix b/moduler/dev.nix index 2eb48df..0d40a41 100644 --- a/moduler/dev.nix +++ b/moduler/dev.nix @@ -16,6 +16,7 @@ in minio-client opentofu python3 + dive (azPkgs.azure-cli.withExtensions ( with azPkgs.azure-cli.extensions; [ diff --git a/moduler/programs/nixvim/default.nix b/moduler/programs/nixvim/default.nix index 26c791c..a4c9bf5 100644 --- a/moduler/programs/nixvim/default.nix +++ b/moduler/programs/nixvim/default.nix @@ -63,7 +63,7 @@ with lib; { mode = "n"; key = "f"; - action = "Telescope find_files"; + action = "Telescope find_files hidden=true"; } { 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 = { + "" = { + __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 = { + "" = { + __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"