Skip to content
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

Enable plugins during --check #2536

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

danpf
Copy link
Contributor

@danpf danpf commented Feb 24, 2024

Diagnostics reports provided by lua-language-server --check . currently does not use plugins.

For some complex projects, plugins are required for proper type annotations.

To fix this:

  1. require plugin to add the 'startReload' / 'initPlugin' callback to the workspace watchlist
  2. in a previous PR, pluginargs was changed to support multiple plugins. Previously it had 1 default type, but now it has 2. This means that the default get returns nil instead of an empty table. To smooth this transition, I set it to {} when it is nil.

@sumneko sumneko merged commit 825a795 into LuaLS:master Feb 24, 2024
1 of 10 checks passed
@sumneko
Copy link
Collaborator

sumneko commented Feb 24, 2024

Thank you!

@danpf danpf deleted the danpf-diagnostics-with-plugins branch February 24, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants