GithubHelp home page GithubHelp logo

tamton-aquib / staline.nvim Goto Github PK

View Code? Open in Web Editor NEW
373.0 5.0 16.0 187 KB

A modern lightweight statusline and bufferline plugin for neovim in lua.

License: MIT License

Lua 100.00%
neovim statusline lua bufferline neovim-plugin

staline.nvim's Introduction

staline.nvim

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

Requirements

  • Requires neovim version >= 0.10
  • vim.opt.laststatus=2 in your init.lua for statusline. (or 3 for global line)
  • vim.opt.showtabline=2 in your init.lua for bufferline.
  • vim.opt.termguicolors = true must be set.

Installation

use 'tamton-aquib/staline.nvim'

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

Statusline

Screenshots

normal insert command visual

Configuration

require('staline').setup()
Click to see default configuration
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="",
    },
}
Sections
section use
mode shows the mode
branch shows git branch
file_name shows filename
file_size shows file size
cool_symbol an icon according to the OS type (cutomizable)
lsp lsp diagnostics (number of errors, warnings, etc)
lsp_name lsp client name
line_column shows line, column, percentage, etc
left_sep single left separator
right_sep single right separator
left_sep_double Double left separator with a shade of gray
right_sep_double Double right separator with a shade of gray
cwd Current working directory

To know more about colors and highlights, check highlights wiki

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

  • Already defnined section or a simple string:
    • "branch"
    • "a simple string"
  • An array of { highlight, string }
    • { "DiagnosticsError", "danger_icon" }
    • { "CustomHighlight", "simple_string" }
  • A function for dynamic content
     function()
         return "computed_dynamic_string"
     end

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

Showcase

  • Evil Line evil_line

  • Pebble Line pebble_line

  • Simple Line simple_line

Check out wiki to see some premade configs and tips.

Bufferline

Screenshots

bar mode

slant mode

arrow mode

bubble mode

  • Configuration
     require('stabline').setup()
The Default configuration looks something like
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
}
My personal config as of editing this file

my stabline config

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

Features

  • Lightweight and Fast. staline+stabline took < 1ms. (packers profiling)
  • Unicode current mode info. Needs a Nerd Font to be installed.
  • Has few builtin sections to chose from.
  • Mouse buffer selection on stabline.
  • Uses nvim-web-devicons if installed, else uses a default table.

Cons

  • No ordering or sorting functions for stabline.
  • No lsp info in stabline.
  • No git related info on staline except branch name.

Inspiration and credits:

TODO

  • User configuration options. Needs more work.
  • Git info. Only branch info for now, (or ever)
  • Adding "opt-in" bufferline function.
  • Add config options for bufferline.
  • lsp client name in staline.
  • buf numbers in stabline.
  • transparency problem when changed to 0.7 api.

staline.nvim's People

Contributors

bryant-the-coder avatar cronyakatsuki avatar deusprox avatar farias-hecdin avatar fazibear avatar is0n avatar max397574 avatar oferreir avatar philss avatar somehybrid avatar tamton-aquib avatar tomiis4 avatar wilsonoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

staline.nvim's Issues

Lazy Plugin Manager

To learn how to use Lazy.nvim to install StaLine and STabline, you can use the following method that we took in NvPak :

-- StaLine Neovim StatusLine
	{
		"tamton-aquib/staline.nvim",
		event = { "BufReadPre", "BufNew" },
		dependencies = "nvim-tree/nvim-web-devicons",
		config = function()
			....
			....
		end,
	},

[stabline] [FEAT]: Add tab index

Make bufferline (stabline) to have a tab indicator at the right side, where it would show current tab number and other tabs like buffers dimmed. Basically make it look like in nvim-bufbar or in bufferline.nvim. Would be nice to show only numbers when there are more than one tabs in the session.

I think that it would make the stabline more complete and useful with this update.

Screenshot:
image

E5108: Error executing lua ...ite/pack/packer/start/staline.nvim/lua/staline/utils.lua:10: Expected lua string

Installing stabline as shown in the README.
As soon as require('stabline').setup() is added to init.lua, this error pops up on startup:

