Skip to content

Only sends a textDocument/documentHighlight request when on an identifier #127007

@Veykril

Description

@Veykril

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.57.1

VSCode doesn't seem to send a textDocument/documentHighlight request when the cursor isn't on an identifier(whatever this means to vscode). The LSP documentation doesn't state that this request should only be sent in that case though.

The document highlight request is sent from the client to the server to resolve a document highlights for a given text document position.
https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentHighlight

We ran into this in rust-analyzer when trying to highlight exit points, which in rust can have the form of a simple ? character. So having the cursor on this character currently can't trigger the highlight. rust-lang/rust-analyzer#9375

Metadata

Metadata

Assignees

No one assigned

    Labels

    editor-contribEditor collection of extrasfeature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions