completion fixes, but leave omni off

Tue, 28 Feb 2023 20:55:56 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Tue, 28 Feb 2023 20:55:56 -0600
changeset 1055
ba91fd3b81e1
parent 1054
3a0ff0563a7b
child 1056
235dd39d6629

completion fixes, but leave omni off

.config/nvim/lua/config/options.lua file | annotate | diff | comparison | revisions
.config/nvim/lua/plugins/completion.lua file | annotate | diff | comparison | revisions
.config/nvim/lua/plugins/lsp.lua file | annotate | diff | comparison | revisions
--- a/.config/nvim/lua/config/options.lua
+++ b/.config/nvim/lua/config/options.lua
@@ -26,7 +26,7 @@ o.winminwidth = 5
 -- Behavior
 o.autowriteall = true
 o.backup = true
-o.completeopt:append({"menuone", "noselect"})
+o.completeopt = {"menu", "menuone", "noselect"}
 o.hidden = false
 o.ignorecase = true
 o.scrolloff = 15
--- a/.config/nvim/lua/plugins/completion.lua
+++ b/.config/nvim/lua/plugins/completion.lua
@@ -17,7 +17,6 @@ return {
       return {
         completion = {
           keyword_length = 3,
-          completeopt = "menu,menuone,noinsert,noselect",
         },
         formatting = {
           format = function(entry, vim_item)
@@ -49,7 +48,7 @@ return {
           { name = "nvim_lua" },
           { name = "buffer", option = { keyword_pattern = [[\k\+]] } },
           { name = "path" },
-          { name = "omni" },
+          -- { name = "omni" },
           { name = "tags" },
           { name = "calc" },
         }),
--- a/.config/nvim/lua/plugins/lsp.lua
+++ b/.config/nvim/lua/plugins/lsp.lua
@@ -9,10 +9,13 @@ return {
       require("mason-lspconfig").setup()
       require("mason-lspconfig").setup_handlers({
         function(server)
-          require("lspconfig")[server].setup({})
+          require("lspconfig")[server].setup({
+            capabilities = require('cmp_nvim_lsp').default_capabilities()
+          })
         end,
         gopls = function ()
           require("lspconfig").gopls.setup({
+            capabilities = require('cmp_nvim_lsp').default_capabilities(),
             settings = { gopls = { gofumpt = true } }
           })
         end

mercurial