Refresh generated neovim config
This commit is contained in:
@ -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()`
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user