Skip to content

About

A statusline plugin for the pragmatic

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

Bareline

A statusline plugin for the pragmatic.

Window state Appearance
Active Active statusline
Inactive Inactive statusline
Plugin Plugin statusline

Default config. Color scheme (Neovim built-in): lunaperche

Features

  • Sensible defaults.
  • Simple configuration.
  • Support for global statusline (laststatus=3).
  • Bundled statusline items for common use cases.
  • Allows defining a variation of the statusline for inactive windows.
  • Allows picking a different statusline for some windows, with a plain if.
  • Async. No timer. Autocmds are used to update the statusline immediately as changes happen.

Out of scope

  • Fancy coloring: The colors of the statusline depend on your color scheme.
  • Fancy section separators: Items are separated by whitespace.

Requirements

  • Neovim >= 0.12.0

Installation

Install with your favorite package manager. For example, using Neovim's builtin package manager, vim.pack:

vim.pack.add({
  "https://github.com/hernancerm/bareline.nvim",
})

Some things to notice:

  • require("bareline").setup() does not need to be called. You may call it to configure the plugin.

Default config

local bareline = require("bareline")
bareline.setup({
  statusline = function(ctx)
    if bareline.is_plugin_win() then
      return bareline.statuslines.plugin(ctx)
    end
    local item, text = bareline.item, bareline.text
    local space, each = bareline.space, bareline.each
    return {
      space(1),
      item("vim_mode", {
        inactive = "hide"
      }),
      space(1),
      "%<",
      each({ pad = true }, {
        item("filepath"),
        item("lsp_servers"),
        item("mhr"),
      }),
      "%=",
      each({ pad = true }, {
        item("diagnostics"),
        item("end_of_line"),
        item("indent_style"),
        text(vim.b.gitsigns_head, {
          wrap = { "(", ")" },
          inactive = "remove",
        }),
        item("cwd"),
      }),
      space(1),
      "%02l:%02c/%02L",
      space(1),
    }
  end,
  items = {
    mhr = {
      display_modified = true,
    },
  },
})

Documentation

Please refer to the help file: bareline.txt (:help bareline.txt).

Similar plugins

Why another statusline plugin?

I know people like to meme about how vim enthusiasts are always trying to convince people to learn vim keybindings but I truly believe that learning it will not only make you faster but also rekindle your love for programming, it did for me. — Nexxel (2023).

The latter.

Contributing

I welcome issues requesting any behavior change. However, please do not submit a PR unless it's for a trivial fix.

License

MIT

About

A statusline plugin for the pragmatic

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages