Skip to content

Commit e7c21f2

Browse files
author
Loïc Mangeonjean
committed
doc: add comment
1 parent edf93fe commit e7c21f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/infrastructure.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ export abstract class CodinGameInfrastructure implements Infrastructure {
137137
}
138138

139139
public getInitializationOptions (): LSPAny {
140+
// Provide all open model content to the backend so it's able to write them on the disk
141+
// BEFORE starting the server or registering the workspace folders
142+
// The didOpen notification already contain the file content but some LSP (like gopls)
143+
// don't use it and needs the file to be up-to-date on the disk before the workspace folder is added
140144
const files = monaco.editor
141145
.getModels()
142146
.filter((model) => model.uri.scheme === 'file')

0 commit comments

Comments
 (0)