File tree Expand file tree Collapse file tree 13 files changed +1219
-8
lines changed Expand file tree Collapse file tree 13 files changed +1219
-8
lines changed Original file line number Diff line number Diff line change 3232 - name : Install deps
3333 run : pnpm install
3434
35- # - name: Build
36- # run: pnpm run build
35+ - name : Build
36+ run : pnpm run build
3737
3838 # - name: Lint
3939 # run: pnpm run lint
Original file line number Diff line number Diff line change 1+ client /out
12node_modules
2- * .vsix
3+ * .vsix
4+ tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change 11{
22 "recommendations" : [
3+ " connor4312.esbuild-problem-matchers" ,
34 " dbaeumer.vscode-eslint" ,
45 " editorconfig.editorconfig" ,
56 " esbenp.prettier-vscode" ,
67 " github.vscode-github-actions" ,
78 " kravets.vscode-publint" ,
9+ " ms-vscode.extension-test-runner" ,
810 " pflannery.vscode-versionlens" ,
911 " redhat.vscode-yaml"
1012 ]
Original file line number Diff line number Diff line change 1- // A launch configuration that launches the extension inside a new window
1+ // A launch configuration that compiles the extension and then opens it inside a new window
22// Use IntelliSense to learn about possible attributes.
33// Hover to view descriptions of existing attributes.
44// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55{
66 "version" : " 0.2.0" ,
77 "configurations" : [
88 {
9- "name" : " Extension" ,
9+ "name" : " Run Extension" ,
1010 "type" : " extensionHost" ,
1111 "request" : " launch" ,
12- "args" : [" --extensionDevelopmentPath=${workspaceFolder}" ]
12+ "runtimeExecutable" : " ${execPath}" ,
13+ "args" : [" --extensionDevelopmentPath=${workspaceFolder}" ],
14+ "outFiles" : [" ${workspaceFolder}/client/out/**/*.js" ],
15+ "autoAttachChildProcesses" : true
1316 }
1417 ]
1518}
Original file line number Diff line number Diff line change 33 "files.associations" : {
44 "*.json5" : " jsonc"
55 },
6+ "files.exclude" : {
7+ "out" : false ,
8+ "dist" : false
9+ },
10+ "search.exclude" : {
11+ "out" : true ,
12+ "dist" : true
13+ },
614 "typescript.tsdk" : " node_modules/typescript/lib"
715}
Original file line number Diff line number Diff line change 11.vscode /**
22.vscode-test /**
3+ out /**
4+ node_modules /**
5+ src /**
36.gitignore
7+ .yarnrc
48vsc-extension-quickstart.md
9+ ** /tsconfig.json
10+ ** /* .map
11+ ** /* .ts
12+ ** /.vscode-test. *
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @hsml/lsp-client" ,
3+ "version" : " 0.1.0" ,
4+ "description" : " HSML Language Server Client" ,
5+ "scripts" : {
6+ "build" : " run-s build:clean build:code" ,
7+ "build:clean" : " rimraf out" ,
8+ "build:code" : " tsup-node" ,
9+ "ts-check" : " tsc" ,
10+ "vscode:prepublish" : " tsc -p ./"
11+ },
12+ "repository" : {
13+ "type" : " git" ,
14+ "url" : " https://github.com/Shinigami92/vscode-hsml"
15+ },
16+ "license" : " MIT" ,
17+ "author" : {
18+ "name" : " Christopher Quadflieg" ,
19+ "email" : " chrissi92@hotmail.de" ,
20+ "url" : " https://github.com/Shinigami92"
21+ },
22+ "publisher" : " hsml-lab" ,
23+ "activationEvents" : [],
24+ "dependencies" : {
25+ "vscode-languageclient" : " 9.0.1"
26+ },
27+ "devDependencies" : {
28+ "@types/vscode" : " 1.98.0" ,
29+ "tsup" : " 8.4.0"
30+ },
31+ "engines" : {
32+ "vscode" : " ^1.98.0"
33+ }
34+ }
Original file line number Diff line number Diff line change 1+ import type { ExtensionContext } from 'vscode' ;
2+ import { workspace } from 'vscode' ;
3+ import type {
4+ Executable ,
5+ LanguageClientOptions ,
6+ ServerOptions ,
7+ } from 'vscode-languageclient/node' ;
8+ import { LanguageClient } from 'vscode-languageclient/node' ;
9+
10+ let client : LanguageClient | undefined ;
11+
12+ export function activate ( context : ExtensionContext ) {
13+ console . debug ( '[@hsml/lsp-client:activate]' , context ) ;
14+
15+ const run : Executable = {
16+ command : '/Users/shinigami/OpenSource/Shinigami92/hsml/target/debug/hsml' ,
17+ args : [ 'lsp' ] ,
18+ } ;
19+
20+ const serverOptions : ServerOptions = {
21+ run,
22+ debug : {
23+ ...run ,
24+ } ,
25+ } ;
26+
27+ const clientOptions : LanguageClientOptions = {
28+ documentSelector : [ { scheme : 'file' , language : 'hsml' } ] ,
29+ synchronize : {
30+ fileEvents : workspace . createFileSystemWatcher ( '**/*.hsml' ) ,
31+ } ,
32+ } ;
33+
34+ client = new LanguageClient (
35+ 'languageServerHsml' ,
36+ 'HSML Language Server' ,
37+ serverOptions ,
38+ clientOptions
39+ ) ;
40+
41+ console . debug ( '[@hsml/lsp-client:activate]' , 'starting client' ) ;
42+ client . start ( ) ;
43+ }
44+
45+ export function deactivate ( ) : Promise < void > | undefined {
46+ console . debug ( '[@hsml/lsp-client:deactivate]' ) ;
47+ if ( ! client ) {
48+ return undefined ;
49+ }
50+
51+ console . debug ( '[@hsml/lsp-client:deactivate]' , 'stopping client' ) ;
52+ return client . stop ( ) ;
53+ }
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "target" : " ES2022" ,
4+ "lib" : [" ES2022" ],
5+ "noEmit" : true ,
6+ "rootDir" : " src" ,
7+ "strict" : true
8+ },
9+ "include" : [" src" ],
10+ "exclude" : [" node_modules" ]
11+ }
Original file line number Diff line number Diff line change 1+ import { defineConfig } from 'tsup' ;
2+
3+ export default defineConfig ( {
4+ entry : [ 'src/extension.ts' ] ,
5+ external : [ 'vscode' ] ,
6+ outDir : 'out' ,
7+ clean : true ,
8+ format : 'cjs' ,
9+ target : [ 'es2022' , 'node20' ] ,
10+ platform : 'node' ,
11+ minify : false ,
12+ bundle : true ,
13+ } ) ;
You can’t perform that action at this time.
0 commit comments