feat: add cmake support
This commit is contained in:
		
							parent
							
								
									b0a1b80acb
								
							
						
					
					
						commit
						6491e3c03e
					
				
					 3 changed files with 15 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -17,6 +17,7 @@ pub fn build(b: *std.Build) void {
 | 
			
		|||
    const imports: []const std.Build.Module.Import = if (use_tree_sitter) &.{
 | 
			
		||||
        .{ .name = "build_options", .module = options_mod },
 | 
			
		||||
        .{ .name = "treez", .module = tree_sitter_dep.module("treez") },
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "queries/cmake/highlights.scm"),
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "tree-sitter-agda/queries/highlights.scm"),
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "tree-sitter-bash/queries/highlights.scm"),
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "tree-sitter-c-sharp/queries/highlights.scm"),
 | 
			
		||||
| 
						 | 
				
			
			@ -74,6 +75,7 @@ pub fn build(b: *std.Build) void {
 | 
			
		|||
        ts_queryfile(b, tree_sitter_dep, "tree-sitter-ziggy/tree-sitter-ziggy/queries/highlights.scm"),
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "tree-sitter-ziggy/tree-sitter-ziggy-schema/queries/highlights.scm"),
 | 
			
		||||
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "queries/cmake/injections.scm"),
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "tree-sitter-cpp/queries/injections.scm"),
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "tree-sitter-elixir/queries/injections.scm"),
 | 
			
		||||
        ts_queryfile(b, tree_sitter_dep, "tree-sitter-gitcommit/queries/injections.scm"),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,8 +4,8 @@
 | 
			
		|||
 | 
			
		||||
    .dependencies = .{
 | 
			
		||||
        .@"tree-sitter" = .{
 | 
			
		||||
            .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-dd309424e01e47c9161ecaf727608a97151a0793/source.tar.gz",
 | 
			
		||||
            .hash = "1220f4f30f40b55a2ad5f15152d123c67a4a1b6447408cf9884bc1de26439ace197e",
 | 
			
		||||
            .url = "https://github.com/neurocyte/tree-sitter/releases/download/master-c20cbdfcdb3b9650a873614b2c361a2a2aaeb068/source.tar.gz",
 | 
			
		||||
            .hash = "122042464e2fd94116fe6f63e8939ddb59b5e55b53ed95945537753bee9b119a5089",
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
    .paths = .{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,6 +38,17 @@ pub const conf = .{
 | 
			
		|||
    .parser = fish.parser,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
pub const cmake = .{
 | 
			
		||||
    .color = 0x004078,
 | 
			
		||||
    .icon = "",
 | 
			
		||||
    .extensions = .{ "CMakeLists.txt", "cmake", "cmake.in" },
 | 
			
		||||
    .comment = "#",
 | 
			
		||||
    .highlights = "queries/cmake/highlights.scm",
 | 
			
		||||
    .injections = "queries/cmake/injections.scm",
 | 
			
		||||
    .formatter = .{"cmake-format"},
 | 
			
		||||
    .language_server = .{"cmake-language-server"},
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
pub const cpp = .{
 | 
			
		||||
    .color = 0x9c033a,
 | 
			
		||||
    .icon = "",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue