chore(lsp): clean up initialization process (#16369)

* send vim.NIL instead of not sending workspaceFolders
* read fallback rootPath and rootUri from workspaceFolders
* update documentation
This commit is contained in:
Michael Lingelbach
2021-11-21 11:39:30 -05:00
committed by GitHub
parent 120a881630
commit a2749482d9
5 changed files with 65 additions and 53 deletions

View File

@@ -66,7 +66,10 @@ local function fake_lsp_server_setup(test_name, timeout_ms, options)
end
end;
});
root_dir = vim.loop.cwd();
workspace_folders = {{
uri = 'file://' .. vim.loop.cwd(),
name = 'test_folder',
}};
on_init = function(client, result)
TEST_RPC_CLIENT = client
vim.rpcrequest(1, "init", result)
@@ -153,7 +156,10 @@ describe('LSP', function()
"-c", string.format("lua TEST_NAME = %q", test_name),
"-c", "luafile "..fixture_filename;
};
root_dir = vim.loop.cwd();
workspace_folders = {{
uri = 'file://' .. vim.loop.cwd(),
name = 'test_folder',
}};
}
end
TEST_CLIENT1 = test__start_client()