feat: add Git and Jujutsu gutter indicators

This commit is contained in:
2026-10-13 17:44:29 +02:00
parent e84d70463f
commit 55cdee1a13
14 changed files with 1392 additions and 32 deletions
+10
View File
@@ -137,6 +137,7 @@ module Vamp
@file_explorer_view = "tree"
@clipboard_mode = "system"
@git_blame = true
@git_gutter = "bar"
@bar = BarConfig.new
@popup = PopupConfig.new
@labels = {}
@@ -197,6 +198,14 @@ module Vamp
@git_blame = enabled
end
# @param style [String] "bar", "symbols", "line_numbers", or "none"
def git_gutter=(style)
style = nonempty_string!(style, "git gutter")
raise ArgumentError, "git gutter must be bar, symbols, line_numbers, or none" unless %w[bar symbols line_numbers none].include?(style)
@git_gutter = style
end
# @param values [Hash{String, Symbol => String}]
# @return [Hash]
def labels=(values)
@@ -275,6 +284,7 @@ module Vamp
"leader" => @leader, "file_explorer_side" => @file_explorer_side, "file_picker_view" => @file_picker_view,
"file_explorer_view" => @file_explorer_view, "clipboard_mode" => @clipboard_mode,
"git_blame" => @git_blame,
"git_gutter" => @git_gutter,
"top_bar" => @bar.top, "bottom_bar" => @bar.bottom, "labels" => @labels,
"popup" => { "command" => @popup.command, "search" => @popup.search },
"diff_context_lines" => @diff_context_lines, "diff_expand_lines" => @diff_expand_lines,