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)
|
||||
if (@hasField(@TypeOf(args), "highlights"))
|
||||
@embedFile(args.highlights)
|
||||
else if (@hasField(@TypeOf(args), "highlights_list"))
|
||||
@embedFile(args.highlights_list[0]) ++ "\n" ++ @embedFile(args.highlights_list[1])
|
||||
else
|
||||
@embedFile("tree-sitter-" ++ lang ++ "/queries/highlights.scm")
|
||||
else
|
||||
|
|
|
@ -43,6 +43,10 @@ pub const cpp = .{
|
|||
.icon = "",
|
||||
.extensions = .{ "cc", "cpp", "cxx", "hpp", "hxx", "h", "ipp", "ixx" },
|
||||
.comment = "//",
|
||||
.highlights_list = .{
|
||||
"tree-sitter-c/queries/highlights.scm",
|
||||
"tree-sitter-cpp/queries/highlights.scm",
|
||||
},
|
||||
.injections = "tree-sitter-cpp/queries/injections.scm",
|
||||
.formatter = .{"clang-format"},
|
||||
.language_server = .{"clangd"},
|
||||
|
|
Loading…
Add table
Reference in a new issue