Open sarmong opened 2 years ago
alpha's ui is just data, so you can just mutate the mru_cwd
table to a copy of what exists in the code, but with the numbers starting on the right index
mru_cwd = {
type = "group",
val = {
{ type = "padding", val = 1 },
{ type = "text", val = mru_title, opts = { hl = "SpecialComment", shrink_margin = false } },
{ type = "padding", val = 1 },
{
type = "group",
val = function()
local x = mru(0, vim.fn.getcwd()) -- the first argument is the beginning index
return {x}
end,
opts = { shrink_margin = false },
},
},
},
but, this is a little too involved, so i think i'm going to try to make the buttons independent of the order of the mru sections
ok, it should behave the way you expect as of https://github.com/goolord/alpha-nvim/commit/c4a3b23ea11ce0f68482bc0c2bccc72e990e4892
nvm, this caused some nasty bug. i'll investigate later https://github.com/goolord/alpha-nvim/commit/534a86b348b741ada5bb0d4b83c2c3da6763352a
I want to change a layout of elements in my config, so I did the following:
I swapped
mru_cwd
andmru
, because usually the files relevant for the current directory are more important. (Maybe it could be the default?)However, the numbers didn't change, so I get 10, 1, 2, 3...
mru_cwd
beforemru
would make sense for a lot of people, so it could be made a default?PS. Thanks for a nice plugin!