.config/nvim/lua/plugins/lsp.lua

changeset 1043
e55463fb35e2
parent 1035
e46ff6e45c96
child 1044
8b90bfdedd2b
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -25,10 +25,13 @@ return {
     event = "InsertEnter",
     dependencies = {
       "hrsh7th/cmp-buffer",
-      "hrsh7th/cmp-path",
+      "hrsh7th/cmp-calc",
       "hrsh7th/cmp-nvim-lsp",
       "hrsh7th/cmp-nvim-lsp-signature-help",
       "hrsh7th/cmp-nvim-lua",
+      "hrsh7th/cmp-omni",
+      "hrsh7th/cmp-path",
+      "quangnguyen30192/cmp-nvim-tags",
     },
     opts = function()
       local cmp = require("cmp")
@@ -39,13 +42,7 @@ return {
         mapping = cmp.mapping.preset.insert({
           ["<C-b>"] = cmp.mapping.scroll_docs(-4),
           ["<C-f>"] = cmp.mapping.scroll_docs(4),
-          ["<Tab>"] = function(fallback)
-            if cmp.visible() then
-              cmp.select_next_item()
-            else
-              cmp.complete()
-            end
-          end,
+          ["<Tab>"] = cmp.mapping.select_next_item(),
           ["<S-Tab>"] = cmp.mapping.select_prev_item(),
           ["<C-g>"] = cmp.mapping.abort(),
           ["<Right>"] = cmp.mapping.confirm({select = true}),
@@ -63,14 +60,13 @@ return {
           { name = "nvim_lsp_signature_help" },
           { name = "nvim_lua" },
         }, {
+          { name = "calc" },
           { name = "buffer" },
           { name = "path" },
+        }, {
+          { name = "tags" },
+          { name = "omni" },
         }),
-        experimental = {
-          ghost_text = {
-            hl_group = "LspCodeLens",
-          },
-        },
       }
     end,
   },

mercurial