Skip to content

Commit 80e2431

Browse files
committed
feat: init boilerplate
1 parent c260527 commit 80e2431

24 files changed

Lines changed: 6907 additions & 0 deletions

.cargo/config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[alias]
2+
lint = "clippy --workspace --all-targets -- --deny warnings"

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
rust:
14+
name: Rust
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Rust toolchain
20+
run: rustup show
21+
22+
- name: Cache cargo
23+
uses: actions/cache@v4
24+
with:
25+
path: |
26+
~/.cargo/bin/
27+
~/.cargo/registry/index/
28+
~/.cargo/registry/cache/
29+
~/.cargo/git/db/
30+
target/
31+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
32+
33+
- name: Check formatting
34+
run: cargo fmt --check
35+
36+
- name: Lint
37+
run: cargo clippy --workspace --all-targets -- --deny warnings
38+
39+
- name: Build
40+
run: cargo build --verbose
41+
42+
js:
43+
name: JavaScript/TypeScript
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Install pnpm
49+
uses: pnpm/action-setup@v4
50+
51+
- name: Setup Node.js
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version-file: ".node-version"
55+
cache: "pnpm"
56+
57+
- name: Install dependencies
58+
run: pnpm install
59+
60+
- name: Check formatting
61+
run: pnpm run fmt:check
62+
63+
- name: Lint
64+
run: pnpm run lint

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/target
2+
node_modules
3+
out/
4+
.pnpm-debug.log
5+
*.ast
6+
dist/
7+
*.vsix
8+
9+
.claude
10+
11+
nul

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.12.0

.vscode/launch.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
{
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"name": "Launch Client",
9+
"runtimeExecutable": "${execPath}",
10+
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
11+
"outFiles": ["${workspaceRoot}/client/out/**/*.js"],
12+
"env": {
13+
"SERVER_PATH": "${workspaceRoot}/target/debug/l-language-server"
14+
}
15+
},
16+
// {
17+
// "type": "node",
18+
// "request": "attach",
19+
// "name": "Attach to Server",
20+
// "port": 6009,
21+
// "restart": true,
22+
// "outFiles": ["${workspaceRoot}/server/out/**/*.js"]
23+
// },
24+
{
25+
"name": "Language Server E2E Test",
26+
"type": "extensionHost",
27+
"request": "launch",
28+
"runtimeExecutable": "${execPath}",
29+
"args": [
30+
"--extensionDevelopmentPath=${workspaceRoot}",
31+
"--extensionTestsPath=${workspaceRoot}/client/out/test/index",
32+
"${workspaceRoot}/client/testFixture"
33+
],
34+
"outFiles": ["${workspaceRoot}/client/out/test/**/*.js"]
35+
}
36+
],
37+
"compounds": [
38+
{
39+
"name": "Client + Server",
40+
"configurations": [
41+
"Launch Client"
42+
// "Attach to Server"
43+
]
44+
}
45+
]
46+
}

.vscode/settings.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off"
11+
}

.vscode/tasks.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "compile",
9+
"group": "build",
10+
"presentation": {
11+
"panel": "dedicated",
12+
"reveal": "never"
13+
},
14+
"problemMatcher": ["$tsc"]
15+
}
16+
]
17+
}

.vscodeignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.vscode
2+
node_modules
3+
out/
4+
src/
5+
tsconfig.json
6+
rolldown.config.mjs
7+
client/**
8+
target
9+
Cargo.lock
10+
.github
11+
.cargo
12+
examples/
13+
justfile
14+
rust-toolchains.toml
15+

0 commit comments

Comments
 (0)