diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 83839245..b738571b 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -289,6 +289,8 @@ - Fix [blink.cmp] breaking when built-in sources were modified. - Fix [conform.nvim] not allowing disabling formatting on and after save. Use `null` value to disable them if conform is enabled. +- Fix Helm-YAML language module integration. YAML diagnostics will now remain in + `helmfile`s when both are enabled. [TheColorman](https://github.com/TheColorman): diff --git a/modules/plugins/languages/helm.nix b/modules/plugins/languages/helm.nix index 1971eb31..450177ad 100644 --- a/modules/plugins/languages/helm.nix +++ b/modules/plugins/languages/helm.nix @@ -6,7 +6,7 @@ }: let inherit (builtins) attrNames head; inherit (lib.options) mkEnableOption mkOption; - inherit (lib.modules) mkIf mkMerge; + inherit (lib.modules) mkDefault mkIf mkMerge; inherit (lib.meta) getExe; inherit (lib.types) enum; inherit (lib.nvim.types) mkGrammarOption singleOrListOf; @@ -27,11 +27,13 @@ dynamicRegistration = true; }; }; - settings = { + settings = mkIf (yamlCfg.enable && yamlCfg.lsp.enable) { helm-ls = { yamlls = { - # TODO: Determine if this is a good enough solution - path = (head yamlCfg.lsp.servers).cmd; + # Without this being enabled, the YAML language module will look broken in helmfiles + # if both modules are enabled at once. + enabled = mkDefault yamlCfg.lsp.enable; + path = head config.vim.lsp.servers.${head yamlCfg.lsp.servers}.cmd; }; }; };