-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from Peefy/kcl-language-server-install-guide
docs: add kcl language server install guide
- Loading branch information
Showing
4 changed files
with
278 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,15 +28,15 @@ $env:PATH += ";{install-location};" | |
|
||
#### MacOS | ||
|
||
Install or upgrade the latest darwin KCL to /usr/local/kclvm/bin | ||
Install or upgrade the latest darwin KCL to /usr/local/bin | ||
|
||
```bash | ||
curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bash | ||
``` | ||
|
||
#### Linux | ||
|
||
Install or upgrade the latest linux KCL to /usr/local/kclvm/bin | ||
Install or upgrade the latest linux KCL to /usr/local/bin | ||
|
||
```bash | ||
wget -q https://kcl-lang.io/script/install-cli.sh -O - | /bin/bash | ||
|
@@ -119,19 +119,82 @@ If you are unable to successfully install and run KCL, you can refer to [here](/ | |
|
||
## 2. Install KCL IDE Extension | ||
|
||
### VS Code | ||
### Install Language Server | ||
|
||
Before we enable the IDE extension, first we install the KCL Language Server binary and add it to the PATH. | ||
|
||
#### MacOS | ||
|
||
Install or upgrade the latest darwin KCL language server to /usr/local/bin | ||
|
||
```bash | ||
curl -fsSL https://kcl-lang.io/script/install-kcl-lsp.sh | /bin/bash | ||
``` | ||
|
||
#### Linux | ||
|
||
Install or upgrade the latest linux KCL language server to /usr/local/bin | ||
|
||
```bash | ||
wget -q https://kcl-lang.io/script/install-kcl-lsp.sh -O - | /bin/bash | ||
``` | ||
|
||
#### Windows | ||
|
||
Install or upgrade the latest windows KCL language server to $Env:SystemDrive\kclvm\bin and add this directory to User PATH environment variable. | ||
|
||
```bash | ||
powershell -Command "iwr -useb https://kcl-lang.io/script/install-kcl-lsp.ps1 | iex" | ||
``` | ||
|
||
#### Homebrew (MacOS) | ||
|
||
- Install | ||
|
||
```bash | ||
# Install the latest version | ||
brew install kcl-lang/tap/[email protected] | ||
|
||
# Specify a version | ||
brew install kcl-lang/tap/[email protected] | ||
``` | ||
|
||
- Upgrade | ||
|
||
```bash | ||
brew upgrade kcl-lang/tap/kcl-lsp | ||
``` | ||
|
||
- Uninstall | ||
|
||
```bash | ||
brew uninstall kcl-lang/tap/kcl-lsp | ||
``` | ||
|
||
#### Scoop (Windows) | ||
|
||
Install [Scoop](https://scoop.sh/) first, then add this bucket and install `kcl-language-server` by running: | ||
|
||
```bash | ||
scoop bucket add kcl-lang https://github.com/kcl-lang/scoop-bucket.git | ||
scoop install kcl-lang/kcl-lsp | ||
``` | ||
|
||
### Install KCL Extensions for IDE | ||
|
||
#### VS Code | ||
|
||
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. | ||
|
||
![Completion](/img/docs/tools/Ide/vs-code/Completion.gif) | ||
|
||
### NeoVim | ||
#### NeoVim | ||
|
||
See [here](https://github.com/kcl-lang/kcl.nvim) to config the KCL language server and enable it. | ||
|
||
![kcl.nvim](/img/docs/tools/Ide/neovim/overview.png) | ||
|
||
### IntelliJ IDEA | ||
#### IntelliJ IDEA | ||
|
||
Download the distribution from [here](https://github.com/kcl-lang/intellij-kcl/releases) and in IntelliJ IDEA, click Preference -> plugins -> install Plugin from Disk... -> select kcl-idea-plugin zip -> restart IDE. This plugin requires the IntelliJ IDEA 2020.2+ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ sidebar_position: 2 | |
|
||
### 二进制下载 | ||
|
||
KCL 的每个版本都包含各种操作系统和体系结构。这些二进制版本可以从 [Github](https://github.com/kcl-lang/kcl/releases/) 或者 [Gitee](https://gitee.com/kusionstack/kcl/releases) 手动下载并安装,下载完成后将 `{install-location}/kclvm/bin` 添加到环境变量 PATH 中。 | ||
KCL 的每个版本都包含各种操作系统和体系结构。这些二进制版本可以从 [Github](https://github.com/kcl-lang/cli/releases/) 或者 [Gitee](https://gitee.com/kusionstack/kcl/releases) 手动下载并安装,下载完成后将 `{install-location}/kclvm/bin` 添加到环境变量 PATH 中。 | ||
|
||
> ⚠️ 如果您不能成功访问 Github, 也可以访问 Gitee 获得二进制进行安装 | ||
|
@@ -28,15 +28,15 @@ $env:PATH += ";{install-location};" | |
|
||
#### MacOS | ||
|
||
将 KCL darwin 最新版本安装到 /usr/local/kclvm/bin | ||
将 KCL darwin 最新版本安装到 /usr/local/bin | ||
|
||
```bash | ||
curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bash | ||
``` | ||
|
||
#### Linux | ||
|
||
将 KCL linux 最新版本安装到 /usr/local/kclvm/bin | ||
将 KCL linux 最新版本安装到 /usr/local/bin | ||
|
||
```bash | ||
wget -q https://kcl-lang.io/script/install-cli.sh -O - | /bin/bash | ||
|
@@ -47,10 +47,10 @@ wget -q https://kcl-lang.io/script/install-cli.sh -O - | /bin/bash | |
将 KCL windows 最新版本安装到 $Env:SystemDrive\kclvm\bin,并将该目录添加到用户 PATH 环境变量中。 | ||
|
||
```bash | ||
powershell -Command "iwr -useb https://kcl-lang.io/script/install.ps1 | iex" | ||
powershell -Command "iwr -useb https://kcl-lang.io/script/install-cli.ps1 | iex" | ||
``` | ||
|
||
### Homebrew (MacOS) | ||
#### Homebrew (MacOS) | ||
|
||
- 安装最新版本 | ||
|
||
|
@@ -74,7 +74,7 @@ brew upgrade kcl-lang/tap/kcl | |
brew uninstall kcl-lang/tap/kcl | ||
``` | ||
|
||
### Scoop (Windows) | ||
#### Scoop (Windows) | ||
|
||
首先安装 [Scoop](https://scoop.sh/), 然后通过如下命令安装 `kcl`: | ||
|
||
|
@@ -119,19 +119,82 @@ kcl --help | |
|
||
## 2. 安装 KCL IDE 插件 | ||
|
||
### VS Code | ||
### 安装语言服务器 | ||
|
||
在我们启用 IDE 插件之前,首先我们安装 KCL Language Server 二进制并添加到 PATH 中。 | ||
|
||
#### MacOS | ||
|
||
将 KCL language server darwin 最新版本安装到 /usr/local/bin | ||
|
||
```bash | ||
curl -fsSL https://kcl-lang.io/script/install-kcl-lsp.sh | /bin/bash | ||
``` | ||
|
||
#### Linux | ||
|
||
将 KCL language server linux 最新版本安装到 /usr/local/bin | ||
|
||
```bash | ||
wget -q https://kcl-lang.io/script/install-kcl-lsp.sh -O - | /bin/bash | ||
``` | ||
|
||
#### Windows | ||
|
||
将 KCL language server windows 最新版本安装到 $Env:SystemDrive\kclvm\bin,并将该目录添加到用户 PATH 环境变量中。 | ||
|
||
```bash | ||
powershell -Command "iwr -useb https://kcl-lang.io/script/install-kcl-lsp.ps1 | iex" | ||
``` | ||
|
||
### Homebrew (MacOS) | ||
|
||
- 安装最新版本 | ||
|
||
```bash | ||
# 安装最新版本 | ||
brew install kcl-lang/tap/[email protected] | ||
|
||
# 安装固定版本 | ||
brew install kcl-lang/tap/[email protected] | ||
``` | ||
|
||
- 升级 | ||
|
||
```bash | ||
brew upgrade kcl-lang/tap/kcl-lsp | ||
``` | ||
|
||
- 卸载 | ||
|
||
```bash | ||
brew uninstall kcl-lang/tap/kcl-lsp | ||
``` | ||
|
||
### Scoop (Windows) | ||
|
||
首先安装 [Scoop](https://scoop.sh/), 然后通过如下命令安装 `kcl-language-server` 二进制: | ||
|
||
```bash | ||
scoop bucket add kcl-lang https://github.com/kcl-lang/scoop-bucket.git | ||
scoop install kcl-lang/kcl-lsp | ||
``` | ||
|
||
### 安装 IDE 插件客户端 | ||
|
||
#### VS Code | ||
|
||
KCL 为 VS Code 本地版本提供了插件支持,并提供了高亮、自动补全、跳转、悬停、大纲等功能。您可以[点击这里](/docs/tools/Ide/vs-code)进行安装。 | ||
|
||
![Completion](/img/docs/tools/Ide/vs-code/Completion.gif) | ||
|
||
### NeoVim | ||
#### NeoVim | ||
|
||
参见[此处](https://github.com/kcl-lang/kcl.nvim)配置 KCL 语言服务器并启用它。 | ||
|
||
![kcl.nvim](/img/docs/tools/Ide/neovim/overview.png) | ||
|
||
### IntelliJ IDEA | ||
#### IntelliJ IDEA | ||
|
||
从[这里](https://github.com/kcl-lang/intellij-kcl/releases)下载发行版,在 IntelliJ IDEA 中,点击 Preference -> plugins -> install Plugin from Disk... -> 选择 kcl-idea-plugin zip -> 重启 IDE。此插件需要 IntelliJ IDEA 2020.2+ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ sidebar_position: 2 | |
|
||
### 二进制下载 | ||
|
||
KCL 的每个版本都包含各种操作系统和体系结构。这些二进制版本可以从 [Github](https://github.com/kcl-lang/kcl/releases/) 或者 [Gitee](https://gitee.com/kusionstack/kcl/releases) 手动下载并安装,下载完成后将 `{install-location}/kclvm/bin` 添加到环境变量 PATH 中。 | ||
KCL 的每个版本都包含各种操作系统和体系结构。这些二进制版本可以从 [Github](https://github.com/kcl-lang/cli/releases/) 或者 [Gitee](https://gitee.com/kusionstack/kcl/releases) 手动下载并安装,下载完成后将 `{install-location}/kclvm/bin` 添加到环境变量 PATH 中。 | ||
|
||
> ⚠️ 如果您不能成功访问 Github, 也可以访问 Gitee 获得二进制进行安装 | ||
|
@@ -28,15 +28,15 @@ $env:PATH += ";{install-location};" | |
|
||
#### MacOS | ||
|
||
将 KCL darwin 最新版本安装到 /usr/local/kclvm/bin | ||
将 KCL darwin 最新版本安装到 /usr/local/bin | ||
|
||
```bash | ||
curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bash | ||
``` | ||
|
||
#### Linux | ||
|
||
将 KCL linux 最新版本安装到 /usr/local/kclvm/bin | ||
将 KCL linux 最新版本安装到 /usr/local/bin | ||
|
||
```bash | ||
wget -q https://kcl-lang.io/script/install-cli.sh -O - | /bin/bash | ||
|
@@ -47,7 +47,7 @@ wget -q https://kcl-lang.io/script/install-cli.sh -O - | /bin/bash | |
将 KCL windows 最新版本安装到 $Env:SystemDrive\kclvm\bin,并将该目录添加到用户 PATH 环境变量中。 | ||
|
||
```bash | ||
powershell -Command "iwr -useb https://kcl-lang.io/script/install.ps1 | iex" | ||
powershell -Command "iwr -useb https://kcl-lang.io/script/install-cli.ps1 | iex" | ||
``` | ||
|
||
### Homebrew (MacOS) | ||
|
@@ -119,19 +119,82 @@ kcl --help | |
|
||
## 2. 安装 KCL IDE 插件 | ||
|
||
### VS Code | ||
### 安装语言服务器 | ||
|
||
在我们启用 IDE 插件之前,首先我们安装 KCL Language Server 二进制并添加到 PATH 中。 | ||
|
||
#### MacOS | ||
|
||
将 KCL language server darwin 最新版本安装到 /usr/local/bin | ||
|
||
```bash | ||
curl -fsSL https://kcl-lang.io/script/install-kcl-lsp.sh | /bin/bash | ||
``` | ||
|
||
#### Linux | ||
|
||
将 KCL language server linux 最新版本安装到 /usr/local/bin | ||
|
||
```bash | ||
wget -q https://kcl-lang.io/script/install-kcl-lsp.sh -O - | /bin/bash | ||
``` | ||
|
||
#### Windows | ||
|
||
将 KCL language server windows 最新版本安装到 $Env:SystemDrive\kclvm\bin,并将该目录添加到用户 PATH 环境变量中。 | ||
|
||
```bash | ||
powershell -Command "iwr -useb https://kcl-lang.io/script/install-kcl-lsp.ps1 | iex" | ||
``` | ||
|
||
#### Homebrew (MacOS) | ||
|
||
- 安装最新版本 | ||
|
||
```bash | ||
# 安装最新版本 | ||
brew install kcl-lang/tap/[email protected] | ||
|
||
# 安装固定版本 | ||
brew install kcl-lang/tap/[email protected] | ||
``` | ||
|
||
- 升级 | ||
|
||
```bash | ||
brew upgrade kcl-lang/tap/kcl-lsp | ||
``` | ||
|
||
- 卸载 | ||
|
||
```bash | ||
brew uninstall kcl-lang/tap/kcl-lsp | ||
``` | ||
|
||
#### Scoop (Windows) | ||
|
||
首先安装 [Scoop](https://scoop.sh/), 然后通过如下命令安装 `kcl-language-server` 二进制: | ||
|
||
```bash | ||
scoop bucket add kcl-lang https://github.com/kcl-lang/scoop-bucket.git | ||
scoop install kcl-lang/kcl-lsp | ||
``` | ||
|
||
### 安装 IDE 插件客户端 | ||
|
||
#### VS Code | ||
|
||
KCL 为 VS Code 本地版本提供了插件支持,并提供了高亮、自动补全、跳转、悬停、大纲等功能。您可以[点击这里](/docs/tools/Ide/vs-code)进行安装。 | ||
|
||
![Completion](/img/docs/tools/Ide/vs-code/Completion.gif) | ||
|
||
### NeoVim | ||
#### NeoVim | ||
|
||
参见[此处](https://github.com/kcl-lang/kcl.nvim)配置 KCL 语言服务器并启用它。 | ||
|
||
![kcl.nvim](/img/docs/tools/Ide/neovim/overview.png) | ||
|
||
### IntelliJ IDEA | ||
#### IntelliJ IDEA | ||
|
||
从[这里](https://github.com/kcl-lang/intellij-kcl/releases)下载发行版,在 IntelliJ IDEA 中,点击 Preference -> plugins -> install Plugin from Disk... -> 选择 kcl-idea-plugin zip -> 重启 IDE。此插件需要 IntelliJ IDEA 2020.2+ | ||
|
||
|
Oops, something went wrong.