-
-
Notifications
You must be signed in to change notification settings - Fork 391
Provide explicit import in inlay hints #4235
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
Merged
Merged
Changes from 37 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
b7da1f5
Provide explicit import in inlay hints
jetjinser 3305973
Filter explict imports inlay hints by visible range
jetjinser 245049a
Update lsp dep by source-repository-package
jetjinser 0598138
Add test for hls-explicit-imports-plugin inlay hints
jetjinser a27c5c8
Comment inlay hints start position
jetjinser 6b3e5aa
Use `isSubrangeOf` to test if the range is visible
jetjinser f9f1207
Remove inlayHintsResolveProvider placeholder for now
jetjinser 8e28076
Use explicit InlayHintKind_Type
jetjinser d0f27c2
Revert "Update lsp dep by source-repository-package"
jetjinser 3e9d5a1
Combine InlayHints by sconcat them
jetjinser 8d94c51
Merge remote-tracking branch 'upstream/master' into inlay-hints-imports
jetjinser 2e869db
Merge remote-tracking branch 'upstream/master' into inlay-hints-imports
jetjinser dbd7508
compress multiple spaces in abbr import tilte
jetjinser d0fe221
update test to match inlay hints kind
jetjinser 75b0ecb
rename squashedAbbreviateImportTitle to abbreviateImportTitleWithoutM…
jetjinser e0543b9
Request inlay hints with testEdits
jetjinser a6b7556
ExplicitImports fallback to codelens when inlay hints not support
jetjinser 2085635
fix explicitImports inlayHints test
jetjinser ccf2d8f
simplify isInlayHintsSupported
jetjinser fb52cee
comment fallback
jetjinser 6e5f746
empty list instead of null codeLens
jetjinser f4c2ea2
clearify name `paddingLeft`
jetjinser 62a51ce
fix clientCapabilities
jetjinser f70e402
add test for inlay hints without its client caps
jetjinser 57ef0db
use codeActionNoInlayHintsCaps to avoid error
jetjinser f8b1993
simplify isInlayHintSupported
jetjinser a50b148
comment about paddingLeft
jetjinser af635f7
use null as inlay hints kind
jetjinser 0fab728
add tooltip for explicit imports inlay hints to improve UX
jetjinser 4c7313d
chore comments
jetjinser ffdb94c
refactor
jetjinser 0a876c3
comment InL [] to indicate no info
jetjinser c11e356
ignore refine inlay hints
jetjinser 599ebcf
add plcInlayHintsOn config
jetjinser 2a2b516
Merge remote-tracking branch 'upstream/master' into inlay-hints-imports
jetjinser 3e5b88f
update func-test
jetjinser 6cfafd5
keep order to make Parser works
jetjinser ce761e7
always provide refine in code lens
jetjinser 2f3b57b
Merge branch 'master' into inlay-hints-imports
michaelpj 64b9533
Merge branch 'master' into inlay-hints-imports
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Okay, so I think the only thing remaining here is that we were going to leave the refine import actions as code lenses, so we need to return them in both cases. And never return them for inlay hints.
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.
Should this be checked at lens resolve? If I want to know whether
ImportEdit
is explicit or refine, it seems that can't do it inlensProvider
.If I can't tell whether the
lensProvider
should respond at the time, then every import statement actually needs to be resolved even that is not refine. I'm worried this will rely on the expensive resolve.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.
Hmmm, that's annoying. I would have thought we could determine what type it is beforehand? Perhaps we need to tweak the rule to include that information?
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.
I think now should be okay.