parent
							
								
									b4d8cf6b3d
								
							
						
					
					
						commit
						7a46ce585b
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -125,6 +125,8 @@ fn load_file_types(comptime Namespace: type) []const FileType {
 | 
				
			||||||
                    .highlights = if (build_options.use_tree_sitter)
 | 
					                    .highlights = if (build_options.use_tree_sitter)
 | 
				
			||||||
                        if (@hasField(@TypeOf(args), "highlights"))
 | 
					                        if (@hasField(@TypeOf(args), "highlights"))
 | 
				
			||||||
                            @embedFile(args.highlights)
 | 
					                            @embedFile(args.highlights)
 | 
				
			||||||
 | 
					                        else if (@hasField(@TypeOf(args), "highlights_list"))
 | 
				
			||||||
 | 
					                            @embedFile(args.highlights_list[0]) ++ "\n" ++ @embedFile(args.highlights_list[1])
 | 
				
			||||||
                        else
 | 
					                        else
 | 
				
			||||||
                            @embedFile("tree-sitter-" ++ lang ++ "/queries/highlights.scm")
 | 
					                            @embedFile("tree-sitter-" ++ lang ++ "/queries/highlights.scm")
 | 
				
			||||||
                    else
 | 
					                    else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -43,6 +43,10 @@ pub const cpp = .{
 | 
				
			||||||
    .icon = "",
 | 
					    .icon = "",
 | 
				
			||||||
    .extensions = .{ "cc", "cpp", "cxx", "hpp", "hxx", "h", "ipp", "ixx" },
 | 
					    .extensions = .{ "cc", "cpp", "cxx", "hpp", "hxx", "h", "ipp", "ixx" },
 | 
				
			||||||
    .comment = "//",
 | 
					    .comment = "//",
 | 
				
			||||||
 | 
					    .highlights_list = .{
 | 
				
			||||||
 | 
					        "tree-sitter-c/queries/highlights.scm",
 | 
				
			||||||
 | 
					        "tree-sitter-cpp/queries/highlights.scm",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    .injections = "tree-sitter-cpp/queries/injections.scm",
 | 
					    .injections = "tree-sitter-cpp/queries/injections.scm",
 | 
				
			||||||
    .formatter = .{"clang-format"},
 | 
					    .formatter = .{"clang-format"},
 | 
				
			||||||
    .language_server = .{"clangd"},
 | 
					    .language_server = .{"clangd"},
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue