murtaza-u / lunarline

A neovim statusline written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lunarline

A neovim statusline written in lua

Out of the box

⭐Features

  1. Fast, beautiful, Customizable
  2. Components:
    • git branch
    • git diff
    • lsp diagnostics
    • active clients
    • file percentage
    • line column
    • python virtualenv
  3. Option to disable components which you think are of little use to you.
  4. No external dependencies on other plugins for features like git branch, git diffs, virtual environment.

Requirements

Goals

  • Maintain a boundary between features and speed.
  • All famous themes will be included with Lunarline.

Installation

  • packer
use {
    'Murtaza-Udaipurwala/lunarline',
    requires = {'kyazdani42/nvim-web-devicons'},
    after = "<colorscheme>", -- replace <colorscheme> with colorscheme name. Eg: gruvbox
    -- config = [[require('plugins.lunarline')]],
}

use 'kyazdani42/nvim-web-devicons'
  • vim-plug
Plug 'Murtaza-Udaipurwala/lunarline.nvim'
Plug 'kyazdani42/nvim-web-devicons'

Get started

This will load up lunarline with its default configuration

require('lunarline').setup()

Customisation

local palette = {
    red = "#f65866",
    light_blue = "#9CDCFE",
    vivid_blue = "#4FC1FF",
    green = "#98c379",
    orange = "#ff8800",
    purple = "#C586C0",
    yellow = "#e1be79",
    black = "#10151a",
    white = "#f9f5d7",
}

require('lunarline').setup({
    -- enable/disable components
    options = {
        -- filename = false,
        filename = {
            relative_path = true,
            full_path = false,
            truncate_path = true,
            tail_only = false,
        },
        virtual_env = true,
        git_branch = true,
        active_clients = false,
        diagnostics = true,
        cursor_position = true,
        line_col = true,
    },

    -- theme = 'original', -- currently lunarline only has the original theme

    -- defining a custom theme
    colors = {
        active = {bg = palette.black, fg = palette.white},
        inactive = {bg = "NONE", fg = palette.white},
        mode_bar = {
            bg = palette.black,
            fg = {
                normal = palette.vivid_blue,
                insert = palette.red,
                visual = palette.yellow,
                command = palette.green,
                other = palette.black,
            }
        },
        filename = {fg = palette.purple, bg = palette.black},
        virtual_env = {fg = palette.yellow, bg = palette.black},
        git_branch = {fg = palette.green, bg = palette.black, style = "bold"},
        git_diff = {
            bg = colors.black,
            fg = {
                added = colors.green,
                removed = colors.red,
            }
        },
        active_clients = {fg = palette.yellow, bg = palette.black},
        lsp_diagnostics = {
            bg = palette.black,
            fg = {
                error = palette.red,
                warning = palette.orange,
                info = palette.vivid_blue,
                hint = palette.green,
            }
        },
        cursor_position = {fg = palette.light_blue, bg = palette.black},
        line_col = {fg = palette.light_blue, bg = palette.black},
    }
})

TODO

  • Git diff
  • python virtualenv
  • populate themes. Please make PRs' as the author is too lazy to do so(pun intended).

Issues

If your statusline isn't correctly highlighted, make sure lunarline is setup() after your colorscheme.

About

A neovim statusline written in lua

License:GNU General Public License v3.0


Languages

Language:Lua 95.2%Language:Vim Script 4.8%