mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
LSP: Add in clientInfo to initalize_params. (#13757)
* Add in clienInfo to initalize_params. Some servers (like Metals in my case) will actually pull this info from the initalize_params and display it in the logs. I know from the server perspective it helps at times to have this available to pull from to have more details about the client and version. You can see that this is part of the spec here: microsoft.github.io/language-server-protocol/specification#initialize
This commit is contained in:
@@ -582,12 +582,19 @@ function lsp.start_client(config)
|
||||
local valid_traces = {
|
||||
off = 'off'; messages = 'messages'; verbose = 'verbose';
|
||||
}
|
||||
local version = vim.version()
|
||||
local initialize_params = {
|
||||
-- The process Id of the parent process that started the server. Is null if
|
||||
-- the process has not been started by another process. If the parent
|
||||
-- process is not alive then the server should exit (see exit notification)
|
||||
-- its process.
|
||||
processId = uv.getpid();
|
||||
-- Information about the client
|
||||
-- since 3.15.0
|
||||
clientInfo = {
|
||||
name = "Neovim",
|
||||
version = string.format("%s.%s.%s", version.major, version.minor, version.patch)
|
||||
};
|
||||
-- The rootPath of the workspace. Is null if no folder is open.
|
||||
--
|
||||
-- @deprecated in favour of rootUri.
|
||||
|
||||
Reference in New Issue
Block a user