refactor(home): move neovim config to modules/

This commit is contained in:
xezo360hye 2024-08-13 17:19:02 +03:00
parent 8f9b03ecb0
commit c55400247b
2 changed files with 43 additions and 42 deletions

View File

@ -3,6 +3,7 @@
imports = [
./modules/nethack.nix
./modules/firefox.nix
./modules/neovim.nix
];
programs = {
@ -28,48 +29,6 @@
};
};
nixvim = {
enable = true;
colorschemes.nightfox = {
enable = true;
flavor = "nordfox";
};
plugins = {
guess-indent = {
enable = true;
};
copilot-lua = {
enable = true;
suggestion.autoTrigger = true;
suggestion.keymap = {
accept = "<M-Right>";
acceptLine = "<M-l>";
acceptWord = "<M-w>";
};
};
};
keymaps = [
{
mode = "n";
key = ";";
action = ":";
}
{
mode = "n";
key = "<Esc>";
action = "<Cmd>nohlsearch<CR>";
options = {
silent = true;
};
}
];
};
mpv = {
enable = true;
};

42
home/modules/neovim.nix Normal file
View File

@ -0,0 +1,42 @@
{
programs.nixvim = {
enable = true;
colorschemes.nightfox = {
enable = true;
flavor = "nordfox";
};
plugins = {
guess-indent = {
enable = true;
};
copilot-lua = {
enable = true;
suggestion.autoTrigger = true;
suggestion.keymap = {
accept = "<M-a>";
acceptLine = "<M-l>";
acceptWord = "<M-w>";
};
};
};
keymaps = [
{
mode = "n";
key = ";";
action = ":";
}
{
mode = "n";
key = "<Esc>";
action = "<Cmd>nohlsearch<CR>";
options = {
silent = true;
};
}
];
};
}