File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -28,21 +28,13 @@ export class InitializeTextDocumentFeature implements StaticFeature {
2828 if ( Services . get ( ) . languages . match ( documentSelector ! , textDocument ) ) {
2929 await updateFile ( textDocument . uri , textDocument . getText ( ) , languageClient )
3030
31- // send save notification if there is the capability
32- if (
33- textDocumentSyncOptions != null &&
34- textDocumentSyncOptions . save != null &&
35- ( typeof textDocumentSyncOptions . save !== 'boolean' || textDocumentSyncOptions . save )
36- ) {
37- const includeText : boolean = typeof textDocumentSyncOptions . save === 'boolean' ? false : ( textDocumentSyncOptions . save . includeText ?? false )
38-
39- languageClient . sendNotification ( DidSaveTextDocumentNotification . type , {
40- textDocument : {
41- uri : textDocument . uri
42- } ,
43- text : includeText ? textDocument . getText ( ) : undefined
44- } )
45- }
31+ // Always send notification even if the server doesn't support it (because csharp register the didSave feature too late)
32+ languageClient . sendNotification ( DidSaveTextDocumentNotification . type , {
33+ textDocument : {
34+ uri : textDocument . uri
35+ } ,
36+ text : textDocument . getText ( )
37+ } )
4638 }
4739 }
4840
You can’t perform that action at this time.
0 commit comments