Skip to content

Commit 68dc0ec

Browse files
committed
chore: sync latest doc to 0.10.0
Signed-off-by: peefy <[email protected]>
1 parent 8d0062b commit 68dc0ec

File tree

10 files changed

+116
-77
lines changed

10 files changed

+116
-77
lines changed

blog/2024-09-18-kcl-0.10.0-release/index.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,7 @@ For JSON Schema containing AllOf validation fields:
156156
"minimum": 0
157157
}
158158
},
159-
"required": [
160-
"name"
161-
]
159+
"required": ["name"]
162160
}
163161
```
164162

@@ -221,7 +219,7 @@ kcl mod add cc --git https://github.com/kcl-lang/flask-demo-kcl-manifests.git --
221219
- The package management tool fixes the missing default dependencies in the kcl.mod.
222220
- The package management tool fixes the calculation error of the vendor path, which causes the third-party library to be re-downloaded.
223221
- The package management tool fixes the failure to push the OCI registry with the https protocol.
224-
- The package management tool fixes the compilation failure when compiling multiple *.k files.
222+
- The package management tool fixes the compilation failure when compiling multiple \*.k files.
225223
- The package management added more test cases.
226224
- The package management tool fixed the circular dependency issue caused by adding the git subpackage multiple times as a dependency.
227225
- The package management tool fixed the missing dependencies path when use the `kcl mod metadata` command.
@@ -300,7 +298,7 @@ a = file.current()
300298
After compiling, you can get the following result:
301299

302300
```kcl
303-
a: /Users/xxx/xxx/main.k
301+
a: /Users/xxx/xxx/main.k
304302
```
305303

306304
- KCL added some built-in APIs parameters to support the encoding parameter.

docs/tools/Ide/intellij.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 3
66

77
## Quick Start
88

9-
- **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:
9+
- **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:
1010
On MacOS and Linux:
1111

1212
```bash

docs/tools/Ide/vs-code.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar_position: 1
66

77
## Quick Start
88

9-
- **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:
9+
- **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:
1010
On MacOS and Linux:
1111

1212
```bash

i18n/zh-CN/docusaurus-plugin-content-blog/2024-09-18-kcl-0.10.0-release/index.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
slug: 2024-07-05-kcl-0.10.0-release
2+
slug: 2024-09-18-kcl-0.10.0-release
33
title: KCL v0.10.0 重磅发布 - 更稳定流畅的工具链和 IDE 体验,全新的 KCL Playground !
44
authors:
55
name: KCL Team
@@ -91,7 +91,7 @@ schema Deployment:
9191
- 修复 as 关键字在外部包存在时类型转换的错误
9292
- 修复在 lambda 函数中 config 到 schema 的类型检查错误
9393
- 优化函数参数调用/返回值 Dict 转 Schema 类型推导和检查,可以省略 Schema 名称简化配置书写
94-
- 赋值语句支持形如 _config["key"] = "value" 或 _config.key = "value"的语法对配置进行原地修改
94+
- 赋值语句支持形如 \_config["key"] = "value" 或 \_config.key = "value"的语法对配置进行原地修改
9595
- 优化配置合并运算符的类型检查,可以在编译时发现更多类型错误
9696
- 修复了 built-in API datetime 中日期格式的问题。
9797
- 修复了 Schema 配置合并参数解析错误的问题。
@@ -156,9 +156,7 @@ PASS: 1/1
156156
"minimum": 0
157157
}
158158
},
159-
"required": [
160-
"name"
161-
]
159+
"required": ["name"]
162160
}
163161
```
164162

@@ -224,7 +222,7 @@ kcl mod add cc --git https://github.com/kcl-lang/flask-demo-kcl-manifests.git --
224222
- 包管理工具修复了多次添加 git 子包作为依赖时导致的循环依赖问题。
225223
- 包管理工具修复了 metadata 中三方库依赖路径丢失的问题。
226224
- 包管理工具 Add, Update 命令预载了 MVS 版本管理算法,通过环境变量 SupportMVS=true 控制开启。
227-
- 包管理工具修复了编译多个 *.k 文件失败的 bug。
225+
- 包管理工具修复了编译多个 \*.k 文件失败的 bug。
228226
- 包管理工具新增部分测试用例。
229227
- KCL tree-sitter 新增 sequence operations, selector 支持。
230228
- KCL tree-sitter 优化了部分语法规则,添加了更多测试用例。

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/tools/Ide/intellij.md

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,59 @@ sidebar_position: 3
44

