mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-27 11:19:02 +02:00
feat(lang): add support for helm chart templates (#2273)
* feat(lang): add support for helm chart templates * fix(helm): stop yamlls and disable autostart * fix(helm): stop yaml & docker compose lsp on helm file types Revert disabling `autostart` since that kills the LSP globally even when opening a standard yaml file, like GitHub Workflow file. * fix(helm): remove docker compose lsp overrides Since docker compose LSP does not seem to be triggered or started by opening *.yaml helm files, the config overrides were removed to simplify Helm config. * fix(helm): ensure mason installs helm lsp
This commit is contained in:
parent
d2502613ff
commit
de01a37cb6
1 changed files with 30 additions and 0 deletions
30
lua/lazyvim/plugins/extras/lang/helm.lua
Normal file
30
lua/lazyvim/plugins/extras/lang/helm.lua
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
require("lazyvim.util").lsp.on_attach(function(client, buffer)
|
||||||
|
if client.name == "yamlls" then
|
||||||
|
if vim.api.nvim_get_option_value("filetype", { buf = buffer }) == "helm" then
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.cmd("LspStop ++force yamlls")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
return {
|
||||||
|
{ "towolf/vim-helm", ft = "helm" },
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
opts = {
|
||||||
|
servers = {
|
||||||
|
yamlls = {},
|
||||||
|
helm_ls = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
vim.list_extend(opts.ensure_installed, {
|
||||||
|
"helm-ls",
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue