languages/yaml: corrected type issue by converting string to luaInLine

This commit is contained in:
Michael Buckley 2025-09-23 06:49:04 -04:00
commit 21edaf39be
No known key found for this signature in database
GPG key ID: 1A0163427F977C33

View file

@ -11,19 +11,24 @@
inherit (lib.types) enum; inherit (lib.types) enum;
inherit (lib.nvim.types) mkGrammarOption singleOrListOf; inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
inherit (lib.nvim.attrsets) mapListToAttrs; inherit (lib.nvim.attrsets) mapListToAttrs;
inherit (lib.generators) mkLuaInline;
cfg = config.vim.languages.yaml; cfg = config.vim.languages.yaml;
onAttach = onAttach =
if config.vim.languages.helm.lsp.enable if config.vim.languages.helm.lsp.enable
then '' then
on_attach = function(client, bufnr) mkLuaInline ''
function(client, bufnr)
local filetype = vim.bo[bufnr].filetype local filetype = vim.bo[bufnr].filetype
if filetype == "helm" then if filetype == "helm" then
client.stop() client.stop()
end end
end'' end''
else "on_attach = default_on_attach"; else
mkLuaInline ''
default_on_attach
'';
defaultServers = ["yaml-language-server"]; defaultServers = ["yaml-language-server"];
servers = { servers = {