-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
plugins/none-ls: fix withArgs type, syntax #1182
Conversation
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.
@@ -331,7 +331,7 @@ in { | |||
(source: _: | |||
{ | |||
enable = mkEnableOption "the ${source} ${sourceType} source for none-ls"; | |||
withArgs = helpers.mkNullOrLua '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the right type should be helpers.mkNullOrOption helpers.nivimTypes.strLua
! Sorry for the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the type is a "lua string" but we are not converting it to raw right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly, we pass it directly. We should improve it to take arbitrary lua values with a toLuaObject, but we can do that later.
@traxys @GaetanLepage comments addressed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the regression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are lacking a description, this is why tests are failing
@traxys d'oh, my bad. Updated |
This was previously null or string, but was changed to null or Lua in #1169. Internally,
withArgs
is expected to be a string, butmkNullOrLua
appliesmkRaw
, leading to a type error when generating the output, as it is attempting to interpolate a set rather than a string.Additionally, there was an errant extra } when interpolating the args, which led to a broken init.lua.
Tested locally, and verified that it fixes my setup.