Resolving conflict with denols and tsserver

Hi all,

I have denols and tsserver coexisting within the list of LSPs I have. This issue I’m brining up isn’t a big deal but I was wondering if anyone had any ideas on how to suppress these “Autostart for tsserver failed” or “Autostart for denols failed” warnings that are logged whenever I open a new buffer.

So typically if I am working in a Deno project, I would see “Autostart for tsserver failed” while in a regular Node project I would see “Autostart for denols failed”.

I have a minimal configuration for these two LSP clients.

nvim_lsp.tsserver.setup{
  on_attach = on_attach,
  capabilities = lsp_capabilities,
  root_dir = nvim_lsp.util.root_pattern("package.json")
}

nvim_lsp.denols.setup {
  on_attach = on_attach,
  capabilities = lsp_capabilities,
  root_dir = nvim_lsp.util.root_pattern("deno.json"),
  init_options = {
    lint = true,
  }
}

Any help on this would be appreciated!

It’s not possible to suppress the message. It’s just a warning that we’ve found a filetype that matches your configured servers, but it doesn’t match the root pattern so we’re not starting it. For multiple server’s operating on the same language it’s tricky. The only reliable way to distinguish between a deno and TS project that I know is assessing the root pattern, and there’s not a good way to determine if the fact that root resolution failed is because you are in a ts/deno project or if you’re just opening a bare file.

I’ll consider rewording the message to make it less alarming. I don’t want people getting confused at to why a server isn’t starting.

1 Like