Skip to content
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

[WIP] Feat(LSP): Semamtic token provider (#297) #432

Closed
wants to merge 1 commit into from

Conversation

He1pa
Copy link
Contributor

@He1pa He1pa commented Mar 2, 2023

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

2. What is the scope of this PR (e.g. component or file name):

LSP Server

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

Add semantic token provider to LSP Server, used to semantic highlight

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

6. Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@He1pa He1pa self-assigned this Mar 2, 2023
@He1pa He1pa added ide Issues or PRs related to kcl LSP and IDE plugins feat lsp labels Mar 2, 2023
@coveralls
Copy link
Collaborator

coveralls commented Mar 2, 2023

Pull Request Test Coverage Report for Build 4313896503

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.562%

Totals Coverage Status
Change from base Build 4310888046: 0.0%
Covered Lines: 1612
Relevant Lines: 1780

💛 - Coveralls

};

#[test]
fn test_resolve_program() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/test_resolve_program/test_imcomplete_semantic_tokens

@Peefy
Copy link
Contributor

Peefy commented Mar 2, 2023

  1. I suggest that like the KCL dependency analysis tool, this is the same for LSP. First, establish a Virtual File System (VFS), and build an overall workspace in the system through a monitor. Secondly, collect all compilation units according to kcl.yaml files lazily and detect file modification behaviors such as adding, deleting, and modifying files. Ref: [Enhancement][Track] A better KCL compiler frontend technology architecture for the LSP tool and IDE extensions #420 and https://github.com/KusionStack/kclvm-go/blob/main/pkg/tools/list/dep_parser.go#L52
  2. You MUST avoid calling the unwrap() function in server code and using Result to deal errors.

@Peefy Peefy added this to the v0.4.6 Release milestone Mar 2, 2023
@He1pa He1pa changed the title Feat(LSP): Semamtic token provider (#297) [WIP] Feat(LSP): Semamtic token provider (#297) Mar 8, 2023
@He1pa He1pa marked this pull request as draft March 8, 2023 09:00
@Peefy Peefy modified the milestones: v0.4.6 Release, v0.5.0 Release Apr 10, 2023
@Peefy Peefy closed this May 9, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat ide Issues or PRs related to kcl LSP and IDE plugins lsp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants