Skip to content

Queryable References#2202

Draft
ratzdi wants to merge 3 commits intomicrosoft:gh-pagesfrom
ratzdi:issue_1911
Draft

Queryable References#2202
ratzdi wants to merge 3 commits intomicrosoft:gh-pagesfrom
ratzdi:issue_1911

Conversation

@ratzdi
Copy link
Copy Markdown

@ratzdi ratzdi commented Nov 25, 2025

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
Copy link
Copy Markdown
Author

ratzdi commented Nov 25, 2025

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

@dbaeumer
Copy link
Copy Markdown
Member

dbaeumer commented Dec 1, 2025

@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 dbaeumer added the info-needed Issue requires more information from poster label Dec 1, 2025
@ratzdi
Copy link
Copy Markdown
Author

ratzdi commented Dec 2, 2025

Hi @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

dbaeumer commented Dec 9, 2025

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 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