parent
7b97d1ab8a
commit
cb1d7ea523
5 changed files with 55 additions and 50 deletions
|
@ -10,16 +10,18 @@ let
|
|||
|
||||
userDir = ../users + "/${user}";
|
||||
userConfig = import (userDir + "/user.nix");
|
||||
in
|
||||
(inputs.nvf.lib.neovimConfiguration {
|
||||
inherit pkgs;
|
||||
modules = builtins.filter (f: f != null) [
|
||||
(../users + ("/" + user + "/vim.nix"))
|
||||
../modules/neovim
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit host;
|
||||
flake = self;
|
||||
user = userConfig;
|
||||
|
||||
config = inputs.nvf.lib.neovimConfiguration {
|
||||
inherit pkgs;
|
||||
modules = builtins.filter (f: f != null) [
|
||||
(../users + ("/" + user + "/vim.nix"))
|
||||
../modules/neovim
|
||||
];
|
||||
extraSpecialArgs = {
|
||||
inherit host;
|
||||
flake = self;
|
||||
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
|
||||
./keybind.nix
|
||||
./options.nix
|
||||
./blink-cmp.nix
|
||||
];
|
||||
# based on default options from upstream:
|
||||
# https://github.com/NotAShelf/nvf/blob/main/configuration.nix
|
||||
|
@ -22,12 +23,10 @@
|
|||
extraLuaFiles = [
|
||||
./commands/FullscreenTerm.lua
|
||||
./commands/SmartQuit.lua
|
||||
|
||||
./extra.lua
|
||||
];
|
||||
|
||||
theme = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
theme.enable = true;
|
||||
visuals = {
|
||||
# notification system
|
||||
# https://github.com/j-hui/fidget.nvim
|
||||
|
@ -110,8 +109,6 @@
|
|||
clang.enable = true;
|
||||
css.enable = true;
|
||||
html.enable = true;
|
||||
lua.enable = true;
|
||||
markdown.enable = true;
|
||||
nix.enable = true;
|
||||
python.enable = true;
|
||||
rust.crates.enable = true;
|
||||
|
@ -119,6 +116,8 @@
|
|||
ts.enable = true;
|
||||
zig.enable = true;
|
||||
# sort-lines: off
|
||||
|
||||
nix.lsp.servers = "nixd";
|
||||
};
|
||||
filetree.neo-tree = {
|
||||
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 = {
|
||||
lualine = {
|
||||
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
|
||||
code-action =
|
||||
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
|
||||
visual-dedent = keyRemap "v" "<" "<gv"; # keep selection
|
||||
|
|
Loading…
Reference in a new issue