authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-08-22 00:48:01-07:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2025-08-22 00:48:01-07:00
logcb1d7ea523fa7624165ef4da88961e12e886f456
tree2717ea30b986b16f727e8504791d27c129475884
parent7b97d1ab8ad001e52d974efd263bb70b469a5b73

fix: completions menu

closes #7

5 files changed, 55 insertions(+), 50 deletions(-)

lib/mkNeovim.nix+14-12
...@@ -10,16 +10,18 @@ let...@@ -10,16 +10,18 @@ let
1010
11 userDir = ../users + "/${user}";11 userDir = ../users + "/${user}";
12 userConfig = import (userDir + "/user.nix");12 userConfig = import (userDir + "/user.nix");
13in13
14(inputs.nvf.lib.neovimConfiguration {14 config = inputs.nvf.lib.neovimConfiguration {
15 inherit pkgs;15 inherit pkgs;
16 modules = builtins.filter (f: f != null) [16 modules = builtins.filter (f: f != null) [
17 (../users + ("/" + user + "/vim.nix"))17 (../users + ("/" + user + "/vim.nix"))
18 ../modules/neovim18 ../modules/neovim
19 ];19 ];
20 extraSpecialArgs = {20 extraSpecialArgs = {
21 inherit host;21 inherit host;
22 flake = self;22 flake = self;
23 user = userConfig;23 user = userConfig;
24 };
24 };25 };
25}).neovim26in
27config.neovim // { input = config; }
modules/neovim/blink-cmp.nix created+32
...@@ -0,0 +1,32 @@
1{ ... }:
2{
3 vim.autocomplete.blink-cmp = {
4 enable = true;
5 mappings = {
6 close = null;
7 complete = null;
8 confirm = null;
9 next = null;
10 previous = null;
11 scrollDocsDown = null;
12 scrollDocsUp = null;
13 };
14 setupOpts = {
15 keymap = {
16 preset = "super-tab";
17 };
18 completion = {
19 ghost_text.enabled = false;
20 list.selection.preselect = true;
21 trigger = {
22 show_in_snippet = true;
23 };
24 };
25 signature.enabled = true;
26 };
27 sourcePlugins = {
28 ripgrep.enable = true;
29 };
30 friendly-snippets.enable = true;
31 };
32}
modules/neovim/default.nix+6-37
...@@ -9,6 +9,7 @@...@@ -9,6 +9,7 @@
9 ./formatter.nix9 ./formatter.nix
10 ./keybind.nix10 ./keybind.nix
11 ./options.nix11 ./options.nix
12 ./blink-cmp.nix
12 ];13 ];
13 # based on default options from upstream:14 # based on default options from upstream:
14 # https://github.com/NotAShelf/nvf/blob/main/configuration.nix15 # https://github.com/NotAShelf/nvf/blob/main/configuration.nix
...@@ -22,12 +23,10 @@...@@ -22,12 +23,10 @@
22 extraLuaFiles = [23 extraLuaFiles = [
23 ./commands/FullscreenTerm.lua24 ./commands/FullscreenTerm.lua
24 ./commands/SmartQuit.lua25 ./commands/SmartQuit.lua
25 ];
26
27 theme = {
28 enable = true;
29 };
3026
27 ./extra.lua
28 ];
29 theme.enable = true;
31 visuals = {30 visuals = {
32 # notification system31 # notification system
33 # https://github.com/j-hui/fidget.nvim32 # https://github.com/j-hui/fidget.nvim
...@@ -110,8 +109,6 @@...@@ -110,8 +109,6 @@
110 clang.enable = true;109 clang.enable = true;
111 css.enable = true;110 css.enable = true;
112 html.enable = true;111 html.enable = true;
113 lua.enable = true;
114 markdown.enable = true;
115 nix.enable = true;112 nix.enable = true;
116 python.enable = true;113 python.enable = true;
117 rust.crates.enable = true;114 rust.crates.enable = true;
...@@ -119,6 +116,8 @@...@@ -119,6 +116,8 @@
119 ts.enable = true;116 ts.enable = true;
120 zig.enable = true;117 zig.enable = true;
121 # sort-lines: off118 # sort-lines: off
119
120 nix.lsp.servers = "nixd";
122 };121 };
123 filetree.neo-tree = {122 filetree.neo-tree = {
124 enable = true;123 enable = true;
...@@ -149,36 +148,6 @@...@@ -149,36 +148,6 @@
149 };148 };
150 };149 };
151 };150 };
152 autocomplete.blink-cmp = {
153 enable = true;
154 mappings = {
155 close = null;
156 complete = null;
157 confirm = null;
158 next = null;
159 previous = null;
160 scrollDocsDown = null;
161 scrollDocsUp = null;
162 };
163 setupOpts = {
164 keymap = {
165 preset = "super-tab";
166 };
167 completion = {
168 ghost_text.enabled = false;
169 list.selection.preselect = true;
170 trigger = {
171 show_in_snippet = true;
172 };
173 accept.auto_brackets.enabled = true;
174 };
175 signature.enabled = true;
176 };
177 sourcePlugins = {
178 ripgrep.enable = true;
179 };
180 friendly-snippets.enable = true;
181 };
182 statusline = {151 statusline = {
183 lualine = {152 lualine = {
184 enable = true;153 enable = true;
modules/neovim/extra.lua created+2
...@@ -0,0 +1,2 @@
1-- not sure how to add this in nix
2require("fzf-lua").register_ui_select()
modules/neovim/keybind.nix+1-1
...@@ -35,7 +35,7 @@ in...@@ -35,7 +35,7 @@ in
35 # lsp35 # lsp
36 code-action =36 code-action =
37 keyCmd "n" "<leader>ca"37 keyCmd "n" "<leader>ca"
38 "FzfLua lsp_code_actions winopts.height=8 winopts.width=50 winopts.backdrop=100 winopts.title=false winopts.preview.title=false winopts.row=1 winopts.preview.hidden=true";38 "FzfLua lsp_code_actions winopts.height=8 winopts.width=50 winopts.backdrop=100 winopts.title=false winopts.preview.title=false winopts.row=1 winopts.preview.hidden=true silent=true";
3939
40 # subtle nice features40 # subtle nice features
41 visual-dedent = keyRemap "v" "<" "<gv"; # keep selection41 visual-dedent = keyRemap "v" "<" "<gv"; # keep selection