File tree 3 files changed +34
-7
lines changed
3 files changed +34
-7
lines changed Original file line number Diff line number Diff line change 1
- let modulePath = './dist/client' ;
2
- try { modulePath = require . resolve ( './out/nodeClientMain' ) ; } catch { }
3
- module . exports = require ( modulePath ) ;
1
+ try {
2
+ module . exports = require ( './out/nodeClientMain' ) ;
3
+ } catch { }
4
+
5
+ module . exports = require ( './dist/client' ) ;
Original file line number Diff line number Diff line change 1
- let modulePath = './dist/server' ;
2
- try { modulePath = require . resolve ( '@volar/vue-language-server/bin/vue-language-server' ) ; } catch { }
3
- module . exports = require ( modulePath ) ;
1
+ try {
2
+ module . exports = require ( '@volar/vue-language-server/bin/vue-language-server' ) ;
3
+ } catch { }
4
+
5
+ module . exports = require ( './dist/server' ) ;
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export function activate(context: vscode.ExtensionContext) {
49
49
runOptions . execArgv . push ( "--max-old-space-size=" + maxOldSpaceSize ) ;
50
50
}
51
51
const debugOptions : lsp . ForkOptions = { execArgv : [ '--nolazy' , '--inspect=' + port ] } ;
52
- const serverOptions : lsp . ServerOptions = {
52
+ let serverOptions : lsp . ServerOptions = {
53
53
run : {
54
54
module : serverModule . fsPath ,
55
55
transport : lsp . TransportKind . ipc ,
@@ -61,6 +61,29 @@ export function activate(context: vscode.ExtensionContext) {
61
61
options : debugOptions
62
62
} ,
63
63
} ;
64
+ const bunPath : string | undefined = undefined ; // path to .bun/bin/bun
65
+ if ( bunPath ) {
66
+ serverOptions = {
67
+ run : {
68
+ transport : {
69
+ kind : lsp . TransportKind . socket ,
70
+ port : port + 10 ,
71
+ } ,
72
+ options : runOptions ,
73
+ command : bunPath ,
74
+ args : [ 'run' , serverModule . fsPath ] ,
75
+ } ,
76
+ debug : {
77
+ transport : {
78
+ kind : lsp . TransportKind . socket ,
79
+ port : port + 10 ,
80
+ } ,
81
+ options : debugOptions ,
82
+ command : bunPath ,
83
+ args : [ 'run' , serverModule . fsPath ] ,
84
+ } ,
85
+ } ;
86
+ }
64
87
const clientOptions : lsp . LanguageClientOptions = {
65
88
middleware,
66
89
documentSelector : langs . map < lsp . DocumentFilter > ( lang => ( { language : lang } ) ) ,
You can’t perform that action at this time.
0 commit comments