summary refs log tree commit diff stats
path: root/hm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--hm/nixvim/config.nix25
1 files changed, 24 insertions, 1 deletions
diff --git a/hm/nixvim/config.nix b/hm/nixvim/config.nix
index 5ce397c..24e5a33 100644
--- a/hm/nixvim/config.nix
+++ b/hm/nixvim/config.nix
@@ -8,6 +8,8 @@ pkgs: {
 
     textwidth = 83;
     linebreak = true;
+
+    completeopt = ["menu" "menuone" "noselect"];
   };
   keymaps = [
     {
@@ -56,6 +58,7 @@ pkgs: {
     cmp = {
       enable = true;
       settings = {
+        snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
         mappings = {
           "<C-Space>" = "cmp.mapping.complete()";
           "<C-d>" = "cmp.mapping.scroll_docs(-4)";
@@ -68,12 +71,16 @@ pkgs: {
         sources = [
           {name = "nvim_lsp";}
           {name = "path";}
-          {name = "buffer";}
+          {
+            name = "buffer";
+            option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
+          }
           {name = "git";}
           {name = "conventionalcommits";}
         ];
       };
     };
+    cmp-path.enable = true;
     coq-nvim = {
       enable = false;
       settings = {
@@ -97,9 +104,25 @@ pkgs: {
         java-language-server.enable = true;
       };
     };
+    lspkind = {
+      enable = true;
+
+      cmp = {
+        enable = true;
+        menu = {
+          nvim_lsp = "[LSP]";
+          nvim_lua = "[api]";
+          path = "[path]";
+          luasnip = "[snip]";
+          buffer = "[buffer]";
+          neorg = "[neorg]";
+        };
+      };
+    };
     lsp-format = {
       enable = true;
     };
+    luasnip.enable = true;
     quickmath.enable = true;
     treesitter = {
       enable = true;