Implement semantic tokens for regular comments

This commit is contained in:
Luuk de Gram
2021-03-07 14:51:47 +01:00
parent ac8a00342e
commit e2f4bbf2f3
6 changed files with 110 additions and 11 deletions

View File

@@ -14,7 +14,7 @@ fn tokenReference(
context: anytype,
comptime handler: anytype,
) !void {
const loc = offsets.tokenRelativeLocation(handle.tree, 0, tok, encoding) catch return;
const loc = offsets.tokenRelativeLocation(handle.tree, 0, handle.tree.tokens.items(.start)[tok], encoding) catch return;
try handler(context, types.Location{
.uri = handle.uri(),
.range = .{