Skip to content

Commit

Permalink
fix(nvim): Adds coq_nvim for VHDL temporarily since nvim-cmp freezes
Browse files Browse the repository at this point in the history
This is only temporary. I am using nvim-cmp for _everything_ besides
completions in VHDL buffers, since nvim-cmp freezes the whole editor
when unisim is loaded and snippets are enabled. However, who knows, I
may switch to coq_nvim completely if I can config it as nicely as
nvim-cmp is

See:
hrsh7th/nvim-cmp#2028
VHDL-LS/rust_hdl#340
  • Loading branch information
SethGower committed Aug 30, 2024
1 parent 1c79cff commit e7bda99
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
10 changes: 9 additions & 1 deletion config/nvim/lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
}
},
{
Expand Down
20 changes: 8 additions & 12 deletions config/nvim/lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e7bda99

Please sign in to comment.