From cb132ee38dd7466b05f551a2b2f2aea07f003d0c Mon Sep 17 00:00:00 2001 From: poz Date: Mon, 21 Jul 2025 13:17:27 +0200 Subject: [PATCH] languages/yaml: fix on_attach --- modules/plugins/languages/yaml.nix | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/modules/plugins/languages/yaml.nix b/modules/plugins/languages/yaml.nix index 5442a0b7..78ba43ab 100644 --- a/modules/plugins/languages/yaml.nix +++ b/modules/plugins/languages/yaml.nix @@ -15,14 +15,22 @@ 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"; + then + /* + lua + */ + '' + function(client, bufnr) + local filetype = vim.bo[bufnr].filetype + if filetype == "helm" then + client.stop() + end + end'' + else + /* + lua + */ + "default_on_attach"; defaultServers = ["yaml-language-server"]; servers = {