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

[Enhancement] Add example highlight hover content for the schema definition doc. #1469

Closed
Peefy opened this issue Jul 3, 2024 · 3 comments · Fixed by #1828
Closed

[Enhancement] Add example highlight hover content for the schema definition doc. #1469

Peefy opened this issue Jul 3, 2024 · 3 comments · Fixed by #1828
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed lsp

Comments

@Peefy
Copy link
Contributor

Peefy commented Jul 3, 2024

There's example section in the schema doc

image

We need to add the example code in the whole doc hover.

image

@Peefy Peefy added lsp enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jul 3, 2024
@Stazz0
Copy link

Stazz0 commented Jul 6, 2024

Hello @Peefy I would like to work on this issue can you please guide me on how to get started to solve the issue?

@Peefy
Copy link
Contributor Author

Peefy commented Jul 6, 2024

Hello @Stazz0 You can add examples in the schema type here. https://github.com/kcl-lang/kcl/blob/main/kclvm/tools/src/LSP/src/hover.rs

@Siddhi-agg
Copy link
Contributor

Hey @Peefy, I would like to work on this.

I read through the hover.rs file and I think: To add an "Examples" section to the hover documentation if it exists in the schema documentation, we can modify the code where the schema documentation is processed.
Particularly, we can check for an "Examples" section in the schema documentation (and extract it in a different function) and append it to the docs vector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed lsp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants