Git Product home page Git Product logo

Comments (2)

tbung avatar tbung commented on June 16, 2024 1

I just started to implement a generic register function that adds some abstraction over this boiler plate to eg just register a function that returns marks for a buffer, will probably have a draft pr ready later today.

I'll probably implement showing text marks on top of this while I'm at it and submit it in a separate pr (see #2).

from nvim-scrollbar.

petertriho avatar petertriho commented on June 16, 2024

This is a great idea.

Could probably put some of this info into a wiki and, eventually, move this into some kind of org repo with separate plugins/modules for each handler. Will need to add some emmylua annotations to + docs as well

At the moment, it should be pretty simple to add more handlers. Pretty much all marks go into vim.b.scrollbar_marks buffer variable. Each handler should use its own key and match the config.handler key.

E.g.

local my_marks = {
    { line = 1, text = "-", type = "Misc" }
}
local utils = require("scrollbar.utils")
local scrollbar_marks = utils.get_scrollbar_marks(bufnr)
scrollbar_marks.my_marks = my_marks
utils.set_scrollbar_marks(bufnr, scrollbar_marks)
require("scrollbar").render()

from nvim-scrollbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.