languages/helm: init (#679)

This commit is contained in:
Adam M. Szalkowski 2025-03-13 00:21:13 +01:00 committed by GitHub
commit 0625024869
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 109 additions and 2 deletions

View file

@ -14,14 +14,27 @@
cfg = config.vim.languages.yaml;
onAttach =
if config.vim.languages.helm.lsp.enable
then ''
on_attach = function(client, bufnr)
local filetype = vim.bo[bufnr].filetype
if filetype == "helm" then
client.stop()
end
end''
else "on_attach = default_on_attach";
defaultServer = "yaml-language-server";
servers = {
yaml-language-server = {
package = pkgs.nodePackages.yaml-language-server;
lspConfig = ''
lspconfig.yamlls.setup {
capabilities = capabilities;
on_attach = default_on_attach;
capabilities = capabilities,
${onAttach},
cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package