mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
fix(terraform): disable semantic tokens to prevent editor hangs
Workaround for terraform-ls sending invalid semantic tokens that cause Neovim 0.12 to freeze when opening terraform files with heredoc blocks. See: https://github.com/hashicorp/terraform-ls/issues/2094
This commit is contained in:
parent
96f4f18d7d
commit
981d9cb1ed
1 changed files with 10 additions and 0 deletions
|
|
@ -16,6 +16,16 @@ return {
|
||||||
servers = {
|
servers = {
|
||||||
terraformls = {},
|
terraformls = {},
|
||||||
},
|
},
|
||||||
|
setup = {
|
||||||
|
terraformls = function(_, opts)
|
||||||
|
-- workaround for terraform-ls sending invalid semantic tokens
|
||||||
|
-- https://github.com/hashicorp/terraform-ls/issues/2094
|
||||||
|
Snacks.util.lsp.on({ name = "terraformls" }, function(_, client)
|
||||||
|
client.server_capabilities.semanticTokensProvider = nil
|
||||||
|
end)
|
||||||
|
-- end workaround
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- ensure terraform tools are installed
|
-- ensure terraform tools are installed
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue