This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Conversation
This file contains 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
This pull request has been mentioned on Jupyter Community Forum. There might be relevant details there: https://discourse.jupyter.org/t/create-extension-to-provide-custom-cell-editor/2819/2 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 is the prolongation of #22 pushing for higher integration of monaco in Jupyterlab by replacing CodeMirror editor services.
This is highly experimental and raises questions.
LSP integration
rootUri
folder. In code editor (like vscode), the package folder is easily identified as such. But in the case of JupyterLab, the root folder of the server may be too broad compare to the folder of interest for the user. In particular in online configuration through JupyterHub, the root folder will be the user home folder that probably will contain multiple study sub folders. So should the user specified a specific folder asrootUri
.Location
andTextDocumentIdentifier
in the specification). But from what I saw,CodeEditor.IModel
relies only on mimetypes. I think this is the reason why the current code is raising warning when multiple files are opened - as they are not related to uri. It is kind of lost; lacking context information from text sources. I presumed this could be improved by overwriting theFileEditor
to have the LSP connection driven by the file opening/closing action rather than theonMimeTypeChanged
event (jupyterlab-monaco/src/editor.ts
Line 633 in 21e6ef9
path
attribute inCodeEditor.IModel
.CodeMirror suppression
The current implementation is far from complete. Main functions missing:
Undo/Redo connectionSomething oddThe content text is not available directly in the constructor. I had to introduce a timeout before loading it in the editor.corrected by 34fedb1