Cleaned up LSP types, add InitializeResult, no longer use a hardcoded string

This commit is contained in:
Alexandros Naskos
2020-11-06 10:08:20 +02:00
parent 996deb45fe
commit f7eff6632e
6 changed files with 307 additions and 230 deletions

View File

@@ -19,12 +19,12 @@ fn tokenReference(
.uri = handle.uri(),
.range = .{
.start = .{
.line = @intCast(types.Integer, loc.line),
.character = @intCast(types.Integer, loc.column),
.line = @intCast(i64, loc.line),
.character = @intCast(i64, loc.column),
},
.end = .{
.line = @intCast(types.Integer, loc.line),
.character = @intCast(types.Integer, loc.column + offsets.tokenLength(handle.tree, tok, encoding)),
.line = @intCast(i64, loc.line),
.character = @intCast(i64, loc.column + offsets.tokenLength(handle.tree, tok, encoding)),
},
},
});