Skip to content

Commit

Permalink
plugins/none-ls: fix withArgs type, syntax (nix-community#1182)
Browse files Browse the repository at this point in the history
This was previously null or string, but was changed to null or Lua in
nix-community#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.
  • Loading branch information
robhanlon22 authored Mar 3, 2024
1 parent cd86fd1 commit 64d3996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/none-ls/servers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
'';
}
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 64d3996

Please sign in to comment.