set custom config for tests

This commit is contained in:
Techatrix 2022-09-03 15:21:56 +02:00
parent d8b574a0cc
commit bcf8bc7094
3 changed files with 7 additions and 7 deletions

View File

@ -18,7 +18,13 @@ pub const Context = struct {
var context = Context{ var context = Context{
.server = try Server.init( .server = try Server.init(
allocator, allocator,
.{}, .{
.enable_ast_check_diagnostics = false,
.enable_semantic_tokens = true,
.enable_inlay_hints = true,
.inlay_hints_exclude_single_argument = false,
.inlay_hints_show_builtin = true,
},
null, null,
.debug, .debug,
), ),

View File

@ -71,10 +71,6 @@ fn testInlayHints(source: []const u8) !void {
var ctx = try Context.init(); var ctx = try Context.init();
defer ctx.deinit(); defer ctx.deinit();
ctx.server.config.enable_inlay_hints = true;
ctx.server.config.inlay_hints_exclude_single_argument = false;
ctx.server.config.inlay_hints_show_builtin = true;
const open_document = requests.OpenDocument{ const open_document = requests.OpenDocument{
.params = .{ .params = .{
.textDocument = .{ .textDocument = .{

View File

@ -24,8 +24,6 @@ fn testSemanticTokens(source: []const u8, expected: []const u32) !void {
var ctx = try Context.init(); var ctx = try Context.init();
defer ctx.deinit(); defer ctx.deinit();
ctx.server.config.enable_semantic_tokens = true;
const open_document = requests.OpenDocument{ const open_document = requests.OpenDocument{
.params = .{ .params = .{
.textDocument = .{ .textDocument = .{