diff --git a/home-nvim.nix b/home-nvim.nix index d8b5444..b4d2350 100644 --- a/home-nvim.nix +++ b/home-nvim.nix @@ -31,6 +31,14 @@ maplocalleader = " "; }; + autoCmd = [ + { + event = [ "BufRead" "BufNewFile" ]; + pattern = [ "*.cg" ]; + command = "setlocal tabstop=2 shiftwidth=2"; + } + ]; + keymaps = [ { key = "e"; action = "Neotree toggle"; } { key = "f"; action = "Tv files"; } @@ -40,6 +48,8 @@ { key = "xx"; action = "Trouble diagnostics toggle"; } { key = ""; action = "bnext"; } { key = ""; action = "bprev"; } + { key = "s"; mode = [ "n" "x" "o" ]; action.__raw = "function() require('flash').jump() end"; options.desc = "Flash"; } + { key = "S"; mode = [ "n" "x" "o" ]; action.__raw = "function() require('flash').treesitter() end"; options.desc = "Flash Treesitter"; } ]; plugins = { @@ -48,11 +58,19 @@ cmp = { enable = true; autoEnableSources = true; - settings.sources = [ - { name = "nvim_lsp"; } - { name = "path"; } - { name = "buffer"; } - ]; + settings = { + sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ]; + mapping = { + "" = "cmp.mapping.select_next_item()"; + "" = "cmp.mapping.select_prev_item()"; + "" = "cmp.mapping.confirm({ select = false })"; + "" = "cmp.mapping.abort()"; + }; + }; }; cmp-nvim-lsp.enable = true; cmp-buffer.enable = true; @@ -70,7 +88,11 @@ csvview.enable = true; dashboard.enable = true; emmet.enable = true; - flash.enable = true; + flash = { + enable = true; + settings.jump.autojump = true; + settings.modes.search.enabled = true; + }; gitsigns.enable = true; lazygit.enable = true; lint.enable = true;