Nvim-lspconfig: Start lsp server in the background and reuse on subsequent starts by default

Created on 11 Jul 2020  路  3Comments  路  Source: neovim/nvim-lspconfig

I think this would be a much better model as someone who constantly closes and opens neovim, it's a little annoying to have to wait for the language server to start up sometimes.

If by default it was started in the background and then reused by subsequent startups, things would be very fast.

Interestingly enough, it also delays shutdown if it neovim was just started. i.e if I open a Go file and then instantly press :q to close, neovim takes a second before closing. Without nvim-lsp installed, this does not occur.

Most helpful comment

Should be possible for you to do this already. Just change the command you issue for your configuration. Make some shell script that either starts or connects to a server.

All 3 comments

But who closes the background process?
It is always exists?

Ideally it鈥檇 time-out after it hasn鈥檛 been used in a while and exit. Perhaps we could start it under a parent process that handles that.

Should be possible for you to do this already. Just change the command you issue for your configuration. Make some shell script that either starts or connects to a server.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agriffis picture agriffis  路  5Comments

matklad picture matklad  路  5Comments

dlukes picture dlukes  路  4Comments

DarkDefender picture DarkDefender  路  3Comments

K1DV5 picture K1DV5  路  10Comments