report actual zls version in initialize response (#759)

This commit is contained in:
Techatrix 2022-11-16 23:58:37 +01:00 committed by GitHub
parent 31584cff60
commit 28be9a4cc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ const Server = @This();
const std = @import("std"); const std = @import("std");
const zig_builtin = @import("builtin"); const zig_builtin = @import("builtin");
const build_options = @import("build_options");
const Config = @import("Config.zig"); const Config = @import("Config.zig");
const DocumentStore = @import("DocumentStore.zig"); const DocumentStore = @import("DocumentStore.zig");
const requests = @import("requests.zig"); const requests = @import("requests.zig");
@ -1547,7 +1548,7 @@ fn initializeHandler(server: *Server, writer: anytype, id: types.RequestId, req:
.InitializeResult = .{ .InitializeResult = .{
.serverInfo = .{ .serverInfo = .{
.name = "zls", .name = "zls",
.version = "0.1.0", .version = build_options.version,
}, },
.capabilities = .{ .capabilities = .{
.positionEncoding = server.offset_encoding, .positionEncoding = server.offset_encoding,