From 15ed06def179dc8360f242fcfdcaecfae8770d85 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Tue, 11 Mar 2025 12:33:32 +0800 Subject: [PATCH] feat: install conform-nvim --- users/modules/programs/nixvim.nix | 14 ++++++++++++++ users/modules/programs/nixvim/conform-nvim.nix | 5 +++++ users/modules/programs/nixvim/nvim-tree.nix | 3 +++ 3 files changed, 22 insertions(+) create mode 100644 users/modules/programs/nixvim/conform-nvim.nix diff --git a/users/modules/programs/nixvim.nix b/users/modules/programs/nixvim.nix index 61bbe53..d93461b 100644 --- a/users/modules/programs/nixvim.nix +++ b/users/modules/programs/nixvim.nix @@ -7,6 +7,7 @@ ./nixvim/treesitter-context.nix # context line ./nixvim/treesitter.nix # syntax highlighting ./nixvim/which-key.nix # show keybind hints + ./nixvim/conform-nvim.nix # formatter ]; programs.nixvim = { enable = true; @@ -43,6 +44,19 @@ backspace = "indent,eol,start"; }; + keymaps = [ + { + # make gf create the file if it doesnt exist + # cd to the working directory to handle relative file paths + key = "gf"; + action = ":cd %:p:h:e "; + options = { + silent = true; + }; + } +]; + + clipboard.providers.wl-copy.enable = true; }; } diff --git a/users/modules/programs/nixvim/conform-nvim.nix b/users/modules/programs/nixvim/conform-nvim.nix new file mode 100644 index 0000000..f512fc6 --- /dev/null +++ b/users/modules/programs/nixvim/conform-nvim.nix @@ -0,0 +1,5 @@ +{ + programs.nixvim.plugins.conform-nvim = { + enable = true; + }; +} diff --git a/users/modules/programs/nixvim/nvim-tree.nix b/users/modules/programs/nixvim/nvim-tree.nix index 4829d00..c2e752e 100644 --- a/users/modules/programs/nixvim/nvim-tree.nix +++ b/users/modules/programs/nixvim/nvim-tree.nix @@ -5,6 +5,9 @@ mode = "n"; key = "t"; action = ":NvimTreeToggle"; + options = { + silent = true; + }; } ]; plugins = {