feat: configure editor completion triggers from LSP info
This commit is contained in:
parent
fe2ea13024
commit
3dcdb64f83
4 changed files with 36 additions and 10 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue