Skip to content

Commit 8f9650e

Browse files
committed
Add serverInfo.version to initialize response
This is useful to be able to display the version of the currently attached server. See neovim/neovim#31611 for example. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initializeResult
1 parent 7f76050 commit 8f9650e

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44
<!-- Add all new changes here. They will be moved under a version at release -->
55
* `FIX` Incorrect infer for function array annotation on tables [#2367](https://github.com/LuaLS/lua-language-server/issues/2367)
6+
* `CHG` Add server version information to `initialize` response #2996
67

78
## 3.13.4
89
`2024-12-13`

Diff for: script/provider/provider.lua

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ local furi = require 'file-uri'
1919
local inspect = require 'inspect'
2020
local guide = require 'parser.guide'
2121
local fs = require 'bee.filesystem'
22+
local version = require 'version'
2223

2324
require 'library'
2425

@@ -128,6 +129,7 @@ m.register 'initialize' {
128129
capabilities = cap.getProvider(),
129130
serverInfo = {
130131
name = 'sumneko.lua',
132+
version = version.getVersion(),
131133
},
132134
}
133135
log.debug('Server init', inspect(response))

0 commit comments

Comments
 (0)