feat: persist local reviews automatically in SQLite

This commit is contained in:
Valdemar Lorenzen
2026-10-16 15:15:19 +02:00
parent ef1c377167
commit b558f82094
15 changed files with 634 additions and 48 deletions
+11
View File
@@ -133,6 +133,7 @@ module Vamp
def initialize
@plugins = []
@lsp = {}
@review_directory = nil
@bindings = []
@leader = "space"
@file_explorer_side = "right"
@@ -170,6 +171,15 @@ module Vamp
nil
end
# @param path [String, nil] relative to the configuration file; nil uses the XDG data directory
# @return [String, nil]
def review_directory=(path)
path = nonempty_string!(path, "review_directory") unless path.nil?
raise ArgumentError, "review_directory must not contain NUL" if path&.include?("\0")
@review_directory = path
end
# @param key [String]
# @return [String]
def leader=(key)
@@ -345,6 +355,7 @@ module Vamp
# @return [Hash{String => Object}] validated startup configuration frame
def response
{ "version" => 1, "type" => "config", "plugins" => @plugins, "lsp" => lsp_options, "bindings" => @bindings,
"review_directory" => @review_directory,
"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,