nvim-scrollbar
nvim-scrollbar copied to clipboard
Add "handler" for cursor position
I find it helpful to have the cursor displayed as a mark on the scrollbar (as VS Code does it), so I have an idea of exactly where it is in relation to the more interesting marks
I have done it using a custom handler like this one:
require("scrollbar.handlers").register("current_position", function(bufnr)
local pos = vim.api.nvim_win_get_cursor(0)
return {
{ line = pos[1], text = "x", type = "Misc" },
}
end)
Sorry this took so long, added!