diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 0000000..0609bea
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,3 @@
+[codespell]
+ignore-words-list: crate,everytime
+skip: **/target,node_modules,build,**/Cargo.lock,**/*.js.map,dist
diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml
index 7754bb3..d2600fb 100644
--- a/.github/workflows/make-release.yml
+++ b/.github/workflows/make-release.yml
@@ -25,7 +25,8 @@ jobs:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- code-target: win32-x64
+ code-target:
+ win32-x64
#- os: windows-latest
#target: i686-pc-windows-msvc
#code-target:
@@ -245,7 +246,8 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: release-x86_64-pc-windows-msvc
- path: build
+ path:
+ build
#- uses: actions/download-artifact@v4
#with:
#name: release-i686-pc-windows-msvc
diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml
new file mode 100644
index 0000000..76983c8
--- /dev/null
+++ b/.github/workflows/typos.yml
@@ -0,0 +1,29 @@
+on:
+ push:
+ pull_request:
+ paths:
+ - "**.json"
+ - "**.js"
+ - "**.ts"
+ - "**.yml"
+ - "**.yaml"
+ - "**.rs"
+ - "**.md"
+permissions:
+ packages: read
+ contents: read
+name: check-typos
+jobs:
+ check-typos:
+ name: check typos
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ - name: Install codespell
+ run: |
+ python -m pip install codespell
+ - name: Run codespell
+ run: codespell --config .codespellrc # Edit this file to tweak the typo list and other configuration.
diff --git a/README.md b/README.md
index 3cc578f..c5a92ff 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,11 @@
# kcl-lsp
The `kcl` [Language Server Protocol](https://microsoft.github.io/language-server-protocol)
-implementation.
+implementation and VSCode extension.
-This is just the server process. Most of the actual code for the server endpoints is in the same repo as the AST/tokenizer/parser since it's all relevant. That is [modeling-app](https://github.com/kittycad/modeling-app).
+This language server is a thin wrapper around the KCL language tooling library.
+That is found in the [modeling-app](https://github.com/kittycad/modeling-app) repo, and published as
+on crates.io as [kcl-lib](https://crates.io/crates/kcl-lib).
## VSCode
@@ -85,8 +87,12 @@ args = ["server", "--stdio"]
```bash
$ yarn install
$ cargo build
+$ code .
```
+Once VSCode opens, go to the "Run and Debug" panel (cmd-shift-D on MacOS), and choose Run Extension (Debug Build).
+This opens a new VSCode window with our KCL extension installed. Open a KCL file and check that the LSP is working.
+
- press F5 or change to the Debug panel and click Launch Client
> **Note**
diff --git a/client/src/ctx.ts b/client/src/ctx.ts
index bd3213d..385cc55 100644
--- a/client/src/ctx.ts
+++ b/client/src/ctx.ts
@@ -190,7 +190,7 @@ export class Ctx {
}
async restart() {
- // FIXME: We should re-use the client, that is ctx.deactivate() if none of the configs have changed
+ // FIXME: We should reuse the client, that is ctx.deactivate() if none of the configs have changed
await this.stopAndDispose();
await this.start();
}
diff --git a/client/src/main.ts b/client/src/main.ts
index c448575..585b421 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -62,7 +62,7 @@ function createCommands(): Record {
},
stopServer: {
enabled: (ctx) => async () => {
- // FIXME: We should re-use the client, that is ctx.deactivate() if none of the configs have changed
+ // FIXME: We should reuse the client, that is ctx.deactivate() if none of the configs have changed
await ctx.stopAndDispose();
ctx.setServerStatus({
health: "stopped",
diff --git a/src/main.rs b/src/main.rs
index 941051e..84b45cd 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -170,7 +170,7 @@ async fn run_cmd(opts: &Opts) -> Result<()> {
// For Cloud run & ctrl+c, shutdown gracefully.
// "The main process inside the container will receive SIGTERM, and after a grace period,
// SIGKILL."
- // Regsitering SIGKILL here will panic at runtime, so let's avoid that.
+ // Registering SIGKILL here will panic at runtime, so let's avoid that.
use signal_hook::{
consts::{SIGINT, SIGTERM},
iterator::Signals,