Repository navigation
Conversation
medvednikov
left a comment
There was a problem hiding this comment.
Reviewed the TOML parsing, JSON/zoom precedence, and save-time reload paths at 992a3ae. Two functional issues are noted inline. CI was excluded from this review.
| ved.error_line = 'conf.toml: ${err.msg()}' | ||
| map[string]gg.Color{} | ||
| } | ||
| ved.cfg.set_default_values() |
There was a problem hiding this comment.
[P2] Update GG's background color when reloading the palette
Changing [colors].base00 while Ved is running does not update the editor background after a save. set_default_values() changes cfg.bgcolor, but ved.v passes that value to gg.new_context() only at startup; subsequent frames use GG's cached clear color, and this reload path never updates it. For example, changing a light palette to base00 = "1e1e1e" and base05 = "d4d4d4" changes the text to light gray while leaving the light background until restart. Please update the existing GG context with set_bg_color() when applying the new configuration, accounting for the initial load before ved.gg exists.
| } | ||
| toml.parse_text('') or { panic(err) } | ||
| } | ||
| ved.cfg.apply_toml_editor(doc, zoom_saved) |
There was a problem hiding this comment.
[P2] Rebuild the base configuration before applying each TOML overlay
When config.json does not exist (as before the zoom shortcuts have saved it), this applies TOML to the already configured ved.cfg. Removing an editor setting therefore leaves its old value active: start with [editor] disable_fmt = true, delete that entry from conf.toml, and save again; formatting remains disabled on subsequent saves until restart. set_default_values() only rebuilds colors and text styles, so it does not clear the stale flag. Please reconstruct the defaults/JSON configuration before each TOML overlay so removed keys fall back consistently on reload and startup.
|
Addressed both at de96782 . |
README.md documents
~/.ved/conf.tomlbut loading it was commented out and onlyconfig.jsonworked.This reads
conf.tomlas described:[editor]settings and[colors](base16) overrides. It's applied on top ofconfig.jsonand reloaded after every save. Only keys present in the file are used and Ved still doesn't create the file itself.A text size saved with
C =/C -stays over the text sizes inconf.toml. Zooming isn't reset on save.disable_fmtandatomic_savecan also be set in[editor].