From 21edaf39be4cd3f12840e4b46b574fa8671843ed Mon Sep 17 00:00:00 2001 From: Michael Buckley Date: Tue, 23 Sep 2025 06:49:04 -0400 Subject: [PATCH] languages/yaml: corrected type issue by converting string to luaInLine --- modules/plugins/languages/yaml.nix | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/plugins/languages/yaml.nix b/modules/plugins/languages/yaml.nix index 1869b1c1..6b1e0a62 100644 --- a/modules/plugins/languages/yaml.nix +++ b/modules/plugins/languages/yaml.nix @@ -11,19 +11,24 @@ inherit (lib.types) enum; inherit (lib.nvim.types) mkGrammarOption singleOrListOf; inherit (lib.nvim.attrsets) mapListToAttrs; + inherit (lib.generators) mkLuaInline; 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"; + then + mkLuaInline '' + function(client, bufnr) + local filetype = vim.bo[bufnr].filetype + if filetype == "helm" then + client.stop() + end + end'' + else + mkLuaInline '' + default_on_attach + ''; defaultServers = ["yaml-language-server"]; servers = {