This commit is contained in:
Alfarel 2025-09-03 16:56:19 -07:00 committed by GitHub
commit 4cd13450b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View file

@ -31,7 +31,7 @@
helm-ls = {
yamlls = {
# TODO: Determine if this is a good enough solution
path = (head yamlCfg.lsp.servers).cmd;
path = config.vim.lsp.servers.${head yamlCfg.lsp.servers}.cmd;
};
};
};

View file

@ -5,6 +5,7 @@
...
}: let
inherit (builtins) attrNames;
inherit (lib.generators) mkLuaInline;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
@ -14,16 +15,17 @@
cfg = config.vim.languages.yaml;
onAttach =
if config.vim.languages.helm.lsp.enable
on_attach = mkLuaInline (
if config.vim.languages.helm.lsp.enable && config.vim.languages.helm.enable
then ''
on_attach = function(client, bufnr)
function(client, bufnr)
local filetype = vim.bo[bufnr].filetype
if filetype == "helm" then
client.stop()
end
end''
else "on_attach = default_on_attach";
else "default_on_attach"
);
defaultServers = ["yaml-language-server"];
servers = {
@ -32,7 +34,7 @@
cmd = [(getExe pkgs.yaml-language-server) "--stdio"];
filetypes = ["yaml" "yaml.docker-compose" "yaml.gitlab" "yaml.helm-values"];
root_markers = [".git"];
on_attach = onAttach;
inherit on_attach;
# -- https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-disable-telemetry-reporting
settings = {
redhat = {