feat: add command to edit file type configuration files

This commit is contained in:
CJ van den Berg 2025-07-03 16:28:55 +02:00
parent 8281f65011
commit 2897d8d745
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 219 additions and 120 deletions

View file

@ -917,11 +917,6 @@ const cmds = struct {
}
pub const change_theme_meta: Meta = .{ .description = "Change color theme" };
pub fn change_file_type(self: *Self, _: Ctx) Result {
return self.enter_overlay_mode(@import("mode/overlay/file_type_palette.zig").Type);
}
pub const change_file_type_meta: Meta = .{ .description = "Change file type" };
pub fn change_fontface(self: *Self, _: Ctx) Result {
if (build_options.gui)
self.rdr_.get_fontfaces();
@ -1117,6 +1112,10 @@ pub fn mini_mode() ?*MiniMode {
return if (current().mini_mode_) |*p| p else null;
}
pub fn open_overlay(mode: type) command.Result {
return current().enter_overlay_mode(mode);
}
pub fn query_cache() *syntax.QueryCache {
return current().query_cache_;
}