Skip to content

Commit

Permalink
CI check for typos, expand README
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchalmers authored May 23, 2024
1 parent a70991c commit f4fb7ac
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
ignore-words-list: crate,everytime
skip: **/target,node_modules,build,**/Cargo.lock,**/*.js.map,dist
6 changes: 4 additions & 2 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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 <kbd>F5</kbd> or change to the Debug panel and click <kbd>Launch Client</kbd>

> **Note**
Expand Down
2 changes: 1 addition & 1 deletion client/src/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function createCommands(): Record<string, CommandFactory> {
},
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",
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f4fb7ac

Please sign in to comment.