Skip to content
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

Add "handler" for cursor position #17

Closed
J-Fields opened this issue Jan 8, 2022 · 2 comments
Closed

Add "handler" for cursor position #17

J-Fields opened this issue Jan 8, 2022 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@J-Fields
Copy link

J-Fields commented Jan 8, 2022

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

@crisidev
Copy link

crisidev commented Aug 2, 2022

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)

petertriho added a commit that referenced this issue Nov 15, 2022
@petertriho
Copy link
Owner

petertriho commented Nov 15, 2022

Sorry this took so long, added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants