feat: add line number styles
This commit is contained in:
parent
c4986d5900
commit
b3a10d7346
4 changed files with 88 additions and 8 deletions
|
@ -578,6 +578,22 @@ const cmds = struct {
|
|||
}
|
||||
pub const gutter_mode_next_meta = .{ .description = "Next gutter mode" };
|
||||
|
||||
pub fn gutter_style_next(self: *Self, _: Ctx) Result {
|
||||
const config = tui.config_mut();
|
||||
config.gutter_line_numbers_style = switch (config.gutter_line_numbers_style) {
|
||||
.ascii => .digital,
|
||||
.digital => .subscript,
|
||||
.subscript => .superscript,
|
||||
.superscript => .ascii,
|
||||
};
|
||||
try tui.save_config();
|
||||
if (self.widgets.get("editor_gutter")) |gutter_widget| {
|
||||
const gutter = gutter_widget.dynamic_cast(@import("editor_gutter.zig")) orelse return;
|
||||
gutter.render_style = config.gutter_line_numbers_style;
|
||||
}
|
||||
}
|
||||
pub const gutter_style_next_meta: Meta = .{ .description = "Next line number style" };
|
||||
|
||||
pub fn goto_next_file_or_diagnostic(self: *Self, ctx: Ctx) Result {
|
||||
if (self.is_panel_view_showing(filelist_view)) {
|
||||
switch (self.file_list_type) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue