Use zig-lsp-codegen (#850)

* add lsp.zig

* change references from types.zig to lsp.zig

* remove types.zig and requests.zig

* add tres as a submodule

* transition codebase from types.zig to lsp.zig

* update lsp.zig

* completely overhaul message handler

* fix memory errors

* partially transition tests to lsp.zig

* update lsp.zig

* more test fixes

* disable failing tests

* fix message handling bugs

* fix remaining tests

* access correct union in diff.applyTextEdits

* more message handler fixes

* run zig fmt

* update tres submodule

* fix memory access to freed memory

* simplify initialize_msg for testing

* check if publishDiagnostics is supported
This commit is contained in:
Techatrix
2022-12-27 06:47:57 +00:00
committed by GitHub
parent 941882371c
commit 61c0981294
28 changed files with 9015 additions and 1881 deletions

View File

@@ -92,6 +92,8 @@ pub fn build(b: *std.build.Builder) !void {
const known_folders_path = b.option([]const u8, "known-folders", "Path to known-folders package (default: " ++ KNOWN_FOLDERS_DEFAULT_PATH ++ ")") orelse KNOWN_FOLDERS_DEFAULT_PATH;
exe.addPackage(.{ .name = "known-folders", .source = .{ .path = known_folders_path } });
exe.addPackage(.{ .name = "tres", .source = .{ .path = "src/tres/tres.zig" } });
if (enable_tracy) {
const client_cpp = "src/tracy/TracyClient.cpp";
@@ -146,6 +148,7 @@ pub fn build(b: *std.build.Builder) !void {
}
tests.addPackage(.{ .name = "zls", .source = .{ .path = "src/zls.zig" }, .dependencies = exe.packages.items });
tests.addPackage(.{ .name = "tres", .source = .{ .path = "src/tres/tres.zig" } });
tests.setBuildMode(.Debug);
tests.setTarget(target);
test_step.dependOn(&tests.step);