E5108: Error executing lua ...ite/pack/packer/start/staline.nvim/lua/staline/utils.lua:10: Expected lua string
stack traceback:
        [C]: in function 'nvim_get_hl_by_name'
        ...ite/pack/packer/start/staline.nvim/lua/staline/utils.lua:10: in function 'extract_hl'
        ...vim/site/pack/packer/start/staline.nvim/lua/stabline.lua:56: in function 'do_icon_hl'
        ...vim/site/pack/packer/start/staline.nvim/lua/stabline.lua:86: in function <...vim/site/pack/packer/start/staline.nvim/lua/stabline.lua:62>

Issue with staline ui

Hey I have an issue with staline ui

In my NeoVim it looks like this
IMG_20211015_134657

How can I make it like this
Statusline

TrueColor

I liked the plugin very much and intalled staline on all of my desktops. In the terminals with truecolor support, it works fine, but I have a Ubuntu 14.04 laptop (needed for university purpose) and in that machine in gnome terminal, staline renders to be black n white (lualine worked fine there). Can something be done to remedy the situation?
image

termguicolors requirement is not mentioned anywhere

I tried to set up staline and kept having a problem that no colors would appear, it would just be white text on transparent background. After some time I discovered that termguicolors has to be set, it probably should have been obvious but it wasn't to me.

It's not mentioned neither in README nor in wiki, it would be nice if it was somewhere in README so no one has the same problem.

Color Line. exceeding indicator

Good day to you!

I have "Color Line setup from WikiExamples:
When i have one window open - it's okay

But when if i have any splits, then i have exceeding-indicator ("<"):
image
that's because vim.o.columns - is showing width of neovim instance, but not for current window

my question is:
how to get rid of this sign?

Set icons/symbols colors separately

Is it possible to set a default fg = "color" and set icon/symbol to a different color? For example in lualine, the fg, sets the color for each section and you can additionally set icon = { fg = "color", bg = "color" }.

Thanks!

Not working with init.vim

Hi there,
first of all very nice work, i really like the look of the bar.
I'm trying to setup it with init.vim as I'm not lua master. I've set all the requirements in my config

set termguicolors
set laststatus=3
set showtabline=2

I've inserted the default config in an external .lua file

luafile ~/.config/nvim/lua/staline.lua

nvim load with no errors but the bar does not appear. Can you spot anything wrong?
I'm having no problem doing the same with nvimtree
Thanks for your time
~Ste

Macro support in the status line?

It would be nice if the status bar could change it's current color and icon when the user is recording a macro, however, I don't know if this is possible as I haven't seen any other vim/neovim plugin implement this.

E5108: Error executing lua ...vim/site/pack/packer/start/staline.nvim/lua/stabline.lua:52: module 'tables' not found:

I was trying to install stabline with instructions from readme but encountered this error.

E5108: Error executing lua ...vim/site/pack/packer/start/staline.nvim/lua/stabline.lua:52: module 'tables' not found:
no field package.preload['tables']
no file './tables.lua'
no file '/home/timmy/neovim/.deps/usr/share/luajit-2.1.0-beta3/tables.lua'
no file '/usr/local/share/lua/5.1/tables.lua'
no file '/usr/local/share/lua/5.1/tables/init.lua'
no file '/home/timmy/neovim/.deps/usr/share/lua/5.1/tables.lua'
no file '/home/timmy/neovim/.deps/usr/share/lua/5.1/tables/init.lua'
no file '/home/timmy/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/tables.lua'
no file '/home/timmy/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/tables/init.lua'
no file '/home/timmy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/tables.lua'
no file '/home/timmy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/tables/init.lua'
no file './tables.so'
no file '/usr/local/lib/lua/5.1/tables.so'
no file '/home/timmy/neovim/.deps/usr/lib/lua/5.1/tables.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/home/timmy/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/tables.so'
stack traceback:
[C]: in function 'require'
...vim/site/pack/packer/start/staline.nvim/lua/stabline.lua:52: in function 'get_file_icon'
...vim/site/pack/packer/start/staline.nvim/lua/stabline.lua:80: in function <...vim/site/pack/packer/start/staline.nvim/lua/stabline.lua:66>

[stabline] [BUG]: The view on filenames doesn't move with the cursor

Previously referenced in issue #60.

The view (currently focused on buffer and others around it) doesn't move with the cursor (currently focused on buffer) so it doesn't show buffers that are not visible because of the screen width.

image

