The way end_ln was incremented before alpha.highlight meant that two calls to vim.api.nvim_buf_add_highlight were made for each text line (i.e. two highlight groups for each line rather than one), causing highlighting to affect the subsequent line.
empty opts field in an element was preventing padding of line altogether
Before and after screenshots below w/ plain startify theme
Diff of modifications to `startify.lua`
```diff
diff --git a/lua/alpha/themes/startify.lua b/lua/alpha/themes/startify.lua
index c38982e..8a6be2d 100644
--- a/lua/alpha/themes/startify.lua
+++ b/lua/alpha/themes/startify.lua
@@ -177,7 +177,9 @@ local section = {
val = {
{ type = "padding", val = 1 },
{ type = "text", val = "MRU", opts = { hl = "SpecialComment" } },
- { type = "padding", val = 1 },
+ { type = "text", val = "Plain" },
+ { type = "text", val = "Centered", opts = { position = "center" } },
+ { type = "text", val = "Highlighted", opts = { hl = "Number" } },
{
type = "group",
val = function()
@@ -191,7 +193,6 @@ local section = {
val = {
{ type = "padding", val = 1 },
{ type = "text", val = mru_title, opts = { hl = "SpecialComment", shrink_margin = false } },
- { type = "padding", val = 1 },
{
type = "group",
val = function()
```
Two small fixes
end_ln
was incremented beforealpha.highlight
meant that two calls tovim.api.nvim_buf_add_highlight
were made for each text line (i.e. two highlight groups for each line rather than one), causing highlighting to affect the subsequent line.opts
field in an element was preventing padding of line altogetherBefore and after screenshots below w/ plain
startify
themeDiff of modifications to `startify.lua`
```diff diff --git a/lua/alpha/themes/startify.lua b/lua/alpha/themes/startify.lua index c38982e..8a6be2d 100644 --- a/lua/alpha/themes/startify.lua +++ b/lua/alpha/themes/startify.lua @@ -177,7 +177,9 @@ local section = { val = { { type = "padding", val = 1 }, { type = "text", val = "MRU", opts = { hl = "SpecialComment" } }, - { type = "padding", val = 1 }, + { type = "text", val = "Plain" }, + { type = "text", val = "Centered", opts = { position = "center" } }, + { type = "text", val = "Highlighted", opts = { hl = "Number" } }, { type = "group", val = function() @@ -191,7 +193,6 @@ local section = { val = { { type = "padding", val = 1 }, { type = "text", val = mru_title, opts = { hl = "SpecialComment", shrink_margin = false } }, - { type = "padding", val = 1 }, { type = "group", val = function() ```