autoload/lsp/lspserver.vim | 8 ++++++++ diff --git a/autoload/lsp/lspserver.vim b/autoload/lsp/lspserver.vim index 36bdd3fd2d8ece4fabf19c07c51851b55b42f63d..74e0914762e07694d849d38140afb2353fba828a 100644 --- a/autoload/lsp/lspserver.vim +++ b/autoload/lsp/lspserver.vim @@ -1464,6 +1464,13 @@ return symbol.TagFunc(lspserver, taglocations, pat) enddef +# Returns unique ID used for identifying the various servers +var UniqueServerIdCounter = 0 +def GetUniqueServerId(): number + UniqueServerIdCounter = UniqueServerIdCounter + 1 + return UniqueServerIdCounter +enddef + export def NewLspServer(name_arg: string, path_arg: string, args: list, isSync: bool, initializationOptions: any, workspaceConfig: dict, @@ -1471,6 +1478,7 @@ rootSearchFiles: list, customNotificationHandlers: dict, debug_arg: bool): dict var lspserver: dict = { + id: GetUniqueServerId(), name: name_arg, path: path_arg, args: args,