diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 00742c3..4739c1b 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -380,12 +380,20 @@ return require('lazy').setup({ { -- Neovim Language Server "neovim/nvim-lspconfig", event = Events.OpenFile, + init = function () + vim.g.coq_settings = { + auto_start = false, + } + end, config = function () require("plugins.lsp").setup() end, dependencies = { "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim" + "williamboman/mason-lspconfig.nvim", + { "ms-jpq/coq_nvim", branch = "coq" }, + { "ms-jpq/coq.artifacts", branch = "artifacts" }, + { 'ms-jpq/coq.thirdparty', branch = "3p" } } }, { diff --git a/config/nvim/lua/plugins/completions.lua b/config/nvim/lua/plugins/completions.lua index 2455f3e..c325de4 100644 --- a/config/nvim/lua/plugins/completions.lua +++ b/config/nvim/lua/plugins/completions.lua @@ -114,6 +114,9 @@ M.config = function () { name = "luasnip" }, }) }) + cmp.setup.filetype('vhdl', { + enabled = false + }) require("cmp_git").setup() end diff --git a/config/nvim/lua/plugins/lsp.lua b/config/nvim/lua/plugins/lsp.lua index 522383a..f39e075 100644 --- a/config/nvim/lua/plugins/lsp.lua +++ b/config/nvim/lua/plugins/lsp.lua @@ -74,18 +74,14 @@ M.setup = function () -- For some reason the vhdl_ls LSP server doesn't handle snippets in large (hundreds/thousands of files/units). -- Causes a 1-5s freeze when completing something, which is unacceptable when I am trying to type. For now, just -- gonna disable snippetSupport - lspconfig["vhdl_ls"].setup { - on_attach = on_attach, - capabilities = vim.tbl_extend("force", capabilities, { - textDocument = { - completion = { - completionItem = { - snippetSupport = false - } - } - } - }), - } + local coq = require("coq") + lspconfig["vhdl_ls"].setup(coq.lsp_ensure_capabilities({ + on_attach = function (...) + on_attach(...) + vim.cmd([[COQnow]]) + end, + capabilities = capabilities, + })) lspconfig["yamlls"].setup { on_attach = on_attach,