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 = &.{"("},
|
.triggerCharacters = &.{"("},
|
||||||
.retriggerCharacters = &.{","},
|
.retriggerCharacters = &.{","},
|
||||||
},
|
},
|
||||||
.textDocumentSync = .Full,
|
.textDocumentSync = .{
|
||||||
|
.openClose = true,
|
||||||
|
.change = .Full,
|
||||||
|
.save = true,
|
||||||
|
},
|
||||||
.renameProvider = true,
|
.renameProvider = true,
|
||||||
.completionProvider = .{ .resolveProvider = false, .triggerCharacters = &[_][]const u8{ ".", ":", "@", "]" }, .completionItem = .{ .labelDetailsSupport = true } },
|
.completionProvider = .{ .resolveProvider = false, .triggerCharacters = &[_][]const u8{ ".", ":", "@", "]" }, .completionItem = .{ .labelDetailsSupport = true } },
|
||||||
.documentHighlightProvider = 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.
|
// Only includes options we set in our initialize result.
|
||||||
const InitializeResult = struct {
|
const InitializeResult = struct {
|
||||||
offsetEncoding: PositionEncodingKind,
|
offsetEncoding: PositionEncodingKind,
|
||||||
@ -437,14 +447,10 @@ const InitializeResult = struct {
|
|||||||
triggerCharacters: []const string,
|
triggerCharacters: []const string,
|
||||||
retriggerCharacters: []const string,
|
retriggerCharacters: []const string,
|
||||||
},
|
},
|
||||||
textDocumentSync: enum(u32) {
|
textDocumentSync: struct {
|
||||||
None = 0,
|
openClose: bool,
|
||||||
Full = 1,
|
change: TextDocumentSyncKind,
|
||||||
Incremental = 2,
|
save: bool,
|
||||||
|
|
||||||
pub fn jsonStringify(value: @This(), options: std.json.StringifyOptions, out_stream: anytype) !void {
|
|
||||||
try std.json.stringify(@enumToInt(value), options, out_stream);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
renameProvider: bool,
|
renameProvider: bool,
|
||||||
completionProvider: struct {
|
completionProvider: struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user