File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
packages/jupyterlab-lsp/src/adapters Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 11
11
12
12
- diagnostics panel works after kernel restart properly ([ #485 ] )
13
13
- workaround was added to enable ` jedi-language-server ` diagnostics ([ #485 ] )
14
+ - Julia language server will not crash when saving a non-Julia file: fixed sendSaved notification scope ([ #491 ] )
14
15
15
16
### ` jupyter-lsp 1.1.1 ` (unreleased)
16
17
20
21
21
22
[ #485 ] : https://github.com/krassowski/jupyterlab-lsp/pull/485
22
23
[ #487 ] : https://github.com/krassowski/jupyterlab-lsp/pull/487
24
+ [ #491 ] : https://github.com/krassowski/jupyterlab-lsp/pull/491
23
25
24
26
### ` @krassowski/jupyterlab-lsp 3.1.0 ` (2021-01-17)
25
27
Original file line number Diff line number Diff line change @@ -259,10 +259,26 @@ export abstract class WidgetAdapter<T extends IDocumentWidget> {
259
259
}
260
260
261
261
if ( state === 'completed' ) {
262
- for ( let connection of this . connection_manager . connections . values ( ) ) {
263
- connection . sendSaved (
264
- this . virtual_editor . virtual_document . document_info
262
+ // note: must only be send to the appropriate connections as
263
+ // some servers (Julia) break if they receive save notification
264
+ // for a document that was not opened before, see:
265
+ // https://github.com/krassowski/jupyterlab-lsp/issues/490
266
+ const documents_to_save = [ this . virtual_editor . virtual_document ] ;
267
+
268
+ for ( let virtual_document of documents_to_save ) {
269
+ let connection = this . connection_manager . connections . get (
270
+ virtual_document . uri
265
271
) ;
272
+ this . console . log (
273
+ 'Sending save notification for' ,
274
+ virtual_document . uri ,
275
+ 'to' ,
276
+ connection
277
+ ) ;
278
+ connection . sendSaved ( virtual_document . document_info ) ;
279
+ for ( let foreign of virtual_document . foreign_documents . values ( ) ) {
280
+ documents_to_save . push ( foreign ) ;
281
+ }
266
282
}
267
283
}
268
284
}
You can’t perform that action at this time.
0 commit comments