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

Feat: lsp support complete for docstring #818

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

amyXia1994
Copy link
Contributor

@amyXia1994 amyXia1994 commented Oct 30, 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):

record ast node for doc in schema_stmt/rule_stmt/module:

  • kclvm/ast/src/ast.rs
  • kclvm/ast/src/tests.rs
  • kclvm/ast_pretty/src/node.rs
  • kclvm/parser/src/parser/module.rs
  • kclvm/parser/src/parser/stmt.rs
  • kclvm/sema/src/resolver/doc.rs
  • kclvm/sema/src/resolver/global.rs

snapshot update due to added doc node:

  • kclvm/parser/src/tests/snapshots/

docstring generation:

  • kclvm/sema/src/resolver/doc.rs

autocomplete on newline within empty docstring:

  • kclvm/tools/src/LSP/src/completion.rs
  • kclvm/tools/src/LSP/src/util.rs
  • kclvm/tools/src/LSP/src/test_data/completion_test/newline/docstring_newline.k

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

support auto-complete on newline within empty docstring

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

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

@Peefy Peefy added docs lsp and removed docs labels Oct 30, 2023
@Peefy Peefy added this to the v0.7.0 Release milestone Oct 30, 2023
@coveralls
Copy link
Collaborator

coveralls commented Oct 30, 2023

Pull Request Test Coverage Report for Build 6715050969

  • 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 87.82%

Totals Coverage Status
Change from base Build 6704930171: 0.0%
Covered Lines: 2300
Relevant Lines: 2619

💛 - Coveralls

@amyXia1994 amyXia1994 marked this pull request as ready for review October 31, 2023 15:46
Signed-off-by: xiarui.xr <xiarui1994@gmail.com>
Signed-off-by: xiarui.xr <xiarui1994@gmail.com>
@amyXia1994 amyXia1994 requested review from He1pa, Peefy, i-zhen and NeverRaR and removed request for He1pa October 31, 2023 15:52
Copy link
Contributor

@Peefy Peefy left a 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: xiarui.xr <xiarui1994@gmail.com>
@amyXia1994 amyXia1994 merged commit 1ca2144 into kcl-lang:main Nov 1, 2023
11 checks passed
@amyXia1994 amyXia1994 deleted the feat/lsp-complete-docstring branch November 1, 2023 03:28
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] docstring generating and auto-completing in LSP
3 participants