-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Double-character labels for features like jump to line #106
Comments
You disabled lower-case labels? Something must be off with your config of flash. You should at least get 52 labels with that code |
Interesting. I had set After enabling {
"folke/flash.nvim",
opts = {
label = {
uppercase = true,
-- format = function(opts)
-- return { { opts.match.label:upper(), opts.hl_group } }
-- end,
},
modes = { treesitter = { highlight = { backdrop = true } } },
jump = { autojump = true, nohlsearch = true },
},
keys = {
...
{
"<leader>l",
mode = { "n", "x", "o" },
function()
require("flash").jump({
search = { mode = "search", max_length = 0 },
label = { after = { 0, 0 } },
pattern = "^",
})
-- vim.schedule(require("user.utils").schedule_command)
end,
desc = "Label beginning of line",
},
...
},
} Screenshot of labels with unfolded code Screenshot of labels with folded code |
@mystilleef I've added better handling of folds so that labels won't be callculated for folded lines |
Excellent! |
Did you check the docs?
Is your feature request related to a problem? Please describe.
HopLine
is the last feature I need fromHop
to completely ditch it. At the momentFlash
does not support double-character labels, so it cannot label the beginning of all lines in a document.Describe the solution you'd like
Maybe provide a way to temporarily override the labels list to allow double characters for certain jumps, like
jump-to-line
.It doesn't even have to be supported by default. It should just exist for edge cases for users who want to do weird stuff, like implementing jump-to-line in
Flash
.Alternatively, you could just implement
FlashLine
as an edge-case solution. That way you can restrict double-character labels to justFlashLine
until double-characters can be available universally, if possible.Describe alternatives you've considered
The
jump-to-line
example works but does not label all the visible lines in documents due to the limited number of single-character labels.The only alternative so far is to use
HopLine
fromHop
or a similar feature from other jump plugins.Additional context
Screenshot of flash jump-to-line just labeling a few lines.
The text was updated successfully, but these errors were encountered: