microsoft / microsoft/language-server-protocol

Server to client TextDocumentItem/

Open
#1,458 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I was curious if there were any plans for a server to client mechanism for sending TextDocumentItem's from server to client,
currently which I understand is only used for sending client documents to the server.

As well as a mechanism for specifying a uri for each active lsp presumably the uri could be sent to the client in the serverInfo of a InitializeResult from which a client can then recognize documents from the server inside TextDocumentIdentifiers. And a new request by which clients could retrieve a server document.

The LSP that I am working generates some extremely long diagnostics, unfortunately diagnostics are typically displayed by editors in a fashion which is only suitable for extremely short messages. In these cases of excessively long diagnostics, it would be nice if we could then refer to server generated documents via their URL in via the relatedDocuments component of the diagnostic.

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 reviewing the existing TextDocumentItem, InitializeResult, TextDocumentIdentifier, and diagnostic relatedDocuments concepts in the protocol specification. Determine how server-generated documents, per-server URIs, and a client retrieval request should be represented, then define the complete server-to-client flow and its compatibility implications.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.