-
Notifications
You must be signed in to change notification settings - Fork 124
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
feat: add inlay hints for function call args #1473
Conversation
64bb5cc
to
5df763d
Compare
CI failed. cc @shruti2522 |
@He1pa Could you help review it? |
You can rebase the main branch and fix the CI errors. |
Signed-off-by: shruti2522 <[email protected]> make fmt Signed-off-by: shruti2522 <[email protected]> add inlay hints for function call args Signed-off-by: shruti2522 <[email protected]>
9696de7
to
0173e80
Compare
for |
Yes. I have removed inlay hints for kwargs. |
Pull Request Test Coverage Report for Build 9804032628Details
💛 - Coveralls |
Signed-off-by: shruti2522 <[email protected]> remove inlay hints for kwargs Signed-off-by: shruti2522 <[email protected]> remove kw_name Signed-off-by: shruti2522 <[email protected]> fix ci Signed-off-by: shruti2522 <[email protected]> add inlay hints for function call args Signed-off-by: shruti2522 <[email protected]> make fmt Signed-off-by: shruti2522 <[email protected]> add inlay hints for function call args Signed-off-by: shruti2522 <[email protected]> test ci Signed-off-by: shruti2522 <[email protected]> test ci Signed-off-by: shruti2522 <[email protected]> fix indexing error Signed-off-by: shruti2522 <[email protected]> fix ci Signed-off-by: shruti2522 <[email protected]> update test snaps Signed-off-by: shruti2522 <[email protected]> fix ci Signed-off-by: shruti2522 <[email protected]> fix ci Signed-off-by: shruti2522 <[email protected]>
9273ba0
to
a2413aa
Compare
Pull Request Test Coverage Report for Build 9804032628Details
💛 - Coveralls |
Signed-off-by: shruti2522 <[email protected]>
fixed CI @Peefy |
Pull Request Test Coverage Report for Build 9804685946Details
💛 - Coveralls |
kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_0.snap
Outdated
Show resolved
Hide resolved
Signed-off-by: shruti2522 <[email protected]> remove inlay hints for system module functions Signed-off-by: shruti2522 <[email protected]> change function name Signed-off-by: shruti2522 <[email protected]> fix ci Signed-off-by: shruti2522 <[email protected]> remove hints for builtin func calls Signed-off-by: shruti2522 <[email protected]>
ab5d470
to
8ff1aaf
Compare
Signed-off-by: shruti2522 <[email protected]>
Pull Request Test Coverage Report for Build 9820424669Details
💛 - Coveralls |
kclvm/loader/src/snapshots/kclvm_loader__tests__builtin_call_2.snap
Outdated
Show resolved
Hide resolved
I think there is a small problem here that when a function parameter is input with a literal constant, there is actually no parameter symbol here, right? Can you provide more ideas or suggestions? cc @He1pa |
There should be an Expression Symbol |
Signed-off-by: shruti2522 <[email protected]>
if let TypeKind::Function(func_ty) = &ty.kind { | ||
let func_params = &func_ty.params; | ||
|
||
if func_params.is_empty() { |
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.
Why can not use do_arguments_symbol_resolve_with_hint
here?
Signed-off-by: shruti2522 <[email protected]>
I guess the snapshots suggest some position error is arising here, maybe the node key doesn't render the correct position of the arg.
Need some suggestions here to figure out the issue because the logic seems fine @Peefy @He1pa |
Two problems here:
The second question is a bit complicated for now, we can skip it.
You also need to modify the definition of hint in SymbolKind::Expression |
Signed-off-by: shruti2522 <[email protected]>
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.
LGTM
Signed-off-by: shruti2522 <[email protected]>
Signed-off-by: shruti2522 <[email protected]>
|
Pull Request Test Coverage Report for Build 9869717491Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Signed-off-by: shruti2522 <[email protected]>
Where is the inlayhint of |
cc @He1pa |
1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):
re [LFX] [Track] LSP inlayhint and hover content content optimization #1244
2. What is the scope of this PR (e.g. component or file name):
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):
no inlay hint for builtin functions and system module functions args:
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links: