microsoft / microsoft/language-server-protocol

server->client "show location list" request

Open
#1,148 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

idea
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

codeAction and codeLens are valuable generic hooks for the server to provide features.
These features are limited by what actions LSP allows the server to trigger on the client.

Today the most useful are: applyTextEdits, showMessage, showDocument (new, thanks!).
It'd be a nice addition to be able to publish a list of locations, similar to how textDocument/references results are displayed.

The most obvious use case: "show references" is the stock example of a code lens, but can't be implemented directly in LSP today. (It requires some extension like a known Command name that is handled by an editor plugin).
#788 suggests to standardize some such Commands, but a server->client request would be more composable, easier to document, be guarded by capabilities in a better-understood way, etc.

(clangd is considering implementing this as an extension as part of our codeLens support, in order to clearly document what client support is required)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing codeAction, codeLens, applyTextEdits, showMessage, showDocument, and textDocument/references protocol definitions. Define the server-to-client location-list request, including capability handling and how results should be displayed, so the behavior is composable and clearly documented.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.