neoclide / coc-tsserver

Tsserver extension for coc.nvim that provide rich features like VSCode for javascript & typescript
MIT License
1.05k stars 68 forks source link

Use coc-tsserver LSP while tsserver.enable: false #412

Open igorbrasileiro opened 1 year ago

igorbrasileiro commented 1 year ago

Hi folks, I'm trying to improve my DX and I forked this repo https://github.com/rodrigore/coc-tailwind-intellisense to use this with twind (https://github.com/tw-in-js/twind). This works well if I only use the tsserver and my forked coc extension, which depends on the tsserver. If I enable coc-deno (https://github.com/fannheyward/coc-deno) that disables the coc-tsserver, my extension stop work. So, is there a way that I can use the tsserver LSP even if it's disabled?

image

Info: I'm not familiar enough with coc, lsps, etc.

chemzqm commented 1 year ago

The tsserver won’t be started when it’s disabled, my suggestion is start tsserver in your plugin instead of use coc-tsserver, as the the tsserver is not intended to work with deno code.

igorbrasileiro commented 1 year ago

Should this code activate the tsserver, shouldn't?

const extension = extensions.all.find((ext) => ext.id === typeScriptExtensionId);
if (!extension) {
  return
}
const api = await extension.activate();
api.configurePlugin(pluginId, config);

Where I can find a public doc about the tsserver?

chemzqm commented 1 year ago

It can’t start tsserver since the configuration is read by coc-tsserver. There is a protocol.d.ts in typescript module