@@ -29,9 +29,9 @@ import {
29
29
WorkspaceSymbol
30
30
} from "vscode-languageserver" ;
31
31
32
- import { CompletionItem , Hover , Location } from "vscode-languageserver-types"
32
+ import { CompletionItem , Hover , Location } from "vscode-languageserver-types" ;
33
33
34
- import { createConnection } from "vscode-languageserver/node"
34
+ import { createConnection } from "vscode-languageserver/node" ;
35
35
36
36
import { URI } from "vscode-uri" ;
37
37
import { TextDocument } from "vscode-languageserver-textdocument" ;
@@ -48,6 +48,8 @@ import { initializeQuarto } from "./quarto";
48
48
import { registerDiagnostics } from "./diagnostics" ;
49
49
50
50
51
+ console . log ( 'LSP INDEX CODE PATH before createConnection' ) ;
52
+
51
53
// Create a connection for the server. The connection uses Node's IPC as a transport.
52
54
// Also include all preview / proposed LSP features.
53
55
const connection = createConnection ( ProposedFeatures . all ) ;
@@ -72,7 +74,10 @@ let initializationOptions: LspInitializationOptions | undefined;
72
74
// Markdown language service
73
75
let mdLs : IMdLanguageService | undefined ;
74
76
77
+ console . log ( 'LSP INDEX CODE PATH' ) ;
78
+
75
79
connection . onInitialize ( ( params : InitializeParams ) => {
80
+ console . log ( 'LSP INDEX CODE PATH onInitialize' ) ;
76
81
// Set log level from initialization options if provided so that we use the
77
82
// expected level as soon as possible
78
83
const initLogLevel = Logger . parseLogLevel (
@@ -98,7 +103,7 @@ connection.onInitialize((params: InitializeParams) => {
98
103
}
99
104
100
105
return mdLs ?. getCompletionItems ( document , params . position , params . context , config , token ) || [ ] ;
101
- } )
106
+ } ) ;
102
107
103
108
connection . onHover ( async ( params , token ) : Promise < Hover | null | undefined > => {
104
109
logger . logRequest ( 'hover' ) ;
@@ -108,7 +113,7 @@ connection.onInitialize((params: InitializeParams) => {
108
113
return null ;
109
114
}
110
115
return mdLs ?. getHover ( document , params . position , config , token ) ;
111
- } )
116
+ } ) ;
112
117
113
118
114
119
connection . onDocumentLinks ( async ( params , token ) : Promise < DocumentLink [ ] > => {
@@ -214,6 +219,7 @@ connection.onInitialize((params: InitializeParams) => {
214
219
215
220
// further config dependent initialization
216
221
connection . onInitialized ( async ( ) => {
222
+ console . log ( 'LSP INDEX CODE PATH onInitialized' ) ;
217
223
logger . logNotification ( 'initialized' ) ;
218
224
219
225
// sync config if possible
@@ -249,7 +255,7 @@ connection.onInitialized(async () => {
249
255
capabilities ! ,
250
256
config ,
251
257
logger
252
- )
258
+ ) ;
253
259
254
260
// initialize parser
255
261
const parser = markdownitParser ( ) ;
@@ -279,7 +285,7 @@ connection.onInitialized(async () => {
279
285
onRequest ( method : string , handler : ( params : unknown [ ] ) => Promise < unknown > ) {
280
286
return connection . onRequest ( method , handler ) ;
281
287
}
282
- }
288
+ } ;
283
289
284
290
// register custom methods
285
291
registerCustomMethods ( quarto , lspConnection , documents ) ;
0 commit comments