1

Refresh generated neovim config

This commit is contained in:
2024-07-14 21:12:36 +02:00
parent f215ce2ab5
commit 00464e0e65
731 changed files with 6780 additions and 31110 deletions

View File

@ -205,7 +205,12 @@ local defaults = {
end,
search = { wrap = false },
highlight = { backdrop = true },
jump = { register = false },
jump = {
register = false,
-- when using jump labels, set to 'true' to automatically jump
-- or execute a motion when there is only one match
autojump = false,
},
},
-- options used for treesitter selections
-- `require("flash").treesitter()`

View File

@ -68,14 +68,18 @@ end
---@param state Flash.State
function M.cursor(state)
for _, win in ipairs(state.wins) do
local cursor = vim.api.nvim_win_get_cursor(win)
local buf = vim.api.nvim_win_get_buf(win)
vim.api.nvim_buf_set_extmark(buf, state.ns, cursor[1] - 1, cursor[2], {
hl_group = "FlashCursor",
end_col = cursor[2] + 1,
priority = state.opts.highlight.priority + 3,
strict = false,
})
if vim.api.nvim__redraw then
vim.api.nvim__redraw({ cursor = true, win = win })
else
local cursor = vim.api.nvim_win_get_cursor(win)
local buf = vim.api.nvim_win_get_buf(win)
vim.api.nvim_buf_set_extmark(buf, state.ns, cursor[1] - 1, cursor[2], {
hl_group = "FlashCursor",
end_col = cursor[2] + 1,
priority = state.opts.highlight.priority + 3,
strict = false,
})
end
end
end

View File

@ -241,6 +241,10 @@ function M.jump(key)
M.state:update({ force = true })
if M.jump_labels then
if (Config.get("char").jump.autojump and #M.state.results == 1) then
M.state:hide()
return M.state
end
parsed.actions[Util.CR] = function()
return false
end