Repository: kcl-lang/kcl-lang.io
Pull request #511: feat: add Helix IDE configuration instructions
Author: login: arichtman
Created: 2025-03-20T03:27:24Z | Merged: 2025-03-20T05:55:27Z

<!-- Thank you for contributing to KCL!

Note: 

1. With pull requests:

    - Open your pull request against "main"
    - Your pull request should have no more than two commits, if not you should squash them.
    - It should pass all tests in the available continuous integration systems such as GitHub Actions.
    - You should add/modify tests to cover your proposed code changes.
    - If your pull request contains a new feature, please document it on the README.

2. Please create an issue first to describe the problem.

    We recommend that link the issue with the PR in the following question.
    For more info, check https://kcl-lang.io/docs/community/contribute/
-->

#### 1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

- [ ] N
- [x] Y 

fix #510 
<!-- You can add issue references here. 
    e.g. 
    fix #123, re #123, 
    fix https://github.com/XXX/issues/44
-->

#### 2. What is the scope of this PR (e.g. component or file name):

<!-- You can add the scope of this change here. 
    e.g. 
    /src/server/core.rs,
    kcl-lang/kcl/src/parser 
-->

IDE documentation

#### 3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

<!-- You can choose a brief description here -->
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [ ] Contains experimental features
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [x] Other

<!-- You can add more details here.
    e.g. 
    Call method "XXXX" to ..... in order to ....,
    More details: https://XXXX.com/doc......
-->

#### 4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

- [x] N
- [ ] Y 

<!-- You can add more details here.
    e.g. 
    Calling method "XXXX" will cause the "XXXX", "XXXX" modules to be affected.
    More details: https://XXXX.com/doc......
-->

#### 5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

<!-- You can choose a brief description here -->
- [ ] Unit test
- [ ] Integration test
- [ ] Benchmark (add benchmark stats below)
- [ ] Manual test (add detailed scripts or steps below)
- [ ] Other

<!-- You can add more details here.
e.g. 
The test case in XXXX is used to .....
test cases in /src/tests/XXXXX
test cases https://github.com/XXX/pull/44
benchmark stats: time XXX ms
-->