55
# IntelliJ IDEA
66

7-
我们提供了两个版本的 IntelliJ KCL 插件
7+
## 快速开始
88

9-
- IntelliJ KCL: 基础版本的 KCL 插件提供了语法高亮和补全的基础能力,可以在更多版本使用。
9+
- **1.** [安装 KCL](https://kcl-lang.io/docs/user_docs/getting-started/install) 并检查 `kcl``kcl-language-server` 命令在您的 PATH 中:
10+
在 MacOs 和 Linux中:
1011

11-
- IntelliJ KCL LSP: 基于 [LSP(Language Server Protocol)](https://code.visualstudio.com/api/language-extensions/language-server-extension-guide) 实现的 KCL 插件提供了更多功能,如错误提示,智能补全,悬停等功能。但因为一些[原因](https://plugins.jetbrains.com/docs/intellij/language-server-protocol.html#supported-ides),只能在特定版本中使用。
12+
```bash
13+
which kcl
14+
which kcl-language-server
15+
```
1216

13-
> 与 Language Server Protocol 的集成是作为基于 IntelliJ 的付费 IDE 的扩展而创建的。 因此,使用 LSP 集成的插件在 JetBrains 产品和 Google 的 Android Studio 的社区版本中不可用。
14-
> 从 2023.2 发布周期开始,LSP API 作为 IntelliJ 平台的一部分在以下 IDE 中公开提供:IntelliJ IDEA Ultimate、WebStorm、PhpStorm、PyCharm Professional、DataSpell、RubyMine、CLion、Aqua、DataGrip、GoLand、Rider 和 RustRover.
17+
在 Windows 中:
1518

16-
## IntelliJ KCL
19+
```bash
20+
where kcl
21+
where kcl-language-server
22+
```
1723

18-
基础版本的 KCL 插件可以直接在 IntelliJ 的插件市场下载使用。基础版本提供了语法高亮和关键字补全的能力
19-
![intellij](/img/docs/tools/Ide/intellij/kcl.png)
24+
- **2.** 安装 [IntelliJ IDEA KCL 插件](https://plugins.jetbrains.com/plugin/23378-kcl).
25+
- **3.** 重新打开 IntelliJ IDEA 并创建一个 KCL 文件验证 IDE 插件功能
2026

21-
## IntelliJ KCL KCL
27+
## Features
2228

23-
基于 LSP 版本的插件可以从插件市场下载
29+
此插件基于 LSP 提供了许多编码帮助,包括以下功能:
2430

25-
![intellij](/img/docs/tools/Ide/intellij/kcl-lsp.png)
31+
- **高亮:** 语法和语义高亮
32+
- **补全:** 关键字,变量名,属性等补全
33+
- **跳转:** schema 定义,变量,schema 属性等跳转
34+
- **大纲:** 显示 KCL 文件中的 schema 和 变量定义
35+
- **悬停:** Identifier 信息 (type 和 schema 文档)
36+
- **诊断:** KCL 文件中的警告和错误信息
37+
- **快速修复:** 对一些错误进行快速修复
38+
- **内联提示:** 变量类型,函数和 schema 参数等提示
2639

27-
除此之外,您还需要[安装 kcl-language-server](https://www.kcl-lang.io/docs/user_docs/getting-started/install#install-language-server) 并检查 `kcl-language-server` 命令在您的 PATH 中:
28-
在 MacOs 和 Linux中:
40+
其他一些有用的功能,如代码重构和智能感知等正在开发中。
2941

30-
```bash
31-
which kcl-language-server
32-
```
42+
## 最小依赖
3343

34-
在 Windows 中:
44+
我们建议您使用最新版本的 KCL,但此扩展所需的 KCL 最低版本为 v0.4.6。如果您使用的是更早期版本,则此扩展可能无法正常工作。
3545

36-
```bash
37-
where kcl-language-server
38-
```
46+
IntelliJ IDEA 的最低版本为 2022.1
3947

40-
注意,LSP 版本的插件不一定在所有版本的 IntelliJ IDE 中可以使用。
48+
## 已知问题
49+
50+
[详见](https://github.com/kcl-lang/kcl/issues)
51+
52+
## 寻求帮助
53+
54+
如果扩展没有如您所期望的那样工作,请通过[社区](https://kcl-lang.io/docs/community/intro/support)与我们联系和寻求帮助。
55+
56+
## 参与贡献
57+
58+
目前我们正在积极改进 KCL IDE 插件体验,欢迎参考[贡献指南](https://kcl-lang.io/docs/community/contribute) 一起共建!
59+
60+
## 许可
61+
62+
Apache License 2.0

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/tools/Ide/vs-code.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ sidebar_position: 1
5858

5959
## 已知问题
6060

61-
[详见](https://github.com/kcl-lang/kcl/issues/524)
61+
[详见](https://github.com/kcl-lang/kcl/issues)
6262

6363
## 寻求帮助
6464

6565
如果扩展没有如您所期望的那样工作,请通过[社区](https://kcl-lang.io/docs/community/intro/support)与我们联系和寻求帮助。
6666

6767
## 参与贡献
6868

69-
目前 VS Code KCL 插件处于早期版本,我们正在积极改进 VS Code KCL 插件体验,欢迎参考[贡献指南](https://kcl-lang.io/docs/community/contribute) 一起共建!
69+
目前我们正在积极改进 KCL IDE 插件体验,欢迎参考[贡献指南](https://kcl-lang.io/docs/community/contribute) 一起共建!
7070

7171
## 许可
7272

i18n/zh-CN/docusaurus-plugin-content-docs/version-0.10/user_docs/getting-started/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,6 @@ KCL 为 VS Code 本地版本提供了插件支持,并提供了高亮、自动
216216

217217
#### IntelliJ IDEA
218218

219-
我们提供了两个版本的 Intellij 插件。您可以[点击这里](/docs/tools/Ide/vs-code)了解更多。
219+
KCL 为 IntelliJ IDEA 提供了插件支持。您可以[点击这里](/docs/tools/Ide/intellij)了解更多。
220220

221221
![intellij](/img/docs/tools/Ide/intellij/overview.png)

versioned_docs/version-0.10/tools/Ide/intellij.md

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,59 @@ sidebar_position: 3
44

55
# IntelliJ IDEA
66

7-
We provide two IntelliJ KCL plugins:
7+
## Quick Start
88

9-
- IntelliJ KCL: The basic version of the KCL plugin provides syntax highlighting and keyword completion. It is compatible with multiple versions of IntelliJ IDE.
10-
- IntelliJ KCL LSP: This plugin is implemented based on the [Language Server Protocol(LSP)](https://code.visualstudio.com/api/language-extensions/language-server-extension-guide) and offers additional features such as diagnostics, completion, and hovering. However, due to certain limitations, it can only be used with specific versions.
9+
- **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:
10+
On MacOS and Linux:
1111

12-
> The integration with the Language Server Protocol is created as an extension to the paid IntelliJ-based IDEs. Therefore, plugins using Language Server integration are not available in Community releases of JetBrains products and Android Studio from Google.
13-
> Starting with the 2023.2 release cycle, the LSP API is publicly available as part of the IntelliJ Platform in the following IDEs: IntelliJ IDEA Ultimate, WebStorm, PhpStorm, PyCharm Professional, DataSpell, RubyMine, CLion, Aqua, DataGrip, GoLand, Rider, and RustRover.
12+
```bash
13+
which kcl
14+
which kcl-language-server
15+
```
1416

15-
## IntelliJ KCL
17+
On Windows:
1618

17-
The basic version of the KCL plugin can be directly downloaded and used from the IntelliJ Plugin Marketplace. It provides syntax highlighting and keyword completion.
18-
![intellij](/img/docs/tools/Ide/intellij/kcl.png)
19+
```bash
20+
where kcl
21+
where kcl-language-server
22+
```
1923

20-
## IntelliJ KCL LSP
24+
- **Step 2.** Install the [KCL plugin](https://plugins.jetbrains.com/plugin/23378-kcl) from the Jetbrains Plugins Marketplace.
25+
- **Step 3.** Reopen IntelliJ IDEA, create a KCL file, and begin your KCL journey!
2126

22-
> Please note that the LSP version of the plugin may not be available in all versions of IntelliJ IDE.
23-
> [https://plugins.jetbrains.com/docs/intellij/language-server-protocol.html#supported-ides]
27+
## Features
2428

25-
IntelliJ KCL LSP also can be downloaded from the plugin marketplace
29+
This extension provides comprehensive coding assistance based on the Language Server Protocol.
2630

27-
![intellij](/img/docs/tools/Ide/intellij/kcl-lsp.png)
31+
- **Highlighting:** Syntax and semantic highlighting
32+
- **Code Completion:** Completion for keywords, variable names, attributes, and more
33+
- **Goto definition:** Navigate to the definition of schema, variables, schema attributes, and imported packages
34+
- **Structure:** View the main definition (schema definition) and variables in KCL files
35+
- **Hover:** View identifier information (type and schema documentation)
36+
- **Diagnostics:** Detect warnings and errors in KCL files
37+
- **Code Action:** Quick fix for some errors
38+
- **InlayHint:** Display hints for variable type, functions, and schema arguments
2839

29-
Additionally, you need to install the [kcl-language-server](https://www.kcl-lang.io/docs/user_docs/getting-started/install#install-language-server) and verify that the `kcl-language-server` command is in your PATH. Here are the steps for different operating systems:
40+
Other useful features such as diagnostics and testing are under development.
3041

31-
For macOS and Linux:
42+
## Dependencies
3243

33-
```bash
34-
which kcl-language-server
35-
```
44+
We recommend using the latest version of KCL, but the minimum required version for this extension is 0.4.6. If you are using an earlier version, the extension may not work properly.
3645

37-
For Windows:
46+
The minimum required version for IntelliJ IDEA is 2022.1.
3847

39-
```bash
40-
where kcl-language-server
41-
```
48+
## Known Issues
49+
50+
See [here](https://github.com/kcl-lang/kcl/issues).
51+
52+
## Ask for help
53+
54+
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.
55+
56+
## Contributing
57+
58+
We are actively working to enhance KCL development on VS Code. 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.
59+
60+
## License
61+
62+
Apache License 2.0

versioned_docs/version-0.10/tools/Ide/vs-code.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@ sidebar_position: 1
66

77
## Quick Start
88

9-
- **Step 1.** [Install KCL](https://kcl-lang.io/docs/user_docs/getting-started/install) on your system. Please check that `kcl` and `kcl-language-server` are installed and have been added to your PATH:
10-
In MacOs and Linux:
9+
- **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:
10+
On MacOS and Linux:
1111

1212
```bash
1313
which kcl
1414
which kcl-language-server
1515
```
1616

17-
In Windows:
17+
On Windows:
1818

1919
```bash
2020
where kcl
2121
where kcl-language-server
2222
```
2323

2424
- **Step 2.** Install the [KCL extension](https://marketplace.visualstudio.com/items?itemName=kcl.kcl-vscode-extension) for Visual Studio Code. This extension requires the VS Code 1.50+.
25-
- **Step 3.** Reopen VS Code and create a KCL file and begin your KCL tour!
25+
- **Step 3.** Reopen VS Code, create a KCL file, and begin your KCL journey!
2626

2727
## Features
2828

2929
This extension provides some coding assistance, including the following features:
3030

31-
- **Syntax Highlight:**
31+
- **Highlighting:**
3232
![Highlight](/img/docs/tools/Ide/vs-code/Highlight.png)
33-
- **Goto Definition:** Goto definition of schema, variable, schema attribute, map key and import pkg.
33+
- **Goto Definition:** Navigate to the definition of schema, variables, schema attributes, and imported packages
3434
![Goto Definition](/img/docs/tools/Ide/vs-code/GotoDef.gif)
35-
- **Completion:** Completion for keywords, dot(`.`), variables and schema attribute.
35+
- **Completion:** Completion for keywords, variable names, attributes, and more
3636
![Completion](/img/docs/tools/Ide/vs-code/Completion.gif)
37-
- **Outline:** Main definition(schema def) and variables in KCL file.
37+
- **Outline:** View the main definition (schema definition) and variables in KCL files
3838
![Outline](/img/docs/tools/Ide/vs-code/Outline.gif)
39-
- **Hover:** Identifier information (type, function signature and documents).
39+
- **Hover:** View identifier information (type and schema documentation)
4040
![Hover](/img/docs/tools/Ide/vs-code/Hover.gif)
41-
- **Diagnostics:** Warnings and errors in KCL file.
41+
- **Diagnostics:** Detect warnings and errors in KCL files
4242
![Diagnostics](/img/docs/tools/Ide/vs-code/Diagnostics.gif)
4343

4444
> Tips: You can enhance the effect of diagnostics by installing another extension: [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens).
@@ -47,26 +47,26 @@ This extension provides some coding assistance, including the following features
4747
![Format](/img/docs/tools/Ide/vs-code/Format.gif)
4848
- **Quick fix:** Quick fix some diagnostics
4949
![Qucik Fix](/img/docs/tools/Ide/vs-code/QuickFix.gif)
50-
- **Inlay hint:** Inlay hint displays variable type and other semantic information
50+
- **Inlay hint:** Display hints for variable type, functions, and schema arguments
5151
![Inlay Hint](/img/docs/tools/Ide/vs-code/Inlayhint.png)
5252

5353
Other useful features such as refactoring and testing are in development.
5454

5555
## Dependencies
5656

57-
We recommend that you use the latest version of KCL, but the minimum required version for this extension is 0.4.6. If you are using an earlier version, the extension may not work properly.
57+
We recommend using the latest version of KCL, but the minimum required version for this extension is 0.4.6. If you are using an earlier version, the extension may not work properly.
5858

5959
## Known Issues
6060

61-
See [here](https://github.com/kcl-lang/kcl/issues/524).
61+
See [here](https://github.com/kcl-lang/kcl/issues).
6262

6363
## Ask for help
6464

65-
If the extension isn't working as you expect, please contact us with [community](https://kcl-lang.io/docs/community/intro/support) for help.
65+
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.
6666

6767
## Contributing
6868

69-
We are working actively on improving the KCL development on VS Code. All kinds of contributions are welcomed. You can refer to our [contribution guide](https://kcl-lang.io/docs/community/contribute). It introduces how to build and run the extension locally, and describes the process of sending a contribution.
69+
We are actively working to enhance KCL development on VS Code. 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.
7070

7171
## License
7272

versioned_docs/version-0.10/user_docs/getting-started/install.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,18 +204,18 @@ scoop install kcl-lang/kcl-lsp
204204

205205
#### VS Code
206206

207-
The KCL Extension extension provides some coding assistance, e.g., highlight, goto definition, completion, hover, outline, and diagnostics. You can go [here](/docs/tools/Ide/vs-code) for more information about the installation.
207+
The KCL Extension provides comprehensive coding assistance, offering features such as highlighting, go-to definition, completion, hover, outline, and diagnostics. For more information about the installation, please visit [here](/docs/tools/Ide/vs-code)
208208

209209
![Completion](/img/docs/tools/Ide/vs-code/Completion.gif)
210210

211211
#### NeoVim
212212

213-
See [here](/docs/tools/Ide/neovim) to config the KCL language server and enable it.
213+
To configure the KCL language server and enable it, please refer to [here](/docs/tools/Ide/neovim)
214214

215215
![kcl.nvim](/img/docs/tools/Ide/neovim/overview.png)
216216

217217
#### IntelliJ IDEA
218218

219-
We provide two IntelliJ KCL plugins and you can go [here](/docs/tools/Ide/intellij) for more information about the installation.
219+
We offer IntelliJ KCL plugins. For detailed information about the installation, please visit [here](/docs/tools/Ide/intellij)
220220

221221
![intellij](/img/docs/tools/Ide/intellij/overview.png)

0 commit comments

Comments
 (0)