diff --git a/autoload/lsp/lsp.vim b/autoload/lsp/lsp.vim index 507eb00f..24cf5895 100644 --- a/autoload/lsp/lsp.vim +++ b/autoload/lsp/lsp.vim @@ -91,6 +91,11 @@ enddef # Add a LSP server for a filetype def LspAddServer(ftype: string, lspsrv: dict) var lspsrvlst = ftypeServerMap->has_key(ftype) ? ftypeServerMap[ftype] : [] + for l in lspsrvlst + if l['name'] == lspsrv['name'] + return + endif + endfor lspsrvlst->add(lspsrv) ftypeServerMap[ftype] = lspsrvlst enddef