-
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
bug: rainbow labels color wont work if they are placed on word under cursor #109
Closed
3 tasks done
Labels
bug
Something isn't working
Comments
Should be fixed now! |
Something is still of for me. Here is how the rainbow labels looked before the commit that 'broke' them: Here is the latest flash.nivm: In both cases word under cursor gets highlighted, but as u can see in first image labels colors are ok. @folke my config: {
"folke/flash.nvim",
cond = true,
-- commit="13022c09fa30fb03d14110a380238f6a75b42ab4", -- correct colors under cword
event = "VeryLazy",
opts = {},
keys = {
{
",",
mode = { "n", "x", "o" },
function()
-- default options: exact mode, multi window, all directions, with a backdrop
require("flash").jump()
end,
},
{
"u", -- unit textobject
mode = { "o", "x" },
function()
require("flash").treesitter {
label = {
rainbow = {
enabled = true,
},
},
}
end,
},
{
"gl",
mode = { "n", "x", "o" },
function()
require("flash").jump {
search = { mode = "search", max_length = 0 }, -- len == 0 so all labels will be used and skips won't be calculated
label = { after = { 0, 0 } },
matches = false, -- to hide the whitespace match
pattern = "^\\s*\\S", -- match non-whitespace at start plus any character (ignores empty lines), add \\? to match empty lines too
}
vim.cmd [[normal! ^]]
end,
},
},
config = function()
require("flash").setup {
-- labels = "ASDFGHJKLQWERTYUIOPZXCVBNM",
label = {
rainbow = {
enabled = false,
},
},
highlight = {
priority = 9900,
},
modes = {
char = { -- `f`, `F`, `t`, `T`, `;` and `,` motions
enabled = true,
jump_labels = function(motion)
-- never show jump labels by default
-- return false
-- Always show jump labels for ftFT
return vim.v.count == 0 and motion:find("[ftFT]")
-- Show jump labels for ftFT in operator-pending mode
-- return vim.v.count == 0 and motion:find("[ftFT]") and vim.fn.mode(true):find("o")
end,
},
},
}
end,
}, Stesp to reproduce:
|
Should be fixed again :) |
it works great now. Guy who thought of this rainbow feature is genius. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.10.0-dev-537+gdcf8a71b8
Operating system/version
Manjaro
Describe the bug
As mentioned in #74 (comment)
The rainbow colors wont be colored, if label is placed on top of word under cursor.
The commit that broke the colors: 56531ee
Steps To Reproduce
use
Expected Behavior
All labels should be colored
Repro
The text was updated successfully, but these errors were encountered: