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

Lookup session by capability #711

Merged
merged 5 commits into from
Sep 9, 2019
Merged

Lookup session by capability #711

merged 5 commits into from
Sep 9, 2019

Conversation

tomv564
Copy link
Contributor

@tomv564 tomv564 commented Sep 9, 2019

Fixes #562 where view and command-based LSP code only looks at scope to find the most suitable session.
In a case where two servers run for the same scope (eg. typescript and eslint server on source.js), LSP would pick the first session, instead of checking which server provides the relevant capability.

Implementation details:

  • Forced all lookups to consider multiple servers by changing scope_config -> scope_configs
  • session_for_view and LspTextCommand.client_with_capability take capability parameter.
  • Use iterators to save some effort of calculating 2nd, 3rd matching session if only the first session is needed.
  • Attempt to fix some timings on completion tests on travis.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 37.064% when pulling e7660f8 on lookup-by-capability into 7bb8de0 on master.

@tomv564 tomv564 merged commit 3c428e0 into master Sep 9, 2019
@tomv564 tomv564 deleted the lookup-by-capability branch October 1, 2019 09:07
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.

Multi-server views do not send requests to (all) capable servers for hover, actions etc.
2 participants