File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 24
24
"categories" : [
25
25
" Programming Languages"
26
26
],
27
- "activationEvents" : [],
27
+ "activationEvents" : [
28
+ " onLanguage:shaderlab"
29
+ ],
28
30
"main" : " ./out/extension.js" ,
29
31
"contributes" : {
30
32
"commands" : [
31
33
{
32
34
"command" : " vscode-shader.start" ,
33
- "title" : " Start shader-ls"
35
+ "title" : " Start `shader langauge server`"
36
+ },
37
+ {
38
+ "command" : " vscode-shader.stop" ,
39
+ "title" : " Stop `shader langauge server`"
34
40
}
35
41
],
36
42
"configuration" : {
Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ export function activate(context: vscode.ExtensionContext) {
43
43
44
44
// Register the commands
45
45
context . subscriptions . push ( vscode . commands . registerCommand ( 'vscode-shader.start' , start ) ) ;
46
+ context . subscriptions . push ( vscode . commands . registerCommand ( 'vscode-shader.stop' , stop ) ) ;
46
47
47
48
// Start the client. This will also launch the server
48
49
{
49
- console . log ( '[INFO] `shader-language-server` is running!' ) ;
50
50
client . setTrace ( Trace . Verbose ) ;
51
- client . start ( ) ;
51
+ start ( ) ;
52
52
}
53
53
}
54
54
@@ -61,5 +61,12 @@ export function deactivate() {
61
61
}
62
62
63
63
async function start ( ) {
64
- //console.log('test start command!!!!!!!!!!~~');
64
+ client . start ( ) ;
65
+ console . log ( '[INFO] `shader-language-server` is running!' ) ;
66
+ }
67
+
68
+
69
+ async function stop ( ) {
70
+ deactivate ( ) ;
71
+ console . log ( '[INFO] `shader-language-server` has been shutdown!' ) ;
65
72
}
You can’t perform that action at this time.
0 commit comments