microsoft / microsoft/multilspy

Searching for symbols directly

Open
#40 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
610
Forks
111
PR merge metrics
No merged PRs in 30d

Description

Hello,

Thank you for the great code!

I was wondering if there is a way to search for a symbol directly instead of pointing to file and line number where that symbol is mentioned.

For eg:
Currently

lsp.request_definition("myfile.py", 10, 2)

searches for the symbol (say something called SymbolName) that is mentioned in the 11th line, and 3rd character. I would like to check if something like lsp.request_definition("SymbolName") is possible.

Thank you!
Edit:

LSP specification seems to do something for this: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_symbol

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 request_definition API and the linked LSP workspace/symbol specification. Determine how a symbol-name search should fit the client interface and language-server requests; done means callers can search by symbol directly with documented, tested behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools, search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.