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 32
32
- name : Install deps
33
33
run : pnpm install
34
34
35
- # - name: Build
36
- # run: pnpm run build
35
+ - name : Build
36
+ run : pnpm run build
37
37
38
38
# - name: Lint
39
39
# run: pnpm run lint
Original file line number Diff line number Diff line change
1
+ client /out
1
2
node_modules
2
- * .vsix
3
+ * .vsix
4
+ tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change 1
1
{
2
2
"recommendations" : [
3
+ " connor4312.esbuild-problem-matchers" ,
3
4
" dbaeumer.vscode-eslint" ,
4
5
" editorconfig.editorconfig" ,
5
6
" esbenp.prettier-vscode" ,
6
7
" github.vscode-github-actions" ,
7
8
" kravets.vscode-publint" ,
9
+ " ms-vscode.extension-test-runner" ,
8
10
" pflannery.vscode-versionlens" ,
9
11
" redhat.vscode-yaml"
10
12
]
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
2
2
// Use IntelliSense to learn about possible attributes.
3
3
// Hover to view descriptions of existing attributes.
4
4
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
5
{
6
6
"version" : " 0.2.0" ,
7
7
"configurations" : [
8
8
{
9
- "name" : " Extension" ,
9
+ "name" : " Run Extension" ,
10
10
"type" : " extensionHost" ,
11
11
"request" : " launch" ,
12
- "args" : [" --extensionDevelopmentPath=${workspaceFolder}" ]
12
+ "runtimeExecutable" : " ${execPath}" ,
13
+ "args" : [" --extensionDevelopmentPath=${workspaceFolder}" ],
14
+ "outFiles" : [" ${workspaceFolder}/client/out/**/*.js" ],
15
+ "autoAttachChildProcesses" : true
13
16
}
14
17
]
15
18
}
Original file line number Diff line number Diff line change 3
3
"files.associations" : {
4
4
"*.json5" : " jsonc"
5
5
},
6
+ "files.exclude" : {
7
+ "out" : false ,
8
+ "dist" : false
9
+ },
10
+ "search.exclude" : {
11
+ "out" : true ,
12
+ "dist" : true
13
+ },
6
14
"typescript.tsdk" : " node_modules/typescript/lib"
7
15
}
Original file line number Diff line number Diff line change 1
1
.vscode /**
2
2
.vscode-test /**
3
+ out /**
4
+ node_modules /**
5
+ src /**
3
6
.gitignore
7
+ .yarnrc
4
8
vsc-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
+ } ) ;
Original file line number Diff line number Diff line change 3
3
"version" : " 0.1.0" ,
4
4
"description" : " hsml support for Visual Studio Code" ,
5
5
"scripts" : {
6
+ "build" : " pnpm --recursive run build" ,
6
7
"format" : " prettier --cache --write ." ,
7
- "preflight" : " pnpm install && run-s format"
8
+ "preflight" : " pnpm install && run-s format build "
8
9
},
9
10
"displayName" : " hsml" ,
10
11
"categories" : [
11
12
" Programming Languages"
12
13
],
13
14
"type" : " commonjs" ,
15
+ "main" : " ./client/out/extension" ,
14
16
"contributes" : {
17
+ "configuration" : {
18
+ "type" : " object" ,
19
+ "title" : " HSML configuration" ,
20
+ "properties" : {}
21
+ },
15
22
"grammars" : [
16
23
{
17
24
"language" : " hsml" ,
38
45
"npm-run-all2" : " ~7.0.2" ,
39
46
"prettier" : " ~3.5.3" ,
40
47
"prettier-plugin-organize-imports" : " ~4.1.0" ,
41
- "prettier-plugin-packagejson" : " ~2.5.10"
48
+ "prettier-plugin-packagejson" : " ~2.5.10" ,
49
+ "rimraf" : " ~6.0.1"
42
50
},
43
51
"packageManager" : " pnpm@10.6.4" ,
44
52
"engines" : {
You can’t perform that action at this time.
0 commit comments