Merge pull request #132 from truemedian/master

Add semantic tokens to config build step
This commit is contained in:
Alexandros Naskos 2020-07-04 18:43:19 +03:00 committed by GitHub
commit aac8fc7b0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,6 +15,7 @@ pub fn config(step: *std.build.Step) anyerror!void {
const lib_path = try zinput.askDirPath(builder.allocator, "What is your Zig lib path (path that contains the 'std' folder)?", 512); const lib_path = try zinput.askDirPath(builder.allocator, "What is your Zig lib path (path that contains the 'std' folder)?", 512);
const snippets = try zinput.askBool("Do you want to enable snippets?"); const snippets = try zinput.askBool("Do you want to enable snippets?");
const style = try zinput.askBool("Do you want to enable style warnings?"); const style = try zinput.askBool("Do you want to enable style warnings?");
const semantic_tokens = try zinput.askBool("Do you want to enable semantic highlighting?");
var dir = try std.fs.cwd().openDir(builder.exe_dir, .{}); var dir = try std.fs.cwd().openDir(builder.exe_dir, .{});
defer dir.close(); defer dir.close();
@ -30,6 +31,7 @@ pub fn config(step: *std.build.Step) anyerror!void {
.zig_lib_path = lib_path, .zig_lib_path = lib_path,
.enable_snippets = snippets, .enable_snippets = snippets,
.warn_style = style, .warn_style = style,
.enable_semantic_tokens = semantic_tokens,
}, std.json.StringifyOptions{}, out); }, std.json.StringifyOptions{}, out);
std.debug.warn("Successfully saved configuration options!\n", .{}); std.debug.warn("Successfully saved configuration options!\n", .{});