Merge branch 'master' into zig-0.15.0

This commit is contained in:
CJ van den Berg 2025-06-24 13:05:02 +02:00
commit 697ad50e1c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 19 additions and 3 deletions

View file

@ -75,6 +75,7 @@ pub fn build(b: *std.Build) void {
ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "tree-sitter-openscad/queries/highlights.scm");
ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "tree-sitter-org/queries/highlights.scm");
ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "tree-sitter-php/queries/highlights.scm");
ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "tree-sitter-powershell/queries/highlights.scm");
ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "tree-sitter-proto/queries/highlights.scm");
ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "tree-sitter-python/queries/highlights.scm");
ts_queryfile(b, tree_sitter_dep, ts_bin_query_gen, "tree-sitter-purescript/queries/highlights.scm");

View file

@ -6,8 +6,8 @@
.dependencies = .{
.tree_sitter = .{
.url = "https://github.com/neurocyte/tree-sitter/releases/download/master-c743c35222243cf4d0214a07671536977b0c4d48/source.tar.gz",
.hash = "N-V-__8AAB_jECdTCYsQ5_pF_9rUtyWAqA-wxLPz3evWkLpC",
.url = "https://github.com/neurocyte/tree-sitter/releases/download/master-1c3ad59bd98ee430b166054030dac4c46d641e39/source.tar.gz",
.hash = "N-V-__8AANMzUiemOR2eNnrtlMmAGHFqij6VYtDUiaFfn6Dw",
},
.cbor = .{
.url = "https://github.com/neurocyte/cbor/archive/1fccb83c70cd84e1dff57cc53f7db8fb99909a94.tar.gz",

View file

@ -405,6 +405,14 @@ pub const php = .{
.language_server = .{ "intelephense", "--stdio" },
};
pub const powershell = .{
.description = "PowerShell",
.color = 0x0873c5,
.icon = "",
.extensions = .{"ps1"},
.comment = "#",
};
pub const proto = .{
.description = "protobuf (proto)",
.extensions = .{"proto"},

View file

@ -180,7 +180,12 @@ fn render_terminal_title(self: *Self) void {
const project_path = tp.env.get().str("project");
const project_name = project_manager.abbreviate_home(&project_name_buf, project_path);
const file_name = if (std.mem.lastIndexOfScalar(u8, self.name, '/')) |pos| self.name[pos + 1 ..] else self.name;
const file_name = if (self.name.len > 0 and self.name[0] == '*')
self.name
else if (std.mem.lastIndexOfScalar(u8, self.name, '/')) |pos|
self.name[pos + 1 ..]
else
self.name;
const edit_state = if (!self.file_exists) "" else if (self.file_dirty) "" else "";
const new_title = if (self.file)

View file

@ -420,6 +420,8 @@ const Tab = struct {
fn name_from_buffer(buffer: *Buffer) []const u8 {
const file_path = buffer.file_path;
if (file_path.len > 0 and file_path[0] == '*')
return file_path;
const basename_begin = std.mem.lastIndexOfScalar(u8, file_path, std.fs.path.sep);
const basename = if (basename_begin) |begin| file_path[begin + 1 ..] else file_path;
return basename;