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 2424 "categories" : [
2525 " Programming Languages"
2626 ],
27- "activationEvents" : [],
27+ "activationEvents" : [
28+ " onLanguage:shaderlab"
29+ ],
2830 "main" : " ./out/extension.js" ,
2931 "contributes" : {
3032 "commands" : [
3133 {
3234 "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`"
3440 }
3541 ],
3642 "configuration" : {
Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ export function activate(context: vscode.ExtensionContext) {
4343
4444 // Register the commands
4545 context . subscriptions . push ( vscode . commands . registerCommand ( 'vscode-shader.start' , start ) ) ;
46+ context . subscriptions . push ( vscode . commands . registerCommand ( 'vscode-shader.stop' , stop ) ) ;
4647
4748 // Start the client. This will also launch the server
4849 {
49- console . log ( '[INFO] `shader-language-server` is running!' ) ;
5050 client . setTrace ( Trace . Verbose ) ;
51- client . start ( ) ;
51+ start ( ) ;
5252 }
5353}
5454
@@ -61,5 +61,12 @@ export function deactivate() {
6161}
6262
6363async 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!' ) ;
6572}
You can’t perform that action at this time.
0 commit comments