-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with a custom editor extension #957
Comments
The entrypoint indicates which set of commands from features should be used, it should not be a problem. Your selector looks fine too - assuming that the cell does have such a class (but it would not prevent diagnostics/highlights from working).
|
Thanks for your response. We are using JL 3.6.3 as of now.. Not sure when we will move to 4 :)
But I think even if we implement the completer, the syntax highlighting, etc. should atleast work, which doesn't so the suffix thing also might be the issue. We actually need to have it integrated with sql-language-server but was trying with jedi-language-server for a simple POC. |
I meant changing
to
In 3.x you need to add a completion connector and commands (against, getting simpler in 4.0). I would start by hooking up |
Thanks for your inputs, after registering the CompletionConnector, the completion works:
But syntax highlighting, hover, etc does not work. Will we have to register some additional connectors for it? |
No, no additional connectors required. Can you record messages sent between server and client? Are there any? There are some logging options in settings but these do not cover all messages unfortunately so best choice is to listen on the websocket (e.g. in Firefox devtools) or adding a logger on the server side. |
We also added custom commands for the completor to work:
Any ideas if we should we do something additional for SQL language? |
I would really need more details to say, e.g. logging from browser console (Is there "Cold not find a VirtualEditor suitable for the provided set of editors" message?), list of messages on the websocket wire, etc. Also, if you could share a minimum standalone reproducible example, I could take a look. If you cannot share publicly feel free to reach out via email/other platform. |
Thanks for all the help! Was able to get this working by exporting all the required files in index.ts of the LSP extension:
and then importing in my extension. All functionalities working including Hover, Diagnostics Panel, autocomplete, etc. 😊 |
Description
Hi Folks, We at LinkedIn have created a custom extension using a Notebook Cell (a single cell which acts as a workbook). We want to enable the jupyterlab-lsp extension for the same editor. We got to the "Fully Initialised" state, but the LSP functionality like completion/highlighting, etc. doesn't work.
Example: on pressing "Tab", it doesn't get registered as a Keydown event and the extra spaces come up.
JupyterLab: 3.6.3
jupyterlab-lsp version: 4.2.0
Attached screenshots above.
Steps
To get it to "Fully Initiallized" state, overrode the existing FileEditorAdapter (@jupyter-lsp/jupyterlab-lsp/lib/adapters/file_editor/file_editor):
and then registered it in the adapter manager:
Queries/ Doubts
FileEditorContextMenuEntryPoint
. Didn't understand the significance for it. Should we create our own entry point?selector: '.swb-editor-cell'
. Not sure if it needs to be registered somewhere or we have to use any of the existing selectors.Would really appreciate any pointers.
Thanks.
The text was updated successfully, but these errors were encountered: