GithubHelp home page GithubHelp logo

bartender.nvim's Introduction

๐Ÿบ Bartender

bartender.nvim is a plugin to help you manage your bars

Concept

Components

A component is an atomic piece of your statusline.

Creating Components

A component is simply a function that returns a table with the following keys:

  1. text: string

    String that the component should display

  2. highlight: string | table

    • if the type is a string, it will act as the highlight-group name that this component will use for it's highlighting

    • if the type is a table, it with the same form as what nvim_set_hl() takes.

      If non-nil, a highlight group for component.text is created with provided attributes. The name of this new highlight group if prefixed with config's highlight_prefix.

      If nil, a new highlight group is not defined.

  3. click: function -> nil

    Function that is run when you click on the component

Sections

A section is a group of components. Sections exist for the following reasons:

  1. semantic grouping of components
  2. easily setting accent colors
  3. lazily changing components

local section = {}

Usage

Sections and components are evaluated in the context of the window that the bar belongs to at the time of evaluation. Bartender stores the window id of the active window in bartender.active_winid.

bartender.nvim's People

Contributors

austinliuigi avatar

Stargazers

Yuta Katayama avatar

Watchers

 avatar

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.