Skip to content

Queryable References - #2202

Draft
Dimitri Ratz (ratzdi) wants to merge 3 commits into
microsoft:gh-pagesfrom
ratzdi:issue_1911
Draft

Queryable References#2202
Dimitri Ratz (ratzdi) wants to merge 3 commits into
microsoft:gh-pagesfrom
ratzdi:issue_1911

Conversation

@ratzdi

@ratzdi Dimitri Ratz (ratzdi) commented Nov 25, 2025

Copy link
Copy Markdown

A proposal for #1911. Introduced Reference as new response type in the method references. Extended ReferenceParams with array of reference kinds to filter by.

- Introduced query-able Reference interface
- Introduced Reference as new response type in the method references
- Extended ReferenceParams
@ratzdi

Dimitri Ratz (ratzdi) commented Nov 25, 2025

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree
@microsoft-github-policy-service agree [company="Dimitri Ratz"]

@dbaeumer

Copy link
Copy Markdown
Member

Dimitri Ratz (@ratzdi) besides adding something to the spec we also require a client and server implementation to prove the usefulness. Is something like this available?

@dbaeumer Dirk Bäumer (dbaeumer) added the info-needed Issue requires more information from poster label Dec 1, 2025
@ratzdi

Copy link
Copy Markdown
Author

Hi Dirk Bäumer (@dbaeumer), not yet, but would it be enough if we implement the proposal on the server side in Clangd and on the client side in LSP4E/CDT LSP?

@dbaeumer

Copy link
Copy Markdown
Member

Yes, we don't have requirements for clients / servers.

This being said I am not a fan of the long list of reference kinds. That one is hard to maintain across different languages. A tag model would be better IMO.

@dbaeumer Dirk Bäumer (dbaeumer) added feature-request Request for new features or functionality references and removed info-needed Issue requires more information from poster labels Dec 9, 2025
@qouteall

Copy link
Copy Markdown

For the ReferenceKind thing, I think it needs to add other reference kinds:

  • For field: field initialization. I think field initialization should be different to field write.
  • Import
  • Re-export
  • For type: usage as type parameter
  • For type: type alias

And there are many other language-specific things. For example in Java a type can be used in .class. In Rust there are immutable borrow usages and mutable borrow usages. I think not hardcoding all reference kinds in LSP is more extensible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-request Request for new features or functionality references

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants