nvim-lspconfig
nvim-lspconfig copied to clipboard
LspStop should remove related autocmds
Language server
No response
Requested feature
LspStop
doesn't deal with the autocmds created by setup
or launch
. I think it'd be better to delete them, so that, after an LspStop
, when you open another file that matches either the FileType
or BufReadPost
event patterns, the LS is NOT launched again, which is a bit unexpected to the unaware user.
It can be argued that this is only necessary is autostart
is false.
Other clients which have this feature
No response
I am not sure if this is 100% correct, but this issue becomes irritating as it always pop up a warning for BufReadPost
concerning an invalid character in the group name:
Erreur détectée en traitant Autocommandes BufReadPost pour "*" :
W18: Caractère invalide dans un nom de groupe
Appuyez sur ENTRÉE ou tapez une commande pour continuer
Erreur détectée en traitant Autocommandes BufReadPost pour "*" :
W18: Caractère invalide dans un nom de groupe
Appuyez sur ENTRÉE ou tapez une commande pour continuer
I think the offending lines are where the autocmd is defined: https://github.com/neovim/nvim-lspconfig/blob/67f0d0025b118e7e328396d7732d97415a9afda4/lua/lspconfig/configs.lua#L69-L72
I found :au! lspconfig
after :LspStop
is a good work-around for the time being.