changes to support inline completion#1151
Conversation
| const languageClientOptions: LanguageClientOptions = getLanguageClientOptions(logfile, externalXmlSettings, requirementsData, context); | ||
| languageClient = new LanguageClient('xml', 'XML Support', executable, languageClientOptions); | ||
|
|
||
| languageClient.registerProposedFeatures(); |
There was a problem hiding this comment.
Why you need to do that, please add comments to explain why you need to do that.
There was a problem hiding this comment.
In vscode-languageclient version 9.0.0, inline completion (textDocument/inlineCompletion) is a proposed feature. This means you must call client.registerProposedFeatures() in your client extension code for inline completions to work
| const workEdits = new WorkspaceEdit(); | ||
| for (const edit of lspTextDocumentEdit.edits) { | ||
| workEdits.replace(documentURI, languageClient.protocol2CodeConverter.asRange(edit.range), edit.newText); | ||
| if ('newText' in edit) { |
There was a problem hiding this comment.
What about other usecases?
There was a problem hiding this comment.
This is the only scenario where we are using lspTextDocumentEdit
| "jdk-utils": "^0.4.3", | ||
| "path-exists": "^4.0.0", | ||
| "vscode-languageclient": "^8.0.1", | ||
| "vscode-languageclient": "^9.0.0", |
There was a problem hiding this comment.
Why you are not using 1.0.0 ?
There was a problem hiding this comment.
10.0.0 is a major release
Package Export Rules: The library strictly utilizes the exports subpath property in its package.json file rather than older main and typings properties. This means explicit subpath imports like vscode-languageclient/node or vscode-languageclient/browser must be configured correctly alongside a matching moduleResolution (such as node16 or nodenext) in your tsconfig.json.
Minimum Engine Requirements: This version increases the minimum VS Code host editor requirement to ^1.91.0 or newer.
Runtime Dependencies: Built using TypeScript 5.9.x, the library compiles targeting Node.js 22.13.14 and es2022 specifications
This would introduce significant changes.. for LSP 3.18 to work, 9.0.0 is enough
There was a problem hiding this comment.
Thanks for your explanation.
Fixes eclipse-lemminx/lemminx#1780
Language Server PR:- eclipse-lemminx/lemminx#1784
Please make sure to build LS in local using npm run build-server as LS changes are not released as snapshot