Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

What does resolved_capabilities mean for null-ls ? #523

Answered by jose-elias-alvarez
aitvann asked this question in Q&A
Discussion options

You must be logged in to vote

There's 2 things going on:

  1. null-ls declares its capabilities on launch. Here, it declares all of its capabilities, regardless of which sources a user has actually registered. Neovim resolves these (hence the name) and assigns them to client.resolved_capabilities.
  2. When sending a request, Neovim checks whether each client can support the request using client.supports_method(). Since at this point we know what null-ls can and can't do based on registered sources, we can respond accurately.

The user's request in the linked issue was based on a special case where they wanted to register a source that's enabled for all filetypes but disable it under specific conditions. I recommended using cl…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aitvann
Comment options

Answer selected by aitvann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants