From cc24078e0f2e39fa07a9121473260054d5a4af9e Mon Sep 17 00:00:00 2001 From: Yadunand Prem Date: Thu, 29 Aug 2024 17:28:28 -0400 Subject: [PATCH] feat: more nvim plugins --- modules/neovim.nix | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/modules/neovim.nix b/modules/neovim.nix index da2da5c..6330790 100644 --- a/modules/neovim.nix +++ b/modules/neovim.nix @@ -17,6 +17,7 @@ tsserver.enable = true; # TS/JS pyright.enable = true; # Python biome.enable = true; # TS/JS + ruff.enable = true; }; keymaps.lspBuf = { gd = { action = "definition"; desc = "Goto Definition"; }; @@ -60,8 +61,8 @@ { name = "luasnip"; keywordLength = 3; } ]; window = { - completion = { border = "solid"; }; - documentation = { border = "solid"; }; + # completion = { border = "solid"; }; + # documentation = { border = "solid"; }; }; mapping = { "" = "cmp.mapping.select_next_item()"; @@ -80,9 +81,16 @@ cmp-path.enable = true; cmp_luasnip.enable = true; cmp-cmdline.enable = true; + nvim-tree = { + enable = true; + view.side = "right"; + updateFocusedFile.enable = true; + }; luasnip.enable = true; + bufferline.enable = true; + treesitter = { enable = true; folding = true; @@ -97,6 +105,14 @@ telescope = { enable = true; extensions.fzf-native.enable = true; + settings = { + defaults = { + mappings = { + i = { "".__raw = "require('trouble.sources.telescope').open"; }; + n = { "".__raw = "require('trouble.sources.telescope').open"; }; + }; + }; + }; }; }; opts = { @@ -125,8 +141,10 @@ { action = "Telescope find_files"; key = ""; options.desc = "Find Files"; } { action = "Telescope live_grep"; key = "fg"; options.desc = "Grep";} { action = "Telescope buffers"; key = "fb"; options.desc = "Find Buffers";} + { action = "NvimTreeToggle"; key = "tt"; options.desc = "Tree View";} { action = "gj"; key = "j"; mode = [ "n" ]; } { action = "gk"; key = "k"; mode = [ "n" ]; } + { action = ""; key = "jk"; mode = [ "i" ]; } { action = "Trouble diagnostics toggle"; key = "tr"; } { action = "Neogit"; key = "gg"; options.desc = "Open Git"; } ];