Skip to content

Document selectors for capabilities#1118

Merged
DavyLandman merged 26 commits into
mainfrom
fix/capability-document-selectors
Jun 22, 2026
Merged

Document selectors for capabilities#1118
DavyLandman merged 26 commits into
mainfrom
fix/capability-document-selectors

Conversation

@toinehartman

@toinehartman toinehartman commented Jun 15, 2026

Copy link
Copy Markdown
Member
  1. Set document selectors for capabilities, such that capabilities can only be triggered on documents that support them. Especially useful when registering multiple languages.
  2. Dynamically register semantic highlighting capability (to test the former change, and make a start with registering all capabilities dynamically).
  3. Instead of toggling the language for open editors, request a refresh of the open editors via LSP. This prevents races where requests can come in while the file is 'closed'.

This PR is a preparation to easily enable #1117.

@toinehartman toinehartman self-assigned this Jun 15, 2026
@toinehartman toinehartman added the enhancement New feature or request label Jun 15, 2026
@toinehartman toinehartman changed the title Set document selectors on dynamic capabilities Dynamically register semantic highlighting capability Jun 17, 2026
@toinehartman toinehartman marked this pull request as ready for review June 17, 2026 08:26
@toinehartman toinehartman changed the title Dynamically register semantic highlighting capability Dynamically register semantic highlighting Jun 17, 2026
@toinehartman toinehartman changed the title Dynamically register semantic highlighting Document selectors for capabilities (+ dynamically register semantic highlighting) Jun 17, 2026

@DavyLandman DavyLandman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great! I have some small concerns.

Comment thread rascal-vscode-extension/src/lsp/ParameterizedLanguageServer.ts
@toinehartman toinehartman requested a review from DavyLandman June 17, 2026 15:34
@toinehartman toinehartman changed the title Document selectors for capabilities (+ dynamically register semantic highlighting) Document selectors for capabilities (+ dynamically register code lenses) Jun 18, 2026
@toinehartman toinehartman force-pushed the fix/capability-document-selectors branch from c6ab3b4 to 9cc7a34 Compare June 18, 2026 11:53
@toinehartman toinehartman changed the title Document selectors for capabilities (+ dynamically register code lenses) Document selectors for capabilities Jun 18, 2026
@toinehartman toinehartman enabled auto-merge June 22, 2026 08:25
@DavyLandman DavyLandman disabled auto-merge June 22, 2026 15:06
@DavyLandman DavyLandman merged commit 1ea0248 into main Jun 22, 2026
8 of 12 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants