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 1111
1212 - diagnostics panel works after kernel restart properly ([ #485 ] )
1313 - 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 ] )
1415
1516### ` jupyter-lsp 1.1.1 ` (unreleased)
1617
2021
2122[ #485 ] : https://github.com/krassowski/jupyterlab-lsp/pull/485
2223[ #487 ] : https://github.com/krassowski/jupyterlab-lsp/pull/487
24+ [ #491 ] : https://github.com/krassowski/jupyterlab-lsp/pull/491
2325
2426### ` @krassowski/jupyterlab-lsp 3.1.0 ` (2021-01-17)
2527
Original file line number Diff line number Diff line change @@ -259,10 +259,26 @@ export abstract class WidgetAdapter<T extends IDocumentWidget> {
259259 }
260260
261261 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
265271 ) ;
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+ }
266282 }
267283 }
268284 }
You can’t perform that action at this time.
0 commit comments