LSP: set InitializeParams.rootPath value #11838

InitializeParams.rootPath is deprecated now. But some language servers still use it.
This commit is contained in:
Hirokazu Hata 2020-02-09 15:51:02 +09:00 committed by GitHub
parent 1f479fffbf
commit dd8b29cfe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -452,7 +452,7 @@ function lsp.start_client(config)
-- The rootPath of the workspace. Is null if no folder is open.
--
-- @deprecated in favour of rootUri.
rootPath = nil;
rootPath = config.root_dir;
-- The rootUri of the workspace. Is null if no folder is open. If both
-- `rootPath` and `rootUri` are set `rootUri` wins.
rootUri = vim.uri_from_fname(config.root_dir);