microsoft / microsoft/language-server-protocol

Feature Proposal: Support for batch requests of `DocumentSymbol`s

Open
#1,533 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I have a use case where I need to request DocumentSymbol of large number of files on one go for my Vscode Extension.

I have looked into LSP documentation and Vscode's, and as far as I could tell... there does not seem to be a supported mechanism to do this directly. I looked at:

Workspace request is not useful for me as it does not return the DocumentSymbol hierarchy which is crucial for my work.

I resorted to implementing some sort of batch processing where I go over all the source files I need, sending a DocumentSymbol request for each. The solution works with different languages I tried, but it is far from perfect and I am wondering if LSP community would consider supporting such a feature in the near future?

Considering the performance load it would put on servers, I suppose it could be implemented with some sort of latent response mechanism.

Note: there's a related request on vscode repo.

Any thoughts or tips, please?

Thank you
Mujtaba

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 with the linked LSP Document Symbols Request and Workspace Symbols specifications, then review the related VS Code issue 157203. Clarify the batch request semantics, response behavior, and performance expectations; done would be a concrete, community-agreed protocol proposal.

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
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.