Skip to content

Enable plugins during --check #2536

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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
@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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants