feat: configure editor completion triggers from LSP info

This commit is contained in:
CJ van den Berg 2025-12-26 16:02:25 +01:00
parent fe2ea13024
commit 3dcdb64f83
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 36 additions and 10 deletions

View file

@ -3,6 +3,10 @@ table: Table,
const Table = std.StringHashMapUnmanaged(Info);
pub const Info = struct {
trigger_characters: std.ArrayList([]const u8) = .empty,
};
pub fn init(allocator: std.mem.Allocator) @This() {
return .{
.allocator = allocator,
@ -60,10 +64,6 @@ pub fn add(self: *@This(), lsp_arg0: []const u8, iter: *[]const u8) error{ Inval
return value;
}
pub const Info = struct {
trigger_characters: std.ArrayList([]const u8) = .empty,
};
pub fn write_state(self: *@This(), writer: *std.Io.Writer) error{WriteFailed}!void {
try cbor.writeArrayHeader(writer, self.table.count());
var iter = self.table.iterator();