Fix vendored nerdicons rendering; keep status bar always visible

- the vendored nerdicons.lua was the pristine upstream copy, so installs
  relying on the packaged plugin lost the tuned icon rendering (fractional
  glyph size and default hinting made icons feel soft and uneven). Apply
  the same tuning as the user config: whole-pixel icon size, hinting off,
  scale-aware chevron offset.
- default config (skel + first-run template) and this repo's users keep
  the status bar permanently visible: shown at startup, and the
  status-bar:hide/toggle commands are no-ops.
This commit is contained in:
2026-09-16 23:02:28 +02:00
parent 3bae6fd448
commit b8feb4f4db
4 changed files with 27 additions and 3 deletions
+10
View File
@@ -68,3 +68,13 @@ function TreeView:draw_item_background(item, active, hovered, x, y, w, h)
renderer.draw_rect(x, y, w, h, style.treeview_active_bg or style.line_highlight)
end
end
------------------------------ Status bar -------------------------------------
-- Keep the status bar always visible: show it at startup and turn the
-- status-bar:hide / status-bar:toggle commands into no-ops so it cannot
-- be dismissed (from the command palette or by any plugin).
core.status_view:show()
local StatusView = require "core.statusview"
function StatusView:toggle() self:show() end
function StatusView:hide() self:show() end
+3 -2
View File
@@ -55,7 +55,8 @@ config.plugins.nerdicons = common.merge({
}
}, config.plugins.nerdicons)
local icon_font = renderer.font.load(nerdfonts_symbols.path, 18.5 * SCALE)
local icon_font = renderer.font.load(nerdfonts_symbols.path, common.round(18.5 * SCALE),
{antialiasing = "grayscale", hinting = "none"})
local map = nerdfonts_symbols.utf8
local chevron_width = icon_font:get_width(map["oct-chevron_down"])
local previous_scale = SCALE
@@ -186,7 +187,7 @@ function TreeView:draw_item_chevron(item, active, hovered, x, y, w, h)
if item.type == "dir" then
local chevron_icon = item.expanded and "oct-chevron_down" or "oct-chevron_right"
local chevron_color = hovered and style.accent or style.text
common.draw_text(icon_font, chevron_color, map[chevron_icon], nil, x+8, y, 0, h) -- added 8 to x to draw the chevron closer to the icon
common.draw_text(icon_font, chevron_color, map[chevron_icon], nil, x + common.round(6 * SCALE), y, 0, h)
end
return chevron_width + style.padding.x
end