diff --git a/home-manager/modules/nvim.nix b/home-manager/modules/nvim.nix index dc62cd2..bc8f348 100644 --- a/home-manager/modules/nvim.nix +++ b/home-manager/modules/nvim.nix @@ -62,6 +62,59 @@ ''; extraPackages = with pkgs; [ stylua isort black nixfmt jq shfmt ]; plugins = { + comment-nvim.enable = true; + + ts-context-commentstring.enable = true; + + todo-comments.enable = true; + + lspkind = { + enable = true; + cmp.enable = true; + }; + + indent-blankline = { + enable = true; + scope.enabled = false; + }; + + cmp = { + enable = true; + settings = { + mapping = { + "" = "cmp.mapping.confirm({ select = true })"; + "" = '' + function(fallback) + if cmp.visible then + cmp.select_next_item() + else + fallback() + end + end + ''; + "" = '' + function(fallback) + if cmp.visible then + cmp.select_next_item() + else + fallback() + end + end + ''; + "" = "cmp.mapping.complete()"; + "" = "cmp.mapping.abort()"; + "" = "cmp.mapping.scroll_docs(-4)"; + "" = "cmp.mapping.scroll_docs(4)"; + }; + snippet.expand = '' + function(args) + require('snippy').expand_snippet(args.body) + end + ''; + sources = + [ { name = "nvim_lsp"; } { name = "path"; } { name = "snippy"; } ]; + }; + }; conform-nvim = { enable = true; formattersByFt = { @@ -130,7 +183,6 @@ enable = true; modules = { statusline = { set_vim_settings = false; }; - comment = { }; notify = { }; }; };