The cursor is at the leftmost buffer, but the whole view doesn't shift to the right to reveal its filename.

Works in VIM?

does this statusline work in vim? i tried but it seems that it doesnt works with vim.

Staline only shows a gray line

I installed this plugin using Vim Plug but when opening neovim it only shows a gray line
But when I open Treelua it shows up without any color
Neovim v0.6.0-dev

Default:
error

When treelua opens:
when open treelua

Git diff in statusbar

First of all thank you for making this plugin.

I wanted to add git diff in my statusbar. I have seen #27 and used that to make up some code

      local git_status = function(type, prefix)
        local status = vim.b.gitsigns_status_dict
        if not status then
          return nil
        end
        if not status[type] or status[type] == 0 then
          return nil
        end
        return prefix .. status[type]
      end
 In the statusline 
           {
             "GitSignsAdd",
             function()
               return git_status("added", " ") or ''
             end
           },
           " ",
           {
             "GitSignsChange",
             function()
               return git_status("changed", " ") or ''
             end
           },
           " ",
           {
             "GitSignsDelete",
             function()
               return git_status("removed", " ") or ''
             end
           }

           

image

      I couldnot do this in one block as I needed different highlights for each type of diff.
      Is there any way to do this better?  Also, can you add this as a module as it is not a specific requirement.  

Error starting any file

I updated the plugins with Packer and since then staline no longer works.

imagen

This is my version of nvim
imagen

By executing this command :checkhealth all is well

[stabline]: Show multiple buffers per tab

Hi! Great plugin, but there doesn't seem to be an option to show all buffers belonging to one tab in the stabline at the time.

Two buffers in the same tab (vsplit):
image

Two buffers in two different tabs or any number of buffers in one tab:
image

Nvim version: v0.9.5, using lazy.nvim

