You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written a custom extension which supports files with the .cpw suffix. After opening a .cpw file, there will be 0 to N code editors (created by newInlineEditor of the CodeMirrorEditorFactory instance).
I expect to get the code completion feature in these code editors.
I wrote a CPWAdapter by imitating NotebookAdapter and FileEditorAdapter. It can successfully start the LSP connection and communicate for .cpw files, but I haven't found the correct implementation to enable the code completion feature for the code editors. I'm asking for help.
I have created a minimum reproducible code repository. Please evaluate my code and let me know if there are any problems with my implementation process.
In the activate function in index.ts, I use WidgetTracker and new CPWAdapter in widgetAdded.
In CPWWidget, code editors are created in the content area. (In the actual business process, code editors are generated dynamically and there may be 0 or more of them.)
After a certain code editor gets focused, it is designated as the activeEditor.
In CPWAdapter, when the activeEditor is switched or its content changes, the VirtualDocument is updated.
The text was updated successfully, but these errors were encountered:
This is the current effect. I expect the code completion of each code editor to be independent. Therefore, the content of the VirtualDocument should only contain the content of the activeEditor, rather than the content of all the code editors.
However, I found that some features are still missing in my editor instance, such as the hover feature, the highlighting of error, and so on. That is to say, the HoverFeature and other features in the LSP are not working in my editor instance. What should I do next?
I have written a custom extension which supports files with the .cpw suffix. After opening a .cpw file, there will be 0 to N code editors (created by
newInlineEditor
of theCodeMirrorEditorFactory
instance).I expect to get the code completion feature in these code editors.
I wrote a
CPWAdapter
by imitatingNotebookAdapter
andFileEditorAdapter
. It can successfully start the LSP connection and communicate for .cpw files, but I haven't found the correct implementation to enable the code completion feature for the code editors. I'm asking for help.I have created a minimum reproducible code repository. Please evaluate my code and let me know if there are any problems with my implementation process.
minimum reproducible
Current progress:
WidgetTracker
and newCPWAdapter
in widgetAdded.CPWWidget
, code editors are created in the content area. (In the actual business process, code editors are generated dynamically and there may be 0 or more of them.)activeEditor
.CPWAdapter
, when theactiveEditor
is switched or its content changes, theVirtualDocument
is updated.The text was updated successfully, but these errors were encountered: