From: Andreas Louv Date: Sat, 20 May 2023 19:38:47 +0000 (+0200) Subject: Add error checking for the config "processDiagHandler" X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ef575cffa48511524b5c9dbb9e828e91b92dc6ce;p=vim-lsp.git Add error checking for the config "processDiagHandler" --- diff --git a/autoload/lsp/lsp.vim b/autoload/lsp/lsp.vim index edecb3f..4b13403 100644 --- a/autoload/lsp/lsp.vim +++ b/autoload/lsp/lsp.vim @@ -614,6 +614,11 @@ export def AddServer(serverList: list>) var ProcessDiagHandler: func = null_function if server->has_key('processDiagHandler') + if server.processDiagHandler->type() != v:t_func + util.ErrMsg($'Setting of processDiagHandler {server.processDiagHandler} is not a Funcref nor lambda') + return + endif + ProcessDiagHandler = server.processDiagHandler endif