Skip to content

Commit a964502

Browse files
authored
Merge pull request #365 from He1pa/intellij_plugin
doc: update intellij plugin doc
2 parents ddac670 + f48031d commit a964502

File tree

4 files changed

+67
-4
lines changed

4 files changed

+67
-4
lines changed

docs/tools/Ide/intellij.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,38 @@ sidebar_position: 3
44

55
# IntelliJ IDEA
66

7-
- IntelliJ KCL Extension: [https://github.com/kcl-lang/intellij-kcl](https://github.com/kcl-lang/intellij-kcl)
7+
We provide two IntelliJ KCL plugins:
88

9-
![intellij](/img/docs/tools/Ide/intellij/overview.png)
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.
11+
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.
14+
15+
## IntelliJ KCL
16+
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+
20+
## IntelliJ KCL LSP
21+
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]
24+
25+
IntelliJ KCL LSP also can be downloaded from the plugin marketplace
26+
27+
![intellij](/img/docs/tools/Ide/intellij/kcl-lsp.png)
28+
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:
30+
31+
For macOS and Linux:
32+
33+
```bash
34+
which kcl-language-server
35+
```
36+
37+
For Windows:
38+
39+
```bash
40+
where kcl-language-server
41+
```

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

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,37 @@ sidebar_position: 3
44

55
# IntelliJ IDEA
66

7-
- IntelliJ KCL 插件: [https://github.com/kcl-lang/intellij-kcl](https://github.com/kcl-lang/intellij-kcl)
7+
我们提供了两个版本的 IntelliJ KCL 插件
88

9-
![intellij](/img/docs/tools/Ide/intellij/overview.png)
9+
- IntelliJ KCL: 基础版本的 KCL 插件提供了语法高亮和补全的基础能力,可以在更多版本使用。
10+
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+
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.
15+
16+
## IntelliJ KCL
17+
18+
基础版本的 KCL 插件可以直接在 IntelliJ 的插件市场下载使用。基础版本提供了语法高亮和关键字补全的能力
19+
![intellij](/img/docs/tools/Ide/intellij/kcl.png)
20+
21+
## IntelliJ KCL KCL
22+
23+
基于 LSP 版本的插件可以从插件市场下载
24+
25+
![intellij](/img/docs/tools/Ide/intellij/kcl-lsp.png)
26+
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中:
29+
30+
```bash
31+
which kcl-language-server
32+
```
33+
34+
在 Windows 中:
35+
36+
```bash
37+
where kcl-language-server
38+
```
39+
40+
注意,LSP 版本的插件不一定在所有版本的 IntelliJ IDE 中可以使用。
228 KB
Loading
172 KB
Loading

0 commit comments

Comments
 (0)