Conversation
Add support for Jupyter notebook documents in the language server, enabling features like completions, hover, definitions, rename, and diagnostics to work within notebook cells. The implementation concatenates all code cells into a single virtual source document, allowing the existing analysis infrastructure to work unchanged. Each cell's content is joined with newlines, and `CellRange` records track the line offset where each cell begins in the concatenated source. To bridge between cell-local positions (used by clients) and global positions (used internally), the following mapping functions are introduced: - `adjust_position`: Converts cell-local position to global position by adding the cell's line offset - `unadjust_position`/`unadjust_range`: Converts global position back to cell-local coordinates, also returning the cell URI These mappings are applied at LSP request entry points (completions, hover, definition, rename, etc.) to adjust incoming positions, and when constructing responses to convert ranges back to cell coordinates. For diagnostics, `map_notebook_diagnostics transforms diagnostics computed on the concatenated source into per-cell diagnostics by distributing them to the appropriate cell URIs based on line offsets. Notebook document synchronization handles incremental text changes since `NotebookDocumentSyncOptions` does not provide an equivalent to `TextDocumentSyncKind.Full` for cell content. jetls-client: Update vscode-languageclient to 10.0.0-next.18 to enable pull diagnostics support for notebook cells. This requires updating tsconfig.json to use node16 module resolution and es2022 target, and switching to `LogOutputChannel` as required by the new version. LSP: Move `NotebookDocumentFilter` and `NotebookCellTextDocumentFilter` to basic-json-structures.jl to allow `DocumentSelector` to include notebook cell text document filters as per LSP 3.17.0 specification.
Change the markdown link format from `#L<line>C<character>` to `#L<line>,<character>` for source location links. The previous format with 'C' delimiter was not correctly parsed by VS Code - only the line number was recognized while the column was ignored. The new comma-delimited format follows VS Code's implementation and is also supported by other LSP clients like Sublime Text's LSP plugin. Closes #281
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR releases version
2025-12-08.Checklist
release / Test JETLS.jl with release environmentrelease / Test jetls executable with release environmentPost-merge
releases/2025-12-08branch can be deleted after merging