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
1010
1111 userDir = ../users + "/${user}";
1212 userConfig = import (userDir + "/user.nix");
13in
14(inputs.nvf.lib.neovimConfiguration {
15 inherit pkgs;
16 modules = builtins.filter (f: f != null) [
17 (../users + ("/" + user + "/vim.nix"))
18 ../modules/neovim
19 ];
20 extraSpecialArgs = {
21 inherit host;
22 flake = self;
23 user = userConfig;
13
14 config = inputs.nvf.lib.neovimConfiguration {
15 inherit pkgs;
16 modules = builtins.filter (f: f != null) [
17 (../users + ("/" + user + "/vim.nix"))
18 ../modules/neovim
19 ];
20 extraSpecialArgs = {
21 inherit host;
22 flake = self;
23 user = userConfig;
24 };
2425 };
25}).neovim
26in
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 @@
99 ./formatter.nix
1010 ./keybind.nix
1111 ./options.nix
12 ./blink-cmp.nix
1213 ];
1314 # based on default options from upstream:
1415 # https://github.com/NotAShelf/nvf/blob/main/configuration.nix
......@@ -22,12 +23,10 @@
2223 extraLuaFiles = [
2324 ./commands/FullscreenTerm.lua
2425 ./commands/SmartQuit.lua
25 ];
26
27 theme = {
28 enable = true;
29 };
3026
27 ./extra.lua
28 ];
29 theme.enable = true;
3130 visuals = {
3231 # notification system
3332 # https://github.com/j-hui/fidget.nvim
......@@ -110,8 +109,6 @@
110109 clang.enable = true;
111110 css.enable = true;
112111 html.enable = true;
113 lua.enable = true;
114 markdown.enable = true;
115112 nix.enable = true;
116113 python.enable = true;
117114 rust.crates.enable = true;
......@@ -119,6 +116,8 @@
119116 ts.enable = true;
120117 zig.enable = true;
121118 # sort-lines: off
119
120 nix.lsp.servers = "nixd";
122121 };
123122 filetree.neo-tree = {
124123 enable = true;
......@@ -149,36 +148,6 @@
149148 };
150149 };
151150 };
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 };
182151 statusline = {
183152 lualine = {
184153 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
3535 # lsp
3636 code-action =
3737 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
4040 # subtle nice features
4141 visual-dedent = keyRemap "v" "<" "<gv"; # keep selection