Adds User autocmds for started and stopped
Adds two autocmds LanguageClientStarted and LanguageClientStopped that
trigger after LanguageClient is started and stopped respectively.
@@ -299,12 +299,17 @@ class LanguageClient:
self.initialize(rootPath=rootPath, languageId=languageId)
+ if self.nvim.call("exists", "#User#LanguageClientStarted") == 1:
+ self.nvim.command("doautocmd User LanguageClientStarted")
+
@neovim.command("LanguageClientStop")
@args()
def stop(self, languageId: str) -> None:
self.rpc[languageId].run = False
self.exit(languageId=languageId)
del self.server[languageId]
+ if self.nvim.call("exists", "#User#LanguageClientStopped") == 1:
+ self.nvim.command("doautocmd User LanguageClientStopped")
@neovim.function("LanguageClient_initialize")
@args()
