From 64d3996bd0c6aece450a25a7a06b7dae50cb5431 Mon Sep 17 00:00:00 2001 From: Rob Hanlon <69870+robhanlon22@users.noreply.github.com> Date: Sun, 3 Mar 2024 02:39:13 -0800 Subject: [PATCH] plugins/none-ls: fix withArgs type, syntax (#1182) This was previously null or string, but was changed to null or Lua in nix-community/nixvim#1169. Internally, `withArgs` is expected to be a string, but `mkNullOrLua` applies `mkRaw`, leading to a type error when generating the output, as it is attempting to interpolate a set rather than a string. Tested locally, and verified that it fixes my setup. --- plugins/none-ls/servers.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/none-ls/servers.nix b/plugins/none-ls/servers.nix index 25c8cc57..e9326fea 100644 --- a/plugins/none-ls/servers.nix +++ b/plugins/none-ls/servers.nix @@ -331,7 +331,7 @@ in { (source: _: { enable = mkEnableOption "the ${source} ${sourceType} source for none-ls"; - withArgs = helpers.mkNullOrLua '' + withArgs = helpers.mkNullOrOption helpers.nixvimTypes.strLua '' Raw Lua code passed as an argument to the source's `with` method. ''; } @@ -383,7 +383,7 @@ in { withArgs = if source.withArgs == null then sourceItem - else "${sourceItem}.with(${source.withArgs}})"; + else "${sourceItem}.with(${source.withArgs})"; in helpers.mkRaw '' require("null-ls").builtins.${withArgs}