basalt/v0.12.4
This release focused on improving the configurability of basalt, and allowing it be more usable in degraded systems.
The symbols used in basalt can now be configured through presets and symbols map that is documented in: https://github.com/erikjuhani/basalt/blob/6794063/docs/Configuration/Symbols.md
Example user configuration in ~/.basalt.toml:
[symbols]
preset = "nerd-font"
task_checked = "[x]"
task_unchecked = "[ ]"For degraded mode you can set the preset to "ascii".
For full list of options check the Symbols documentation: https://github.com/erikjuhani/basalt/blob/6794063/docs/Configuration/Symbols.md
Example with following configs:
[symbols]
wrap_marker = ""
preset = "nerd-font"Added
- c3f2b41 Add
Symbolsconfig types with presets by @erikjuhani
Introduces symbols and symbol presets as the foundation for
configurable UI symbols. Each preset provides a complete set of defaults
for all visual glyphs used across the interface. Users pick a preset in
[symbols]and optionally override individual fields on top of it.Also added derives
PartialEqandserde::DeserializeonFontStyle
so heading and title font styles can be configured from toml.Related to #424
- 7d53d0a Surface config errors as warning toasts by @erikjuhani
Previously config parsing errors were silently swallowed. Now we return
warnings alongside the config so they can be shown to the user. Invalid
config files produce anInvalidConfigerror with the TOML parser's
message. TheUserConfigNotFoundcase is still silently ignored since
most users won't have a config file.Additionally toasts now support word-wrapped multi-line messages via
textwrapand compute their height dynamically instead of using a fixed
constant. This lets longer error messages display fully rather than
getting truncated. Toast stacking inrender_toastsaccounts for
variable heights.Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
- 7d3e968 Add auto-detection for symbol preset based on terminal capabilities by @erikjuhani
Extend Preset with an Auto variant that detects terminal capabilities at
startup by inspecting TERM, LC_ALL, LC_CTYPE and LANG environment
variables to choose between Unicode and Ascii presets.Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
Changed
- a67ebed Add
rust-versionto basalt Cargo manifest by @erikjuhani
Setting
rust-versionlets Cargo emit a clear error when someone
tries to build with a toolchain older than 1.91.0 and enables
version-aware dependency resolver behavior.Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
- 9cdaa1c Use marker width instead of prefix width when rendering by @erikjuhani
Related to #424
Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
- 7cb70c5 Use symbols through note editor rendering by @erikjuhani
All render functions now take
&Symbolsparameter so application
symbols are read from config instead of being hardcoded.List markers cycle through the configured list based on nesting depth.
VirtualDocumentstores aSymbolsinstance and uses it for the title
font style and horizontal rule.Additionally add support for cycling through list markers so different
depth levels of list indentation have different markers. Can
define n-amount of symbols.Related to #424
Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
- e6d8edf Use symbols in explorer by @erikjuhani
Replaces hardcoded symbols in the explorer with configurable ones.
Unselected files also rendersymbols.unselectedinstead of blank space
so the collapsed view is consistent across presets.Added more emphasis on selected note with bold and underline styles.
Related to #424
Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
- de90cfd Use symbols config in Outline by @erikjuhani
Replaces hardcoded glyphs with configurable symbols.
Related to #424
Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
- dd49a8a Use symbols in app and set default preset by @erikjuhani
Config is now loaded once in
App::startand passed intoApp::newso
thatconfig.symbolsis available when constructing component state.
The default config setspreset = "unicode"inconfig.toml.Related to #424
Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
- b4e22bf Use border style from symbols config by @erikjuhani
Previously border style was hardcoded in code, however, this is now also
controllable from the symbols map.Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
- 1801eea Add configurable toast icons per symbol preset by @erikjuhani
Toast icons were hardcoded. This commit adds toast_success, toast_info,
toast_error and toast_warning fields to the symbol config so each preset
can define appropriate icons. ASCII uses simple text characters, Unicode
keeps the existing icons, and NerdFont uses its own glyph variants. The
icon is resolved at render time from the active symbols config.Signed-off-by: Erik Kinnunen erik.kinn@gmail.com
