nvim-scrollbar icon indicating copy to clipboard operation
nvim-scrollbar copied to clipboard

Add "handler" for cursor position

Open J-Fields opened this issue 3 years ago • 1 comments

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

J-Fields avatar Jan 08 '22 04:01 J-Fields

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)

crisidev avatar Aug 02 '22 22:08 crisidev

Sorry this took so long, added!

petertriho avatar Nov 15 '22 06:11 petertriho