From b5e1873b8a8eea4c3632f39f87e757bfff0925fc Mon Sep 17 00:00:00 2001 From: Peter Benjamin Date: Fri, 2 Feb 2024 21:34:48 -0800 Subject: [PATCH] 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. --- lua/lazyvim/plugins/extras/lang/helm.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/helm.lua b/lua/lazyvim/plugins/extras/lang/helm.lua index 1b6603bb..94f810c8 100644 --- a/lua/lazyvim/plugins/extras/lang/helm.lua +++ b/lua/lazyvim/plugins/extras/lang/helm.lua @@ -2,7 +2,14 @@ require("lazyvim.util").lsp.on_attach(function(client, buffer) if client.name == "docker_compose_language_service" then if vim.api.nvim_get_option_value("filetype", { buf = buffer }) == "helm" then vim.schedule(function() - vim.cmd("LspStop ++force docker_compose_language_service yamlls") + vim.cmd("LspStop ++force docker_compose_language_service") + end) + end + end + 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 @@ -14,8 +21,8 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - yamlls = { autostart = false }, - docker_compose_language_service = { autostart = false }, + yamlls = {}, + docker_compose_language_service = {}, helm_ls = {}, }, },