You can use this alternative (not very much up to date anyway): https://github.com/FurqanSoftware/codemirror-languageserver
LSP client for CodeMirror, intends to be a more updated and better version of the original client --> https://github.com/wylieconlon/lsp-editor-adapter (thanks to Wylie :D )
- Autocompletion improvements
- Built-in icons
- Support for custom autocompletion dropmenus
npm install lsp-codemirror
import CodeMirror from 'codemirror';
import { LspWsConnection, CodeMirrorAdapter } from 'lsp-codemirror';
const editor = CodeMirror(document.body,{})
const javascriptConnection = new LspWsConnection({
serverUri: 'ws://localhost:2089/javascript',
mode: 'javascript',
rootUri: `file:///users/superman`,
documentUri: `file:///users/superman/index.js`,
documentText: () => editor.getValue(),
}).connect(new WebSocket('ws://localhost:2089/javascript'));
const javascriptAdapter = new CodeMirrorAdapter(javascriptConnection, {
quickSuggestionsDelay: 25,
}, editor);
All options for CodeMirrorAdapter in:
Line 144 in aed38cc