Skip to content

Commit

Permalink
Fix adding server multiple time (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
nv-quan authored Sep 21, 2024
1 parent ce7ce83 commit 5a7e33e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions autoload/lsp/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ enddef
# Add a LSP server for a filetype
def LspAddServer(ftype: string, lspsrv: dict<any>)
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
Expand Down

0 comments on commit 5a7e33e

Please sign in to comment.