Compare commits
10 commits
bc72330967
...
7214ee0af2
Author | SHA1 | Date | |
---|---|---|---|
7214ee0af2 | |||
![]() |
b223817852 | ||
8b3a5ac170 | |||
28bc77f461 | |||
f81314c11e | |||
01558741e4 | |||
![]() |
942053ff0a | ||
da812e05d4 | |||
ec62f6c7f4 | |||
![]() |
1226f47301 |
4 changed files with 67 additions and 6 deletions
|
@ -19,6 +19,7 @@ pub fn build(b: *std.Build) void {
|
||||||
.{ .name = "treez", .module = tree_sitter_dep.module("treez") },
|
.{ .name = "treez", .module = tree_sitter_dep.module("treez") },
|
||||||
ts_queryfile(b, tree_sitter_dep, "queries/cmake/highlights.scm"),
|
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-agda/queries/highlights.scm"),
|
||||||
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-astro/queries/highlights.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-bash/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"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-c-sharp/queries/highlights.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-c/queries/highlights.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-c/queries/highlights.scm"),
|
||||||
|
@ -65,6 +66,7 @@ pub fn build(b: *std.Build) void {
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-scala/queries/highlights.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-scala/queries/highlights.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-scheme/queries/highlights.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-scheme/queries/highlights.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-superhtml/tree-sitter-superhtml/queries/highlights.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-superhtml/tree-sitter-superhtml/queries/highlights.scm"),
|
||||||
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-sql/queries/highlights.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-swift/queries/highlights.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-swift/queries/highlights.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-toml/queries/highlights.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-toml/queries/highlights.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-typescript/queries/highlights.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-typescript/queries/highlights.scm"),
|
||||||
|
@ -76,8 +78,10 @@ pub fn build(b: *std.Build) void {
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-zig/queries/highlights.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-zig/queries/highlights.scm"),
|
||||||
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/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, "tree-sitter-ziggy/tree-sitter-ziggy-schema/queries/highlights.scm"),
|
||||||
|
ts_queryfile(b, tree_sitter_dep, "nvim-treesitter/queries/verilog/highlights.scm"),
|
||||||
|
|
||||||
ts_queryfile(b, tree_sitter_dep, "queries/cmake/injections.scm"),
|
ts_queryfile(b, tree_sitter_dep, "queries/cmake/injections.scm"),
|
||||||
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-astro/queries/injections.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-cpp/queries/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-elixir/queries/injections.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-gitcommit/queries/injections.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-gitcommit/queries/injections.scm"),
|
||||||
|
@ -102,6 +106,7 @@ pub fn build(b: *std.Build) void {
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-typst/queries/typst/injections.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-typst/queries/typst/injections.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-vim/queries/vim/injections.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-vim/queries/vim/injections.scm"),
|
||||||
ts_queryfile(b, tree_sitter_dep, "tree-sitter-zig/queries/injections.scm"),
|
ts_queryfile(b, tree_sitter_dep, "tree-sitter-zig/queries/injections.scm"),
|
||||||
|
ts_queryfile(b, tree_sitter_dep, "nvim-treesitter/queries/verilog/injections.scm"),
|
||||||
} else &.{
|
} else &.{
|
||||||
.{ .name = "build_options", .module = options_mod },
|
.{ .name = "build_options", .module = options_mod },
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
.dependencies = .{
|
.dependencies = .{
|
||||||
.@"tree-sitter" = .{
|
.@"tree-sitter" = .{
|
||||||
.url = "https://github.com/neurocyte/tree-sitter/releases/download/master-aea6072c6178d5cd0c97fff33e130f632f355bc2/source.tar.gz",
|
.url = "https://github.com/neurocyte/tree-sitter/releases/download/master-86dd4d2536f2748c5b4ea0e1e70678039a569aac/source.tar.gz",
|
||||||
.hash = "12204c99c6093230023380068f386f7eb32ab83df9a8eb8b586ffe5aa44afa34ff0e",
|
.hash = "1220e9fba96c468283129e977767472dee00b16f356e5912431cec8f1a009b6691a2",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
.paths = .{
|
.paths = .{
|
||||||
|
|
|
@ -4,6 +4,14 @@ pub const agda = .{
|
||||||
.comment = "--",
|
.comment = "--",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const astro = .{
|
||||||
|
.description = "Astro",
|
||||||
|
.icon = "",
|
||||||
|
.extensions = .{"astro"},
|
||||||
|
.comment = "//",
|
||||||
|
.language_server = .{ "astro-ls", "--stdio" },
|
||||||
|
};
|
||||||
|
|
||||||
pub const bash = .{
|
pub const bash = .{
|
||||||
.description = "Bash",
|
.description = "Bash",
|
||||||
.color = 0x3e474a,
|
.color = 0x3e474a,
|
||||||
|
@ -37,7 +45,7 @@ pub const conf = .{
|
||||||
.description = "Config",
|
.description = "Config",
|
||||||
.color = 0x000000,
|
.color = 0x000000,
|
||||||
.icon = "",
|
.icon = "",
|
||||||
.extensions = .{ "conf", "config", ".gitconfig" },
|
.extensions = .{ "conf", "config", ".gitconfig", "gui_config" },
|
||||||
.highlights = fish.highlights,
|
.highlights = fish.highlights,
|
||||||
.comment = "#",
|
.comment = "#",
|
||||||
.parser = fish.parser,
|
.parser = fish.parser,
|
||||||
|
@ -80,7 +88,7 @@ pub const css = .{
|
||||||
|
|
||||||
pub const diff = .{
|
pub const diff = .{
|
||||||
.description = "Diff",
|
.description = "Diff",
|
||||||
.extensions = .{ "diff", "patch" },
|
.extensions = .{ "diff", "patch", "rej" },
|
||||||
.comment = "#",
|
.comment = "#",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -227,6 +235,7 @@ pub const julia = .{
|
||||||
.extensions = .{"jl"},
|
.extensions = .{"jl"},
|
||||||
.comment = "#",
|
.comment = "#",
|
||||||
.language_server = .{ "julia", "-e", "using LanguageServer; runserver()" },
|
.language_server = .{ "julia", "-e", "using LanguageServer; runserver()" },
|
||||||
|
.formatter = .{ "julia", "-e", "using JuliaFormatter; print(format_text(read(stdin, String)))" },
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const kdl = .{
|
pub const kdl = .{
|
||||||
|
@ -380,6 +389,7 @@ pub const php = .{
|
||||||
.extensions = .{"php"},
|
.extensions = .{"php"},
|
||||||
.comment = "//",
|
.comment = "//",
|
||||||
.injections = "tree-sitter-php/queries/injections.scm",
|
.injections = "tree-sitter-php/queries/injections.scm",
|
||||||
|
.language_server = .{ "intelephense", "--stdio" },
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const purescript = .{
|
pub const purescript = .{
|
||||||
|
@ -433,6 +443,13 @@ pub const scheme = .{
|
||||||
.comment = ";",
|
.comment = ";",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const sql = .{
|
||||||
|
.description = "SQL",
|
||||||
|
.icon = "",
|
||||||
|
.extensions = .{"sql"},
|
||||||
|
.comment = "--",
|
||||||
|
};
|
||||||
|
|
||||||
pub const @"ssh-config" = .{
|
pub const @"ssh-config" = .{
|
||||||
.description = "SSH config",
|
.description = "SSH config",
|
||||||
.extensions = .{".ssh/config"},
|
.extensions = .{".ssh/config"},
|
||||||
|
@ -449,6 +466,16 @@ pub const swift = .{
|
||||||
.formatter = .{"swift-format"},
|
.formatter = .{"swift-format"},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const verilog = .{
|
||||||
|
.description = "SystemVerilog",
|
||||||
|
.extensions = .{ "sv", "svh" },
|
||||||
|
.comment = "//",
|
||||||
|
.highlights = "nvim-treesitter/queries/verilog/highlights.scm",
|
||||||
|
.injections = "nvim-treesitter/queries/verilog/injections.scm",
|
||||||
|
.language_server = .{"verible-verilog-ls"},
|
||||||
|
.formatter = .{ "verible-verilog-format", "-" },
|
||||||
|
};
|
||||||
|
|
||||||
pub const toml = .{
|
pub const toml = .{
|
||||||
.description = "TOML",
|
.description = "TOML",
|
||||||
.extensions = .{ "toml", "ini" },
|
.extensions = .{ "toml", "ini" },
|
||||||
|
|
|
@ -95,10 +95,39 @@ pub const Node = struct {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
pub fn freeSExpressionString(_: []const u8) void {}
|
pub fn freeSExpressionString(_: []const u8) void {}
|
||||||
pub fn getParent(_: *const @This()) *Node {
|
pub fn getParent(_: *const @This()) Node {
|
||||||
return &dummy;
|
return dummy;
|
||||||
|
}
|
||||||
|
pub fn getChild(_: *const @This(), _: usize) Node {
|
||||||
|
return dummy;
|
||||||
|
}
|
||||||
|
pub fn getChildCount(_: *const @This()) usize {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
pub fn getNamedChild(_: *const @This(), _: usize) Node {
|
||||||
|
return dummy;
|
||||||
|
}
|
||||||
|
pub fn getNamedChildCount(_: *const @This()) usize {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
pub fn isNull(_: *const @This()) bool {
|
pub fn isNull(_: *const @This()) bool {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
pub const externs = struct {
|
||||||
|
pub fn ts_node_next_sibling(_: Node) Node {
|
||||||
|
return Node.dummy;
|
||||||
|
}
|
||||||
|
pub fn ts_node_prev_sibling(_: Node) Node {
|
||||||
|
return Node.dummy;
|
||||||
|
}
|
||||||
|
pub fn ts_node_next_named_sibling(_: Node) Node {
|
||||||
|
return Node.dummy;
|
||||||
|
}
|
||||||
|
pub fn ts_node_prev_named_sibling(_: Node) Node {
|
||||||
|
return Node.dummy;
|
||||||
|
}
|
||||||
|
pub fn ts_node_descendant_for_point_range(_: *const Node, _: Point, _: Point) Node {
|
||||||
|
return Node.dummy;
|
||||||
|
}
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue