feature: Reverse label order
Did you check the docs?
- [x] I have read all the flash.nvim docs
Is your feature request related to a problem? Please describe.
I like to have the telescope results as a 'dropup' (instead of a dropdown) ...
but the labels are added from the top. This is annoying because the label order is there for a reason to make the easier keys more common. In the telescope integration I usually even have to use Uppercase keys.
Describe the solution you'd like
I'd really like a way to just start the labels from the bottom.
Describe alternatives you've considered
I tried adding forward = false but that did not change anything. Does this do anything for other windows?
Additional context
My flash command:
require("flash").jump({
pattern = "^ *[^ ]",
label = { before = true, after = false, style = "inline" },
search = {
forward = false,
mode = "search",
exclude = {
function(win)
return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "TelescopeResults"
end,
},
},
highlight = { matches = false },
action = function(match)
local picker = require("telescope.actions.state").get_current_picker(prompt_bufnr)
picker:set_selection(match.pos[1] - 1)
end,
})
(note that I customized the pattern but that shouldn't effect this issue)
I had the same issue, I worked around it by adding an argument to jump:
labels = (labels .. labels:upper()):reverse(),
where labels is your string of labels. The labels string needs to be long enough to cover all the picker lines; concatenating the upper case labels helps with this
I thought of that too but if there are only a few results (for example if I am using the buffer picker) then I only get the uppercase rarely used letters
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.