improve nixvim config, might go back to lazy nvim

This commit is contained in:
Noa Aarts 2024-03-27 13:53:25 +01:00
parent ccce41dcde
commit 24e235063f

View file

@ -37,6 +37,9 @@
splitright = true; splitright = true;
splitbelow = true; splitbelow = true;
shiftwidth = 4;
tabstop = 4;
list = true; list = true;
listchars = { tab = "» "; trail = "·"; nbsp = ""; }; listchars = { tab = "» "; trail = "·"; nbsp = ""; };
@ -76,12 +79,12 @@
{ mode = "n"; key = "<C-j>"; action = "<C-w><C-j>"; options.desc = "Move focus to the lower window" ;} { mode = "n"; key = "<C-j>"; action = "<C-w><C-j>"; options.desc = "Move focus to the lower window" ;}
{ mode = "n"; key = "<C-k>"; action = "<C-w><C-k>"; options.desc = "Move focus to the upper window" ;} { mode = "n"; key = "<C-k>"; action = "<C-w><C-k>"; options.desc = "Move focus to the upper window" ;}
{ mode = "n"; key = "<leader>pv"; lua = true; action = "vim.cmd.Ex";} { mode = "n"; key = "<leader>pv"; lua = true; action = "vim.cmd.Ex";}
{ mode = "x"; key = "<leader>p"; action = ''[["_dP]]'';} { mode = "x"; key = "<leader>p"; action = ''"_dP''; options.desc = "paste without override";}
{ mode = [ "n" "v" ]; key = "<leader>y"; action = ''[["+y]]'';} { mode = [ "n" "v" ]; key = "<leader>y"; action = ''"+y''; options.desc = "copy to system clipboard";}
{ mode = "n"; key = "<leader>Y"; action = ''[["+Y]]'';} { mode = "n"; key = "<leader>Y"; action = ''"+Y''; options.desc = "copy line to system clipboard";}
{ mode = [ "n" "v" ]; key = "<leader>d"; action = ''[["_d]]'';} { mode = [ "n" "v" ]; key = "<leader>d"; action = ''"_d''; options.desc = "delete without override";}
{ mode = "v"; key = "J"; action = ":m '>+1<CR>gv=gv";} { mode = "v"; key = "J"; action = ":m '>+1<CR>gv=gv"; options.desc = "move selected down";}
{ mode = "v"; key = "K"; action = ":m '<-2<CR>gv=gv";} { mode = "v"; key = "K"; action = ":m '<-2<CR>gv=gv"; options.desc = "move selected up";}
]; ];
plugins = { plugins = {
@ -137,6 +140,7 @@
formattersByFt = { formattersByFt = {
lua = [ "stylua" ]; lua = [ "stylua" ];
python = [ "black" ]; python = [ "black" ];
yaml = [ "yamlls" ];
}; };
}; };
cmp = { cmp = {
@ -170,6 +174,7 @@
enable = true; enable = true;
maxLines = 8; maxLines = 8;
}; };
fidget.enable = true;
lsp = { lsp = {
enable = true; enable = true;
# TODO: use onAttach instead of the autocmd # TODO: use onAttach instead of the autocmd
@ -227,6 +232,7 @@
installRustc = false; installRustc = false;
installCargo = false; installCargo = false;
}; };
yamlls.enable = true;
}; };
}; };
lsp-format = { lsp-format = {
@ -235,6 +241,7 @@
}; };
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [
vim-sleuth vim-sleuth
neodev-nvim
]; ];
}; };
} }