config
    {
        "tamton-aquib/staline.nvim",

        config = function()
            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                 = "%p%% [%l/%L]", -- `: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               = "",
                    null_ls_symbol              = "", -- A symbol to indicate that a source is coming from null-ls
                },
                mode_icons = {
                    n = "N",
                    i = "I",
                    c = "C",
                    v = "V", -- etc..
                },
                sections = {
                    left  = { '-mode', 'left_sep_double', 'branch', 'lsp' },
                    mid   = { '' },
                    right = { 'file_name', 'right_sep_double', '-line_column' },
                },
                inactive_sections = {
                    -- left  = { 'branch' },
                    -- mid   = { 'file_name' },
                    right = { 'line_column' }
                },
                lsp_symbols = {
                    Error = " ",
                    Info = " ",
                    Warn = " ",
                    Hint = "",
                },
            })

            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', "Alpha" },
                stab_start  = "", -- The starting of stabline
                stab_end    = "",
                numbers     = nil
            }
        end
    }

'=' expected near 'do_nothing'

Error message:

E5108: Error executing lua vim.lua:63: /home/lime/.local/share/nvim/plugs/staline.nvim/lua/stabline.lua:82: '=' expected near 'do_nothing'

Visual Block Mode not working

How do I configure the symbol and color for visual block mode? Whenever I enter the mode, staline uses the default colors and symbols. I looked into staline/config.lua, and tried finding the option for visual block mode, but each one I tried (V and ['']) did not work.

Here is my config:

require('staline').setup({
   defaults = {
      fg = '#292c3c',
      true_colors = true,
      inactive_color = '#babbf1',
      line_column = ' [%l/%L] :%c',
   },

   mode_colors = {
      n = '#8caaee',
      i = '#a6d189',
      ic = '#a6d189',
      c = '#ef9f76',
      v = '#ca9ee6',
   },

   mode_icons = {
      n = 'NORMAL 󰋜 ',
      i = 'INSERT 󰏫 ',
      ic = 'INSERT 󰏫 ',
      c = 'COMMAND  ',
      v = 'VISUAL 󰈈 ',
      V = 'eeeee', -- both of these are not working
      [''] = 'eeee'
   },

   lsp_symbols = {
      Error = '',
      Warn = '',
      Hint = '󰌶 ',
      Info = '󰋽 ',
   },

   sections = {
      left = { '- ', '-mode', 'left_sep', 'branch' },
      mid  = { 'file_name', 'lsp' },
      right = { 'cool_symbol', 'right_sep', '-line_column', '- ' },
   },

})

require('stabline').setup({
   inactive_fg = '#babbf1',
})

Here is an annotated screenshot:

CleanShot 2024-05-18 at 00 42 01@2x

Lsp_name

Please pay attention to the link I am sending.
EvolveBeyond/NvPak#45
We have been trying to solve this problem for some time.
But the problem is not from lsp, even if the lsp server is disabled manually, there is still a problem, and this can be caused by the method of calling servers in staline.

Staline seems to conflict with lsp hover

Hey all!

I'm trying to setup staline but for some reason it seems to conflict with lsp window popup. When I try to run vim.lsp.buf.hover() nothing happens, only when run it again then the popup appears but then it jumps to the floating window.

Any idea what is going on?

Staline with nvim-tree shows the same thing

When I started using Staline and nvim-tree, the buffers doesn't show separated lines, but the same line in both. When my cursor is on nvim-tree, the staline show the nvim-tree status, but when I'm writing code, the nvim-tree buffer doesn't show nvim-tree or anything related, just the current bufferline info.

Using Vim strings (vim.bo.ft), netrw state, color on start, custom buffer-specific configs and Windows tililng problem

There is this string vim.bo.filetype
image
image

I want a section with this string.. So I edited the premade pebble config... however it just shows an empty string (right side)
image

Full config

return function()
    require("staline").setup({
        sections = {
            left = {
                " ", "right_sep", "-mode", "left_sep", " ",
                "right_sep", "-file_name", "left_sep", " ",
                "right_sep", "-branch", "left_sep", " ",
            },
            mid  = { "lsp" },
            right =  {
                "right_sep", "- ", vim.bo.filetype:upper(), "- ", "left_sep", " ",
                "right_sep", "-line_column", "left_sep", " ",
            }
        },
        defaults = {
            fg = "#181a1f",
            left_separator = "",
            right_separator = "",
            true_colors = true,
            line_column = "%l:%c ~ %p%% ",
        },
        mode_colors = {
            n  = "#98c379",
            i  = "#d19a66",
            ic = "#181a23",
            c  = "#61afef",
            v  = "#c678dd",
            V  = "#9a6dd1",
            s  = "#123456",
            S  = "#000000",
            t  = "#ffffff",
            r  = "#971034",
            R  = "#546576"
        },
        mode_icons = {
            n = "Normal",
            i = "Insert",
            c = "Command",
            v = "Visual",
            no = "󰋜 ",
            niI = "󰋜 ",
            niR = "󰋜 ",
            niV = "󰋜 ",
            nov = "󰋜 ",
            noV = "󰋜 ",
            ic = "󰏫 ",
            ix = "󰏫 ",
            s = "󰏫 ",
            S = "󰏫 ",
            V = "󰈈 ",
            r = "󰛔 ",
            t = "" ,
            R = "",
        }
    });
end

Highlight groups do not activate on start

Problem: The statusbar uses nvim default statusbar highlight colours on start and only uses defined colors when a editable buffer is opened

Possible Explanation: The get_statusline() function in the staline.nvim file contains an if statement at the beginning which might be barring the colours to set up on non editable buffers like the dashboard, netrw or help

Possible Solution: Move the call_highlights() function call above the if statement in the function

M.get_statusline = function(status)
local mode = vim.api.nvim_get_mode()['mode']
local fgColor = status and conf.mode_colors[mode] or t.inactive_color
local bgColor = status and t.bg or t.inactive_bgcolor

call_highlights(fgColor, bgColor)

if conf.special_table[vim.bo.ft] ~= nil then
local special = conf.special_table[vim.bo.ft]
return "%#Staline#%=" .. special[2] .. special[1] .. "%="
end

M.sections = {}

local modeIcon = conf.mode_icons[mode] or "󰋜 "

local f_name = t.full_path and '%F' or '%t'
-- TODO: original color of icon
local f_icon = util.get_file_icon(vim.fn.expand('%:t'), vim.fn.expand('%:e'))
local edited = vim.bo.mod and t.mod_symbol or ""
-- TODO: need to support b, or mb?
local size = ("%.1f"):format(vim.fn.getfsize(vim.api.nvim_buf_get_name(0))/1024)

.
.
.
end

Solution solves problem: Yes

Side effects: Unknown

Avoid using hardcoded colors

The default mode_colors setting uses colors that don't work well with certain color schemes. I think that it would be better if staline-nvim would (by default) use colors based on the current color scheme instead of being hardcoded (kind of relates to #26).

I've gotten something like this to work with the following:

local function ExtractHl(name)
	return vim.api.nvim_exec('highlight ' .. name, true):match('guifg=(#[0-9A-Fa-f]+)')
end

require('staline').setup {
	mode_colors = {
		n  = ExtractHl("Normal"),
		i  = ExtractHl("Blue"),
		ic = ExtractHl("Green"),
		c  = ExtractHl("Purple"),
		v  = ExtractHl("Yellow"),
		['']  = ExtractHl("Yellow"),
		V  = ExtractHl("Orange"),
		t  = ExtractHl("Red"),
	}
}

This isn't perfect as ExtractHl will break if a highlight group does not exist or is linked to another group but it can definitely can be improved upon :D

Consider adding highlight group support for the mode colors

I know specific sections already have highlight group support, but it would be very nice to be able to set mode colors to highlight groups as well.
This would make it possible to set the colors in an external theme, instead of having to manually change the colors in the staline configuration in case of a theme change.

Example:

require('staline').setup {
	mode_colors = {
		n = "StalineNormal",
		i = "StalineInsert",
	}
}

mode_colors for v, not applying

Seems like there might be a bug, in the mode_colors for v, not matter what I set I get what my theme highlights it by default. all other modes works fine, even 'V'. I tested in lualine and it respects the highlight color I set, which makes me think it's not something in my end.

Here is my config:

return {
  "tamton-aquib/staline.nvim",
  -- enabled = false,
  config = function()
    local p = require("rose-pine.palette")

    require 'staline'.setup {
      sections = {
        left = { '  ', 'mode', ' ', 'branch', ' ', 'file_name' },
        mid = { 'git_diff' },
        right = { 'lsp_name', ' ', 'line_column' }
      },
      mode_colors = {
        n = p.gold,
        i = p.love,
        ic = p.foam,
        c = p.pine,
        v = p.rose,
        V = p.iris,
      },
      defaults = {
        true_colors = true,
        line_column = " [%l/%L][%c] 並%p%% ",
        branch_symbol = "",
      },
    }
  end,
}

Can someone confirm?

Cannot specify highlight group for user defined sections

I have a custom section like following. I also tried returning only the path, so my middle group would be either like mid = { { 'StalineFile', section_filename } } or mid = { section_filename }.

local function section_filename()
    local dir = vim.fn.expand('%:p:h:t')
    local file = vim.fn.expand('%:t')
    local path = string.format('%s/%s', dir, file)
    if vim.bo.modifiable and vim.bo.modified then path = path .. '*' end
    if vim.bo.readonly then path = ' ' .. path end
    return { 'StalineFile', path }
end

However, in the first case I get this:
image

And in the second case this:
image

Problem in window

This plugin is great. But it create a visual error or somekind... It says a directory of mine, multiple lines which is kinda annoying tho

Not able to update stabline inactive color

require('stabline').setup {
  defaults = {
    style = "bar",
    stab_left = "┃",
    stab_right = " ",
    inactive_bg = "#1e2127",
    inactive_fg = "#eeeeee", -- This does not update the foreground
    font_active = "bold",
    exclude_fts = {'NvimTree', 'dashboard', 'lir'},
    stab_start = "",
    stab_end = ""
  }
}

Could you please help me fix this?

User Defined Sections Don't Update

When I put my own sections in the sections table, those sections won't update, however, the other sections that are defined by the staline do.

Example Config Using nvim-gps:

local function context()
	if require("nvim-gps").is_available() then
		return require("nvim-gps").get_location()
	end
	return ''
end

-- Configuration
require('staline').setup{
	sections = {
		left  = { '-mode', 'left_sep', 'file_name' }, -- These will update
		mid   = { context() }, -- This will not update
		right = { 'cool_symbol', 'right_sep', '-line_column', '-cwd' } -- These will update
	},
}

Can I change the mode icons for Visual-line and Visual-block?

Hello, I'm trying to change the mode icons for Visual-line and block (because the icons used are no longer availiable and are replaced by what I think are arabic characters), but I can't find a way to do so. Is it possible to change these icons?

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.