From 4df6ef7599e293010559329204156ba668273ddf Mon Sep 17 00:00:00 2001 From: Peefy Date: Tue, 4 Jun 2024 22:33:28 +0800 Subject: [PATCH] docs: update kcl language server build scripts and docs Signed-off-by: Peefy --- Makefile | 4 ++++ docs/dev_guide/6.languager_server.md | 4 +++- kclvm/makefile | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f710ea615..d3f59142e 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,10 @@ RUN_IN_DOCKER+=-w /root/kclvm ${BUILD_IMAGE} build: ${PWD}/run.sh -a build +.PHONY: build-lsp +build-lsp: + make -C ./kclvm build-lsp + .PHONY: release release: ${PWD}/run.sh -a release diff --git a/docs/dev_guide/6.languager_server.md b/docs/dev_guide/6.languager_server.md index 4575ace7c..4b5527a06 100644 --- a/docs/dev_guide/6.languager_server.md +++ b/docs/dev_guide/6.languager_server.md @@ -127,9 +127,11 @@ For Windows Alternatively, you can use cargo to build kcl-language-server: ```bash -cd kclvm/tools/src/LSP && cargo build +make build-lsp ``` +The built language server will be at `kclvm/target/release/kcl-language-server` + 1. Add kcl-language-server to PATH Add the `kcl-language-server` to PATH verify that: diff --git a/kclvm/makefile b/kclvm/makefile index 90799a5ab..61c4b9074 100644 --- a/kclvm/makefile +++ b/kclvm/makefile @@ -52,6 +52,9 @@ fix: build-wasm: cargo build --target=wasm32-wasi --release +build-lsp: + cargo build --release --manifest-path tools/src/LSP/Cargo.toml + # ------------------------ # Tests # ------------------------