-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement Inlay Hint capabilities #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements LSP 3.17 Inlay Hint capabilities, adding support for both client-to-server requests to fetch inlay hints and server-to-client refresh requests.
Key changes:
- Added
textDocument/inlayHintandinlayHint/resolverequest capabilities with concurrent resolution support - Implemented
workspace/inlayHint/refreshserver request handling - Provided a helper method
get_inlay_hint_labelfor convenient label extraction from hints
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/lsp_client/capability/request/inlay_hint.py |
Implements the main inlay hint request capability with support for fetching hints from a range and optionally resolving them concurrently, plus a helper to extract labels |
src/lsp_client/capability/request/__init__.py |
Exports the new WithRequestInlayHint capability class |
src/lsp_client/capability/server_request/inlay_hint_refresh.py |
Implements handling for server-initiated inlay hint refresh requests |
src/lsp_client/capability/server_request/__init__.py |
Exports the new WithRespondInlayHintRefresh capability class |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async def request_inlay_hint( | ||
| self, | ||
| file_path: AnyPath, | ||
| range: lsp_type.Range, |
Copilot
AI
Dec 22, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent import style: this file uses lsp_type.Range directly, while similar capability files like inline_value.py import Range from lsp_client.utils.types and use it without the prefix. For consistency with the codebase, consider importing Range directly and using it as range: Range.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
textDocument/inlayHintwith concurrent resolve support.workspace/inlayHint/refreshserver-to-client request.get_inlay_hint_labelhelper for easy label extraction.