Skip to content

Commit 1480295

Browse files
committed
feat: add more content about IDE and rename API
Signed-off-by: zongz <zongzhe1024@163.com>
1 parent ddf270c commit 1480295

File tree

2 files changed

+82
-6
lines changed
  • blog/2023-11-30-kcl-0.7.0-release
  • i18n/zh-CN/docusaurus-plugin-content-blog/2023-11-30-kcl-0.7.0-release

2 files changed

+82
-6
lines changed

blog/2023-11-30-kcl-0.7.0-release/index.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ c = identity(s.Test{name="hello"})
9696

9797
### 🏄 API Updates
9898

99-
- New KCL unit test API: https://github.com/kcl-lang/kcl/pull/904
99+
- New KCL unit test API: _[https://github.com/kcl-lang/kcl/pull/904](https://github.com/kcl-lang/kcl/pull/904)_
100100

101-
- KCL schema parsing API enhancement version `GetFullSchemaType` supports obtaining KCL package related information with third-party libraries
101+
- KCL schema parsing API enhancement version `GetFullSchemaType` supports obtaining KCL package related information with third-party libraries. _[https://github.com/kcl-lang/kcl/pull/906](https://github.com/kcl-lang/kcl/pull/906)_
102+
103+
- New KCL symbol renaming API: _[https://github.com/kcl-lang/kcl/pull/890](https://github.com/kcl-lang/kcl/pull/890)_
102104

103105
### 🐞 Error Fixes
104106

@@ -116,7 +118,43 @@ c = identity(s.Test{name="hello"})
116118

117119
- Add a check to prohibit duplicate import statements https://github.com/kcl-lang/kcl/pull/727
118120

119-
## Toolchain Updates
121+
## IDE & Toolchain Updates
122+
123+
### IDE Updates
124+
125+
#### KCL IDE supports goto reference and renaming of symbols
126+
127+
IDE supports goto reference of symbols, using `goto reference` or `find all references`:
128+
129+
![find-ref](/img/docs/tools/Ide/vs-code/FindRefs.png)
130+
131+
IDE supports renaming of symbols:
132+
133+
![rename](/img/docs/tools/Ide/vs-code/Rename.gif)
134+
135+
#### IDE supports formatting of import statements and union types
136+
137+
We have optimized the behavior of blank lines between import statements and other code blocks (formatted as one blank line) and the behavior of spaces between union types (formatted as separated by `|`):
138+
139+
![fmt](/img/blog/2023-10-25-kcl-biweekly-newsletter/Format.gif)
140+
141+
#### KCL IDE has added a lot of completion prompts
142+
143+
We have added a lot of completion prompts for the **configuration definition**, which simplifies the user's mind of writing configuration based on the model and improves the efficiency of configuration editing. In addition, the parameter completion when calling the built-in function is enhanced. Talk is cheap, let's take a look at the effect directly:
144+
145+
![func-completion](/img/blog/2023-11-08-biweekly-newsletter/module-function-completion.gif)
146+
147+
![conf-completion](/img/blog/2023-11-08-biweekly-newsletter/config-completion.gif)
148+
149+
And for the **model design**, we have also added a quick generation of docstring to reduce the boilerplate of typing by hand:
150+
151+
![gen-docstring](/img/blog/2023-11-08-biweekly-newsletter/docstring-gen.gif)
152+
153+
#### KCL IDE other updates and error fixes
154+
155+
- Fix the problem that the language service virtual file system related bug: the file dimension change will cause the language service to crash and must be restarted to recover, which has now been fixed.
156+
- Support import statement completion of external package dependencies introduced by package management tools
157+
- Fix the display position of the function parameter undefined type error
120158

121159
### Test Tool Updates
122160

i18n/zh-CN/docusaurus-plugin-content-blog/2023-11-30-kcl-0.7.0-release/index.md

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@ c = identity(s.Test{name="hello"})
9595

9696
### 🏄 API 更新
9797

98-
- 新增 KCL 单元测试 API: https://github.com/kcl-lang/kcl/pull/904
99-
- KCL Schema 模型解析API增强版 GetFullSchemaType支持获取带有三方库的 KCL 包相关信息和 Schema 属性默认值 https://github.com/kcl-lang/kcl/pull/914
98+
- 新增 KCL 单元测试 API: _[https://github.com/kcl-lang/kcl/pull/904](https://github.com/kcl-lang/kcl/pull/904)_
99+
- KCL Schema 模型解析API增强版 GetFullSchemaType支持获取带有三方库的 KCL 包相关信息和 Schema 属性默认值 _[https://github.com/kcl-lang/kcl/pull/906](https://github.com/kcl-lang/kcl/pull/906)_
100+
- 新增 KCL 符号重命名 API: _[https://github.com/kcl-lang/kcl/pull/890](https://github.com/kcl-lang/kcl/pull/890)_
100101

101102
### 🐞 错误修复
102103

@@ -109,7 +110,44 @@ c = identity(s.Test{name="hello"})
109110

110111
- 增加了检查,禁止同名的 import 语句 https://github.com/kcl-lang/kcl/pull/727
111112

112-
## 工具链更新
113+
## IDE & 工具链更新
114+
115+
### IDE 更新
116+
117+
#### KCL IDE 插件支持了对符号的引用跳转及重命名功能
118+
119+
IDE 增加了对符号的引用跳转支持,使用`转到引用``查找所有引用`
120+
121+
![find-ref](/img/docs/tools/Ide/vs-code/FindRefs.png)
122+
123+
对符号进行`重命名`
124+
125+
![rename](/img/docs/tools/Ide/vs-code/Rename.gif)
126+
127+
#### IDE 支持对引用语句和 union 类型的格式化
128+
129+
优化了引用语句与其他代码块之间的空行行为(格式化为一个空行)和union 类型的空格行为(多个类型之间格式化为以 `|` 间隔):
130+
131+
![fmt](/img/blog/2023-10-25-kcl-biweekly-newsletter/Format.gif)
132+
133+
#### KCL IDE 插件基于新增了大量补全提示
134+
135+
针对**配置定义**这一核心环节,简化用户基于模型编写配置的心智、提升配置编辑的效率。此外,增强了调用内置函数时参数补全。talk is cheap,我们直接来看效果:
136+
137+
![func-completion](/img/blog/2023-11-08-biweekly-newsletter/module-function-completion.gif)
138+
139+
![conf-completion](/img/blog/2023-11-08-biweekly-newsletter/config-completion.gif)
140+
141+
而对于**模型设计**环节,也新增了对 docstring 的快速生成,减少手敲 boilerplate:
142+
143+
![gen-docstring](/img/blog/2023-11-08-biweekly-newsletter/docstring-gen.gif)
144+
145+
#### KCL IDE 其他更新和错误修复
146+
- 支持对标准库和内置函数的悬停提示,支持对 KCL 代码错误的快速修复
147+
- 优化了对引用语句和 union 类型的格式化输出。
148+
- 修复了语言服务虚拟文件系统相关的bug:文件维度的变更引发会语言服务崩溃,必须重启 IDE 恢复,现已修复。
149+
- 支持包管理工具引入的外部包依赖 import 语句补全
150+
- 修复函数参数未定义类型错误显示位置
113151

114152
### 测试工具更新
115153

0 commit comments

Comments
 (0)