LanguageServer.jl icon indicating copy to clipboard operation
LanguageServer.jl copied to clipboard

Add support for textDocument/selectionRange request

Open cloudgiant opened this issue 5 years ago • 0 comments

The language server currently doesn't support textDocument/selectionRange requests (https://microsoft.github.io/language-server-protocol/specification#textDocument_selectionRange), which leads to weird selection expansions when using expand|shrink selection actions (See: https://github.com/julia-vscode/julia-vscode/issues/1260). This request would enable the editors to do proper semantic selection for Julia with expand|shrink selection actions.

Helpful links Implementation example from the official vscode json language server

  • Request listener: https://github.com/vscode-langservers/vscode-json-languageserver/blob/a9ddf7bf567c48ee3d74c7f49e9085f2beb4b572/src/jsonServerMain.ts#L509-L518
  • getSelectionRange() function: https://github.com/microsoft/vscode-json-languageservice/blob/db832ca6a9dec1693f70af575003e3beb34100d0/src/services/jsonSelectionRanges.ts#L11

cloudgiant avatar May 30 '20 22:05 cloudgiant