Skip to content

--check usage tweaks #19

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

Merged
merged 3 commits into from
Dec 28, 2023
Merged

Conversation

filipmnowak
Copy link
Contributor

hello there.

  • we are missing new --checklevel value: Hint
  • --check is expecting a string, as of v3.7.3. "true" or "false" are being converted to or just interpreted as booleans:
<some path>/lua-language-server-3.7.3/bin/lua-language-server--check="true" --checklevel=Hint
The argument of CHECK must be a string, but got boolean

Any other, non-empty string seems to work fine:

<some path>/lua-language-server-3.7.3/bin/lua-language-server --check="yes" --checklevel=Hint
Diagnosis completed, no problems found

We can argue it's a bug (i didn't went as far as to attempt translation from Chinese: LuaLS/lua-language-server#965 :)), but i think meanwhile it would be useful to document current server's behavior.

@carsakiller
Copy link
Collaborator

It looks like the value for --check is supposed to be the path to the workspace to check.

I translated the issue you mentioned and it seems unrelated. They appear to be talking about the language server being unable to resolve files.

@carsakiller carsakiller added the wiki/improvement Larger improvement to existing documentation label Dec 27, 2023
@filipmnowak
Copy link
Contributor Author

filipmnowak commented Dec 27, 2023

It looks like the value for --check is supposed to be the path to the workspace to check.

I translated the issue you mentioned and it seems unrelated. They appear to be talking about the language server being unable to resolve files.

ahh, now this makes sense:

<some path>/lua-language-server-3.7.3/bin/lua-language-server: absolute: Invalid argument: ""
stack traceback:
	[C]: in function 'bee.filesystem.absolute'
	script/cli/check.lua:23: in main chunk
	[C]: in function 'require'
	script/cli/init.lua:7: in main chunk
	[C]: in function 'require'
	/opt/lua-language-server-3.7.3/main.lua:76: in main chunk
	(bootstrap.lua):85: in main chunk
	[C]: in ?

Copy link
Collaborator

@carsakiller carsakiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you!

@carsakiller carsakiller merged commit 42c549c into LuaLS:main Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wiki/improvement Larger improvement to existing documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants