LSP Server Autostart Configuration Option
Closed this issue · 1 comments
secretnonempty commented
In certain use cases, we may want to prevent the LSP server from starting automatically. I'd like to propose adding an autostart
option to the LSP configuration, similar to Neovim's LSP implementation.
For reference, Neovim LSP supports this functionality:
:LspStart <config_name> Start the requested server name. Will only successfully start if the command detects a root directory matching the current config. Pass autostart = false to your .setup{} call for a language server if you would like to launch clients solely with this command. Defaults to all servers matching current buffer filetype.
Expected behavior:
- Users could set
autostart: false
to disable automatic startup - LSP servers could then be manually started using
CocList service
when needed
This would give users more control over when LSP services are initialized
fannheyward commented
:h g:coc_start_at_startup
, to disable automatic startup- use
:CocStart
to start server.