parent
7b97d1ab8a
commit
cb1d7ea523
5 changed files with 55 additions and 50 deletions
|
@ -10,16 +10,18 @@ let
|
||||||
|
|
||||||
userDir = ../users + "/${user}";
|
userDir = ../users + "/${user}";
|
||||||
userConfig = import (userDir + "/user.nix");
|
userConfig = import (userDir + "/user.nix");
|
||||||
in
|
|
||||||
(inputs.nvf.lib.neovimConfiguration {
|
config = inputs.nvf.lib.neovimConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = builtins.filter (f: f != null) [
|
modules = builtins.filter (f: f != null) [
|
||||||
(../users + ("/" + user + "/vim.nix"))
|
(../users + ("/" + user + "/vim.nix"))
|
||||||
../modules/neovim
|
../modules/neovim
|
||||||
];
|
];
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit host;
|
inherit host;
|
||||||
flake = self;
|
flake = self;
|
||||||
user = userConfig;
|
user = userConfig;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}).neovim
|
in
|
||||||
|
config.neovim // { input = config; }
|
||||||
|
|
32
modules/neovim/blink-cmp.nix
Normal file
32
modules/neovim/blink-cmp.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
vim.autocomplete.blink-cmp = {
|
||||||
|
enable = true;
|
||||||
|
mappings = {
|
||||||
|
close = null;
|
||||||
|
complete = null;
|
||||||
|
confirm = null;
|
||||||
|
next = null;
|
||||||
|
previous = null;
|
||||||
|
scrollDocsDown = null;
|
||||||
|
scrollDocsUp = null;
|
||||||
|
};
|
||||||
|
setupOpts = {
|
||||||
|
keymap = {
|
||||||
|
preset = "super-tab";
|
||||||
|
};
|
||||||
|
completion = {
|
||||||
|
ghost_text.enabled = false;
|
||||||
|
list.selection.preselect = true;
|
||||||
|
trigger = {
|
||||||
|
show_in_snippet = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
signature.enabled = true;
|
||||||
|
};
|
||||||
|
sourcePlugins = {
|
||||||
|
ripgrep.enable = true;
|
||||||
|
};
|
||||||
|
friendly-snippets.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -9,6 +9,7 @@
|
||||||
./formatter.nix
|
./formatter.nix
|
||||||
./keybind.nix
|
./keybind.nix
|
||||||
./options.nix
|
./options.nix
|
||||||
|
./blink-cmp.nix
|
||||||
];
|
];
|
||||||
# based on default options from upstream:
|
# based on default options from upstream:
|
||||||
# https://github.com/NotAShelf/nvf/blob/main/configuration.nix
|
# https://github.com/NotAShelf/nvf/blob/main/configuration.nix
|
||||||
|
@ -22,12 +23,10 @@
|
||||||
extraLuaFiles = [
|
extraLuaFiles = [
|
||||||
./commands/FullscreenTerm.lua
|
./commands/FullscreenTerm.lua
|
||||||
./commands/SmartQuit.lua
|
./commands/SmartQuit.lua
|
||||||
|
|
||||||
|
./extra.lua
|
||||||
];
|
];
|
||||||
|
theme.enable = true;
|
||||||
theme = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
visuals = {
|
visuals = {
|
||||||
# notification system
|
# notification system
|
||||||
# https://github.com/j-hui/fidget.nvim
|
# https://github.com/j-hui/fidget.nvim
|
||||||
|
@ -110,8 +109,6 @@
|
||||||
clang.enable = true;
|
clang.enable = true;
|
||||||
css.enable = true;
|
css.enable = true;
|
||||||
html.enable = true;
|
html.enable = true;
|
||||||
lua.enable = true;
|
|
||||||
markdown.enable = true;
|
|
||||||
nix.enable = true;
|
nix.enable = true;
|
||||||
python.enable = true;
|
python.enable = true;
|
||||||
rust.crates.enable = true;
|
rust.crates.enable = true;
|
||||||
|
@ -119,6 +116,8 @@
|
||||||
ts.enable = true;
|
ts.enable = true;
|
||||||
zig.enable = true;
|
zig.enable = true;
|
||||||
# sort-lines: off
|
# sort-lines: off
|
||||||
|
|
||||||
|
nix.lsp.servers = "nixd";
|
||||||
};
|
};
|
||||||
filetree.neo-tree = {
|
filetree.neo-tree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -149,36 +148,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
autocomplete.blink-cmp = {
|
|
||||||
enable = true;
|
|
||||||
mappings = {
|
|
||||||
close = null;
|
|
||||||
complete = null;
|
|
||||||
confirm = null;
|
|
||||||
next = null;
|
|
||||||
previous = null;
|
|
||||||
scrollDocsDown = null;
|
|
||||||
scrollDocsUp = null;
|
|
||||||
};
|
|
||||||
setupOpts = {
|
|
||||||
keymap = {
|
|
||||||
preset = "super-tab";
|
|
||||||
};
|
|
||||||
completion = {
|
|
||||||
ghost_text.enabled = false;
|
|
||||||
list.selection.preselect = true;
|
|
||||||
trigger = {
|
|
||||||
show_in_snippet = true;
|
|
||||||
};
|
|
||||||
accept.auto_brackets.enabled = true;
|
|
||||||
};
|
|
||||||
signature.enabled = true;
|
|
||||||
};
|
|
||||||
sourcePlugins = {
|
|
||||||
ripgrep.enable = true;
|
|
||||||
};
|
|
||||||
friendly-snippets.enable = true;
|
|
||||||
};
|
|
||||||
statusline = {
|
statusline = {
|
||||||
lualine = {
|
lualine = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
2
modules/neovim/extra.lua
Normal file
2
modules/neovim/extra.lua
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
-- not sure how to add this in nix
|
||||||
|
require("fzf-lua").register_ui_select()
|
|
@ -35,7 +35,7 @@ in
|
||||||
# lsp
|
# lsp
|
||||||
code-action =
|
code-action =
|
||||||
keyCmd "n" "<leader>ca"
|
keyCmd "n" "<leader>ca"
|
||||||
"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";
|
"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";
|
||||||
|
|
||||||
# subtle nice features
|
# subtle nice features
|
||||||
visual-dedent = keyRemap "v" "<" "<gv"; # keep selection
|
visual-dedent = keyRemap "v" "<" "<gv"; # keep selection
|
||||||
|
|
Loading…
Reference in a new issue