Compare commits

..

No commits in common. "6447bdf01348bb51dc3e2fd2158a1bd3ce37c87f" and "1a053852d21fbf08257dc62d869c81b235fa9113" have entirely different histories.

3 changed files with 9 additions and 18 deletions

View file

@ -289,10 +289,6 @@
- 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.
- Fix YAML language module not activating LSP keybinds if the Helm language
module was also enabled.
[TheColorman](https://github.com/TheColorman):

View file

@ -6,7 +6,7 @@
}: let
inherit (builtins) attrNames head;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkDefault mkIf mkMerge;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.meta) getExe;
inherit (lib.types) enum;
inherit (lib.nvim.types) mkGrammarOption singleOrListOf;
@ -27,13 +27,11 @@
dynamicRegistration = true;
};
};
settings = mkIf (yamlCfg.enable && yamlCfg.lsp.enable) {
settings = {
helm-ls = {
yamlls = {
# 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;
# TODO: Determine if this is a good enough solution
path = (head yamlCfg.lsp.servers).cmd;
};
};
};

View file

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