Skip to content

Multiple session and request handling #2526

@rchl

Description

@rchl

The new version of Volar (Vue Language Features) is expected to run in Vue files alongside a typescript server (LSP-typescript, for example). This seems to create issues with handling of some requests since some requests are supposed to go to LSP-volar and some to LSP-typescript. For example within a script tag like:

<script lang="ts">
export default {
  methods: {
    getSomething(key: string): HTMLElement {
      // ...
    }
  }
}
</script>
  • "expand selection" request should go to LSP-volar
  • "go to definition" should go to LSP-typescript

We have prioritity_selector which can force all requests go to one or the other but in this case it doesn't help because we need different behavior for different requests and scopes are not sufficient for determining which one to trigger.

Observing VSCode, it seems like triggering "go to definition" triggers requests both to Volar (which returns an empty list) and its internal Typescript server (note that it's not technically LSP-based in there).

But then I also see some issues with expand selection in VSCode that I don't see in ST. For example here it incorrectly expands selection to just set or Timeout in setTimeout:

Screen.Recording.2024-10-04.at.10.33.28.mov

So not sure what is the best way for handling this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions