explicit request didSave notification from client (#676)
This commit is contained in:
parent
ecf4e112a5
commit
f3889cfe8d
@ -1532,7 +1532,11 @@ fn initializeHandler(server: *Server, writer: anytype, id: types.RequestId, req:
|
||||
.triggerCharacters = &.{"("},
|
||||
.retriggerCharacters = &.{","},
|
||||
},
|
||||
.textDocumentSync = .Full,
|
||||
.textDocumentSync = .{
|
||||
.openClose = true,
|
||||
.change = .Full,
|
||||
.save = true,
|
||||
},
|
||||
.renameProvider = true,
|
||||
.completionProvider = .{ .resolveProvider = false, .triggerCharacters = &[_][]const u8{ ".", ":", "@", "]" }, .completionItem = .{ .labelDetailsSupport = true } },
|
||||
.documentHighlightProvider = true,
|
||||
|
@ -429,6 +429,16 @@ pub const PositionEncodingKind = enum {
|
||||
}
|
||||
};
|
||||
|
||||
const TextDocumentSyncKind = enum(u32) {
|
||||
None = 0,
|
||||
Full = 1,
|
||||
Incremental = 2,
|
||||
|
||||
pub fn jsonStringify(value: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void {
|
||||
try std.json.stringify(@enumToInt(value), options, out_stream);
|
||||
}
|
||||
};
|
||||
|
||||
// Only includes options we set in our initialize result.
|
||||
const InitializeResult = struct {
|
||||
offsetEncoding: PositionEncodingKind,
|
||||
@ -437,14 +447,10 @@ const InitializeResult = struct {
|
||||
triggerCharacters: []const string,
|
||||
retriggerCharacters: []const string,
|
||||
},
|
||||
textDocumentSync: enum(u32) {
|
||||
None = 0,
|
||||
Full = 1,
|
||||
Incremental = 2,
|
||||
|
||||
pub fn jsonStringify(value: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void {
|
||||
try std.json.stringify(@enumToInt(value), options, out_stream);
|
||||
}
|
||||
textDocumentSync: struct {
|
||||
openClose: bool,
|
||||
change: TextDocumentSyncKind,
|
||||
save: bool,
|
||||
},
|
||||
renameProvider: bool,
|
||||
completionProvider: struct {
|
||||
|
Loading…
Reference in New Issue
Block a user