Diff:
diff --git a/docs/tools/Ide/helix.md b/docs/tools/Ide/helix.md
new file mode 100644
index 00000000..29ccae27
--- /dev/null
+++ b/docs/tools/Ide/helix.md
@@ -0,0 +1,72 @@
+---
+sidebar_position: 4
+---
+
+# Helix
+
+## Quick Start
+
+- **Step 1.** [Install KCL](https://kcl-lang.io/docs/user_docs/getting-started/install) on your system. Please ensure that `kcl` and `kcl-language-server` are installed and added to your PATH:
+  On MacOS and Linux:
+
+  ```bash
+  which kcl
+  which kcl-language-server
+  ```
+
+  On Windows:
+
+  ```bash
+  where kcl
+  where kcl-language-server
+  ```
+
+- **Step 2.** Amend your Helix `languages.toml` file:
+  ```toml
+  [[language]]
+  name = "kcl"
+  scope = "source.k"
+  file-types = ["kcl", { glob = "*.k" } ]
+  roots = ["kcl.mod", "kcl.yaml"]
+  language-servers = ["kcl-lsp"]
+
+  [language-server.kcl-lsp]
+  command = "kcl-language-server"
+  ```
+- **Step 3.** Reopen Helix, create a KCL file, and begin your KCL journey!
+
+## Features
+
+This extension provides comprehensive coding assistance based on the Language Server Protocol.
+
+<!-- - **Highlighting:** Syntax and semantic highlighting -->
+- **Code Completion:** Completion for keywords, variable names, attributes, and more
+<!-- - **Goto definition:** Navigate to the definition of schema, variables, schema attributes, and imported packages -->
+- **Structure:** View the main definition (schema definition) and variables in KCL files
+- **Hover:** View identifier information (type and schema documentation)
+- **Diagnostics:** Detect warnings and errors in KCL files
+- **Code Action:** Quick fix for some errors
+- **InlayHint:** Display hints for variable type, functions, and schema arguments
+- **Format:** Format a KCL file or snippet code
+
+Other useful features such as diagnostics and testing are under development.
+
+## Dependencies
+
+We recommend using the latest version of KCL.
+
+## Known Issues
+
+See [here](https://github.com/kcl-lang/kcl/issues).
+
+## Ask for help
+
+If the extension does not behave as expected, please reach out to us through the [community](https://kcl-lang.io/docs/community/intro/support) for assistance.
+
+## Contributing
+
+We are actively working to enhance KCL development on Helix. We welcome all types of contributions. You can consult our [contribution guide](https://kcl-lang.io/docs/community/contribute), which explains how to build and run the extension locally and describes the contribution process.
+
+## License
+
+Apache License 2.0
diff --git a/docs/tools/Ide/index.md b/docs/tools/Ide/index.md
index ae961d20..b0cfa10c 100644
--- a/docs/tools/Ide/index.md
+++ b/docs/tools/Ide/index.md
@@ -5,3 +5,4 @@ We have provided three simple kinds of extensions for KCL. You can get more help
 - IntelliJ Extension: https://github.com/kcl-lang/intellij-kcl
 - VSCode Extension: https://github.com/kcl-lang/vscode-kcl
 - NeoVim Extension: https://github.com/kcl-lang/kcl.nvim
+- Helix Editor: https://github.com/helix-editor/helix


Reviews:
user: login: He1pa
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-20T03:33:49Z
user: login: arichtman
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-20T03:39:49Z
user: login: He1pa
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-20T03:48:25Z
user: login: arichtman
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-20T03:49:01Z
user: login: He1pa
body: lgtm
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-03-20T05:55:16Z

Review comments:
diff_hunk: @@ -0,0 +1,72 @@
+---
path: versioned_docs/version-0.11/tools/Ide/helix.md
user: login: He1pa
body: you should put the doc into docs/tools/Ide/  and update `index.md`, not in versioned_docs
created_at: 2025-03-20T03:33:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,72 @@
+---
path: versioned_docs/version-0.11/tools/Ide/helix.md
user: login: arichtman
body: Sure! I have moved the file and added something to `index.md`, I used a more specific link, but we can make it the Helix homepage if you prefer :)
created_at: 2025-03-20T03:39:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,72 @@
+---
path: versioned_docs/version-0.11/tools/Ide/helix.md
user: login: He1pa
body: maybe change to https://github.com/helix-editor/helix ?
created_at: 2025-03-20T03:48:25Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,72 @@
+---
path: versioned_docs/version-0.11/tools/Ide/helix.md
user: login: arichtman
body: Done!
created_at: 2025-03-20T03:49:01Z
author_association: CONTRIBUTOR

PR comments:
user: login: vercel[bot]
created_at: 2025-03-20T03:27:28Z
body: [vc]: #Mh+c47QIv3jdI5lQE6PXpskagBvo/12nDWzHII+YfMk=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJrY2wtbGFuZy1pbyIsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9wZWVmeXMtcHJvamVjdHMva2NsLWxhbmctaW8vQ21UcGdveXNtaEdYdXRYVDhoSFFEb1ZrS3QyOCIsInByZXZpZXdVcmwiOiJrY2wtbGFuZy1pby1naXQtZm9yay1hcmljaHRtYW4taGVsaXgtZWRpLWEzY2QzMC1wZWVmeXMtcHJvamVjdHMudmVyY2VsLmFwcCIsIm5leHRDb21taXRTdGF0dXMiOiJERVBMT1lFRCIsImxpdmVGZWVkYmFjayI6eyJyZXNvbHZlZCI6MCwidW5yZXNvbHZlZCI6MCwidG90YWwiOjAsImxpbmsiOiJrY2wtbGFuZy1pby1naXQtZm9yay1hcmljaHRtYW4taGVsaXgtZWRpLWEzY2QzMC1wZWVmeXMtcHJvamVjdHMudmVyY2VsLmFwcCJ9LCJyb290RGlyZWN0b3J5IjpudWxsfV19
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **kcl-lang-io** | ✅ Ready ([Inspect](https://vercel.com/peefys-projects/kcl-lang-io/CmTpgoysmhGXutXT8hHQDoVkKt28)) | [Visit Preview](https://kcl-lang-io-git-fork-arichtman-helix-edi-a3cd30-peefys-projects.vercel.app) | 💬 [**Add feedback**](https://vercel.live/open-feedback/kcl-lang-io-git-fork-arichtman-helix-edi-a3cd30-peefys-projects.vercel.app?via=pr-comment-feedback-link) | Mar 20, 2025 4:21am |


author_association: NONE
user: login: He1pa
created_at: 2025-03-20T03:30:25Z
body: Thank you for your contribution
author_association: CONTRIBUTOR