Skip to content

Guide on migrating a VSCode extension to CoC? #4894

Answered by hexh250786313
martin-braun asked this question in Q&A
Discussion options

You must be logged in to vote

I think this might depend on the type of extension.

For LSP services, I believe that in most cases, simply replacing the API calls from VSCode with the ones from coc.nvim can make the LSP extension work. This is because at the LSP level, many of coc.nvim's APIs are implemented similarly to those of VSCode. For example, the implementation of commands in coc-angular: https://github.com/iamcco/coc-angular/blob/2c39ac6c5c2474cf68b7ae13aa9b5e8fbe04f0e0/src/commands.ts#L9. It simply used import * as vscode from 'coc.nvim'; to make the feature effective. As a comparison, you can look at the original Angular implementation: https://github.com/angular/vscode-ng-language-service/blob/main/client/sr…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@martin-braun
Comment options

Answer selected by martin-braun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants