Home

Awesome

staline.nvim

TLDR;<br/> staline(statusline): A simple statusline for neovim written in lua.<br/> stabline(s-tabline): A simple bufferline for neovim written in lua. (sry didnt get a better name.)

Requirements

Installation

use 'tamton-aquib/staline.nvim'

Note Doing this will install both staline and stabline. <br /> But separate setup() is required for each to load up.

Statusline

Screenshots

normal insert command visual

Configuration

require('staline').setup()
<details> <summary> Click to see default configuration </summary>
require('staline').setup {
    defaults = {
        expand_null_ls = false,  -- This expands out all the null-ls sources to be shown
        left_separator  = "",
        right_separator = "",
        full_path       = false,
        line_column     = "[%l/%L] :%c 並%p%% ", -- `:h stl` to see all flags.

        fg              = "#000000",  -- Foreground text color.
        bg              = "none",     -- Default background is transparent.
        inactive_color  = "#303030",
        inactive_bgcolor = "none",
        true_colors     = false,      -- true lsp colors.
        font_active     = "none",     -- "bold", "italic", "bold,italic", etc

        mod_symbol      = "  ",
        lsp_client_symbol = " ",
        lsp_client_character_length = 12, -- Shorten LSP client names.
        branch_symbol   = " ",
        cool_symbol     = " ",       -- Change this to override default OS icon.
        null_ls_symbol = "",          -- A symbol to indicate that a source is coming from null-ls
    },
    mode_colors = {
        n = "#2bbb4f",
        i = "#986fec",
        c = "#e27d60",
        v = "#4799eb",   -- etc..
    },
    mode_icons = {
        n = " ",
        i = " ",
        c = " ",
        v = " ",   -- etc..
    },
    sections = {
        left = { '- ', '-mode', 'left_sep_double', ' ', 'branch' },
        mid  = { 'file_name' },
        right = { 'cool_symbol','right_sep_double', '-line_column' },
    },
    inactive_sections = {
        left = { 'branch' },
        mid  = { 'file_name' },
        right = { 'line_column' }
    },
    special_table = {
        NvimTree = { 'NvimTree', ' ' },
        packer = { 'Packer',' ' },        -- etc
    },
    lsp_symbols = {
        Error=" ",
        Info=" ",
        Warn=" ",
        Hint="",
    },
}
</details>
<details><summary>Sections</summary>
sectionuse
modeshows the mode
branchshows git branch
file_nameshows filename
file_sizeshows file size
cool_symbolan icon according to the OS type (cutomizable)
lsplsp diagnostics (number of errors, warnings, etc)
lsp_namelsp client name
line_columnshows line, column, percentage, etc
left_sepsingle left separator
right_sepsingle right separator
left_sep_doubleDouble left separator with a shade of gray
right_sep_doubleDouble right separator with a shade of gray
cwdCurrent working directory
</details>

To know more about colors and highlights, check highlights wiki

A section (left, right or mid) can take:

lsp, lsp_name, file_size sections are not included in the default settings.

Showcase

Check out wiki to see some premade configs and tips. <br />

Bufferline

Screenshots

bar mode

slant mode

arrow mode

bubble mode

<details><summary>The Default configuration looks something like</summary>
require('stabline').setup {
    style       = "bar", -- others: arrow, slant, bubble
    stab_left   = "┃",
    stab_right  = " ",

    -- fg       = Default is fg of "Normal".
    -- bg       = Default is bg of "Normal".
    inactive_bg = "#1e2127",
    inactive_fg = "#aaaaaa",
    -- stab_bg  = Default is darker version of bg.,

    font_active = "bold",
    exclude_fts = { 'NvimTree', 'dashboard', 'lir' },
    stab_start  = "",   -- The starting of stabline
    stab_end    = "",
    numbers = function(bufn, n)
        return '*'..n..' '
    end
}
</details>
<details> <summary>My personal config as of editing this file</summary>

my stabline config

require('stabline').setup {
    style = "slant",
    bg = "#986fec",
    fg = "black",
    stab_right = "",
}
</details>

Features

Cons


Inspiration and credits:

TODO