-
Notifications
You must be signed in to change notification settings - Fork 327
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
Extra semanticTokens requests in a multiroot workspace #1487
Comments
Worth pointing out that the Ruby LSP spawns separate language servers for each configured workspace. Each one of the clients has their document selector configured to only handle requests for the specific workspace they are related to. All other requests work as expected: each language server only receives requests for files that are inside their workspace. Except for semantic highlighting, which seems to be sent to all servers despite the document selector. |
Is this still an issue? If so, what document selectors are you using for the different workspace folders? |
Yes, it still happens. In fact, we started noticing that code snippets in Copilot Chat also trigger a semantic highlighting request before ever sending a Just recently, we tried to limit our document selector to only the Our document selector is configured like this (simplified): const selector = [
// Selectors for documents inside the workspace for `ruby` and `erb`
{ scheme: "file", language: "ruby", pattern: `${workspaceFolder.uri.fsPath}/**/*` },
{ scheme: "git", language: "ruby", pattern: `${workspaceFolder.uri.fsPath}/**/*` },
{ scheme: "file", language: "erb", pattern: `${workspaceFolder.uri.fsPath}/**/*` },
{ scheme: "git", language: "erb", pattern: `${workspaceFolder.uri.fsPath}/**/*` },
// Selectors for unsaved files
{ scheme: "untitled", language: "ruby" },
{ scheme: "untitled", language: "erb" },
// Selectors for bundled gem dependencies
{ scheme: "file", language: "ruby", pattern: `${home}/.gem/ruby/${rubyVersion}/gems/**/*` },
// Selectors for default gem dependencies
{ scheme: "file", language: "ruby", pattern: `${home}/.rubies/${rubyVersion}/lib/gems/**/*` },
] Each workspace can have its own set of dependencies and it's possible to configure their installation path completely differently. For example, you can have a workspace that installs all dependencies under However, we see these extra semantic highlighting requests for files inside the workspaces or for the Copilot Chat snippets, not for files in dependencies. |
Regarding I will look into why the sematic color request is not scoped correctly |
👋
I'm a maintainer on Ruby LSP.
I have a multiroot repo with two apps,
app1
andapp2
. https://github.com/andyw8/multiroot_monorepoWhile a file from
app1
is open, the logs show all requests going toapp1
, as expected, except for one type of request,semanticTokens
:This happens even if I have no files from
app2
open.Is there something special about
semanticTokens
that might cause it to behave that way?(I can provide further information to help troubleshoot, but wanted to ask this up-front in case there's a simple answer).
cc @vinistock
The text was updated successfully, but these errors were encountered: