-
Notifications
You must be signed in to change notification settings - Fork 117
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: lsp hover keyword highlight #1331
Conversation
d360af1
to
182f217
Compare
Pull Request Test Coverage Report for Build 9188427383Warning: 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 |
59c63ac
to
69f9492
Compare
e6e9281
to
31ee8c3
Compare
42370e8
to
09fe9ba
Compare
Hello @shruti2522 The hover content expect a right kcl code form with indentation like the rust-analyzer does. Furthermore, I do not believe that adding ````kcl` is the correct approach for two reasons
cc @He1pa |
5830195
to
2446911
Compare
You dont need to follow the previous stlpe, and the
Now can be rendered as
doc
|
updated doc style @He1pa |
@shruti2522 |
Done @Peefy |
According to the review comments, what I mean is to merge the content of the schema doc hover instead of merging the content of the docs to hover. |
If I understand correctly, what I need to do is to merge all the contents of docs into one such that the complete hover content is displayed as one without any separating lines? @Peefy |
Just merge the schema doc instead of merge all docs in |
Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> kcl formatting Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test cases Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> test check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> add markup Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> resolved func formatting error Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test cases Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test cases for tests.rs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> syntax highlighting with LanguageString Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test case Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests.rs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fixed ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> add pkgpath without override Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated completion.rs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests.rs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated doc style Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated comment Signed-off-by: shruti2522 <shruti.apc01@gmail.com> added indentation for attrs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> merge schema attr docs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> update hover def comment Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> render doc at end Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> removed additional def Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix dict_key_in_schema test Signed-off-by: shruti2522 <shruti.apc01@gmail.com> merged rest_sign and attr Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fixed ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
6ce99d9
to
4cda335
Compare
Done with the changes @Peefy |
PR conflict |
Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> kcl formatting Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test cases Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> test check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> add markup Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> resolved func formatting error Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test cases Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test cases for tests.rs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> syntax highlighting with LanguageString Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated test case Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests.rs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fixed ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> add pkgpath without override Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated completion.rs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests.rs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated doc style Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated comment Signed-off-by: shruti2522 <shruti.apc01@gmail.com> added indentation for attrs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> merge schema attr docs Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> update hover def comment Signed-off-by: shruti2522 <shruti.apc01@gmail.com> updated tests Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> render doc at end Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> removed additional def Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fix dict_key_in_schema test Signed-off-by: shruti2522 <shruti.apc01@gmail.com> merged rest_sign and attr Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fixed ci Signed-off-by: shruti2522 <shruti.apc01@gmail.com> fmt check Signed-off-by: shruti2522 <shruti.apc01@gmail.com> feat: syntax highlighting for hover content Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
Resolved conflicts @Peefy |
Hello @shruti2522 Add some comments. |
Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
Hello @shruti2522 Add some comments and CI failed. |
Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
CI shows:
but the expected value in
|
This indicates that there is an issue with the implementation logic of the hover in this PR. Please carefully check the code. @shruti2522 |
All checks have passed @Peefy |
Although all the test cases have been passed, I believe there is an issue with the implementation of docs_to_hover, which resulted in incorrect test cases. Please refer to the review comments for modifications. cc @He1pa Could you please check it again? |
Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
I have updated the test cases in hover to use |
Signed-off-by: shruti2522 <shruti.apc01@gmail.com>
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
1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):
fix [LFX PreTest] pretest for LFX LSP hover content #1304
2. What is the scope of this PR (e.g. component or file name):
kcl/kclvm/tools/src/LSP/src/hover.rs
kcl/kclvm/sema/src/ty/mod.rs
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):
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:
cc @He1pa @Peefy