diff --git a/src/zls.zig b/src/zls.zig index ab68744..8870132 100644 --- a/src/zls.zig +++ b/src/zls.zig @@ -30,6 +30,7 @@ pub const goto = @import("features/goto.zig"); pub const hover_handler = @import("features/hover.zig"); pub const selection_range = @import("features/selection_range.zig"); pub const diagnostics = @import("features/diagnostics.zig"); +pub const legacy_json = @import("legacy_json.zig"); comptime { const std = @import("std"); diff --git a/tests/context.zig b/tests/context.zig index e523ba0..a718ad9 100644 --- a/tests/context.zig +++ b/tests/context.zig @@ -60,7 +60,7 @@ pub const Context = struct { } pub fn deinit(self: *Context) void { - @import("../src/legacy_json.zig").parseFree(Config, allocator, self.config.*); + zls.legacy_json.parseFree(Config, allocator, self.config.*); allocator.destroy(self.config); self.request("shutdown", "{}", null) catch {}; diff --git a/tests/language_features/cimport.zig b/tests/language_features/cimport.zig index 069b519..94da1b4 100644 --- a/tests/language_features/cimport.zig +++ b/tests/language_features/cimport.zig @@ -108,7 +108,7 @@ fn testTranslate(c_source: []const u8) !translate_c.Result { if (!std.process.can_spawn) return error.SkipZigTest; var config: zls.Config = .{}; - defer @import("../../src/legacy_json.zig").parseFree(zls.Config, allocator, config); + defer zls.legacy_json.parseFree(zls.Config, allocator, config); var runtime_zig_version: ?zls.ZigVersionWrapper = null; defer if (runtime_zig_version) |*v| v.free();