galaxyline.nvim icon indicating copy to clipboard operation
galaxyline.nvim copied to clipboard

share your custom galaxyline

Open glepnir opened this issue 4 years ago • 129 comments

Hey need some screenshots in README. You can share your custom galaxyline screenshots in here and you can add the link .

glepnir avatar Oct 29 '20 05:10 glepnir

after

glepnir avatar Oct 29 '20 09:10 glepnir

2020-10-30_19-35

\o/

66RING avatar Oct 30 '20 11:10 66RING

would be good to have "defaults" themes out of the box or organize in a new repository.

carlitux avatar Oct 30 '20 12:10 carlitux

Sounds good. The purpose of galaxyline is to allow users to freely customize any status bar they want. So I provided the highlight keyword, considering that not everyone would be willing to spend time on configure colors, maybe a default theme can be provided, but it is simple. just merge highlight of each section with default theme.

glepnir avatar Oct 30 '20 12:10 glepnir

image

ChristianChiarulli avatar Oct 31 '20 22:10 ChristianChiarulli

image The eviline with rounded sep, find it more elegant

bpingris avatar Nov 11 '20 11:11 bpingris

I based my configuration off of evilline, but I streamlined a bit of the function logic for the custom providers and added the mode text back. Here's a screenshot:

Statusline

Here's the code.

Edit: I updated the image to reflect some changes over the past day. It's a pretty impressive plugin! I was surprised by how well you can reorganize things in order to change the effects.

Edit 2: Updated again, added changing colors according to filetype and more adapting to short windows.

Iron-E avatar Nov 12 '20 18:11 Iron-E

Evilline with coc-lsp status evliline_lsp Code

LoydAndrew avatar Nov 27 '20 13:11 LoydAndrew

How can I get the Version of Python Interpreter and the name of Virtualenv like vim-airline? 2020-11-29_20-40-23

AlanJui avatar Nov 29 '20 12:11 AlanJui

Evilline with coc-lsp status evliline_lsp

Could you please to share your code?

AlanJui avatar Nov 29 '20 13:11 AlanJui

@AlanJui I've updated my comment. Maybe I should make a pull request for coc-lsp, so it work out of a box.

LoydAndrew avatar Nov 29 '20 13:11 LoydAndrew

My status line using a modded version of spaceline.lua

image

Code

richin13 avatar Dec 05 '20 00:12 richin13

My statusline made to look as close as possible to spacemac's statusline

image

code

Edit: opening file with system shell shebang will now return the actual system shell (ex bash or dash) and if python shebang doesn't give version number then it will return python --version.

Th3Whit3Wolf avatar Dec 06 '20 13:12 Th3Whit3Wolf

Mine slightly mixes the spaceline and eviline in your README.

Screenshot from 2020-12-19 21-02-06

Screenshot from 2020-12-19 21-02-13

Screenshot from 2020-12-19 21-02-09

EDIT:- code

ishan9299 avatar Dec 19 '20 16:12 ishan9299

My variant eviline.lua

alien_line

CODE

voitd avatar Dec 30 '20 18:12 voitd

my minimalist galaxyline setup.

minimal-galaxyline

Code

disrupted avatar Jan 16 '21 10:01 disrupted

minimalist fork of Th3Whit3Wolf's variant изображение изображение code

uvicorn avatar Jan 16 '21 22:01 uvicorn

I am seeing a ton of examples here where people have a mapping from a vim mode to a color. No one is handing visual block mode in the posted configs (or I don't know how to see how they are). Does anyone have any idea how to set a key that would capture visual block? Here is my current config.

      local mode_color = {
        -- normal
        n = colors.cyan,
        no = colors.cyan,
        -- selection
        s = colors.dark_yellow,
        -- insert
        i = colors.red,
        -- visual
        V = colors.yellow,
        v = colors.yellow,
        ['^V'] = colors.yellow, -- <- here is the problem child
        c = colors.purple,
        -- terminal
        t = colors.green
      }

I have tried several different values there and nothing seems to come through. If I do print(vim.fn.mode()) when I am in visual block ^V shows up in a blue color in my output. So I feel like it should work but there must be more to it.

skbolton avatar Feb 01 '21 04:02 skbolton

@skbolton check here https://github.com/glepnir/galaxyline.nvim/blob/fd3f069c6fb5eabc5dbad030b3c729bb0c6346ec/example/eviline.lua#L36-L43

glepnir avatar Feb 01 '21 05:02 glepnir

@skbolton

local mode_color = {
        n = 'DarkGoldenrod2',
        i = 'chartreuse3',
        v = 'gray',
        [""] = 'gray',
        V = 'gray',
        c = 'plum3',
        no = 'DarkGoldenrod2',
        s = 'SkyBlue2',
        S = 'SkyBlue2',
        [""] = 'SkyBlue2',
        ic = 'chartreuse3',
        R = 'purple',
        Rv = 'purple',
        cv = 'plum3',
        ce = 'plum3',
        r = 'chocolate',
        rm = 'chocolate',
        ["r?"] = 'chocolate',
        ["!"] = 'plum3',
        t = 'plum3'
    }

Th3Whit3Wolf avatar Feb 01 '21 09:02 Th3Whit3Wolf

@Th3Whit3Wolf copied all of your keys for the different modes and put in my colors. When I go into Visual Block <c-v> I get errors because reading from that map returns nil. Do you use visual block mode?

@glepnir Looks like they have all the same ones you have in your snippet. Do you know which one is supposed to be for visual block mode?

skbolton avatar Feb 01 '21 22:02 skbolton

image image image Here are configs: galaxyline, colors

kraftwerk28 avatar Feb 01 '21 22:02 kraftwerk28

@Th3Whit3Wolf copied all of your keys for the different modes and put in my colors. When I go into Visual Block <c-v> I get errors because reading from that map returns nil. Do you use visual block mode?

@glepnir Looks like they have all the same ones you have in your snippet. Do you know which one is supposed to be for visual block mode?

@skbolton :help mode() is your best friend 👍🏼

richin13 avatar Feb 01 '21 22:02 richin13

@richin13 I checked that before posting this issue. For visual block mode it says it returns CTRL-V. I have tried so many versions of listing this as a key and none of them seem to work.

["CTRL-V"] = colors.yellow,
["^v"] = colors.yellow,
["^V"] = colors.yellow,
["CTRL_V"] = colors.yellow,
["CTRL-v"] = colors.yellow,
["ctrl-v"] = colors.yellow

The help docs highlight CTRL-V differently so thats what lead me to believe that I needed to list it as ["^V"].

@kraftwerk28 what happens when you go into visual block mode <C-v>? I don't think your [''] = ... mapping works.

skbolton avatar Feb 02 '21 00:02 skbolton

output is ^V,but you can use ^V this to match visual mode,Because there are some escaping here, the above code snippet should work.

glepnir avatar Feb 02 '21 00:02 glepnir

Yeah I was thinking ['^V'] = ... was the one that would work and its the first one I tried. But it doesn't work.

skbolton avatar Feb 02 '21 00:02 skbolton

@skbolton yeah, you want lua strings/char, not vim strings/char for table keys. or this way, but i suggest use above code snippet

local aliases
  22 = V_BLOCK,
  86 = VISUAL,
  99 = COMMAND,
  105 = INSERT,
  110 = NORMAL,
}
print(vim.fn.mode():byte())

glepnir avatar Feb 02 '21 01:02 glepnir

Sorry not following @glepnir what you mean by the above snippet? Also sorry for commandeering this issue. I can create a new one if you'd like

skbolton avatar Feb 02 '21 01:02 skbolton

@skbolton

local mode_color = {
        n = 'DarkGoldenrod2',
        i = 'chartreuse3',
        v = 'gray',
        ["�"] = 'gray',
        V = 'gray',
        c = 'plum3',
        no = 'DarkGoldenrod2',
        s = 'SkyBlue2',
        S = 'SkyBlue2',
        ["�"] = 'SkyBlue2',
        ic = 'chartreuse3',
        R = 'purple',
        Rv = 'purple',
        cv = 'plum3',
        ce = 'plum3',
        r = 'chocolate',
        rm = 'chocolate',
        ["r?"] = 'chocolate',
        ["!"] = 'plum3',
        t = 'plum3'
    }

these code .hmm This is the upstream implementation, so you should report to neovim

glepnir avatar Feb 02 '21 01:02 glepnir

Sounds good thanks @glepnir

skbolton avatar Feb 02 '21 01:02 skbolton

https://user-images.githubusercontent.com/48275422/106874916-064df300-66ce-11eb-8a43-873a2bb8590f.mp4

Small update. @glepnir help me figure out automatic switching between light and dark colorschemes so I thought I'd post a something here.

Th3Whit3Wolf avatar Feb 04 '21 09:02 Th3Whit3Wolf

seems like pretty good. BTW now galaxyline async load some providers that taks a lot of startuptime. so now is fastest.

glepnir avatar Feb 04 '21 10:02 glepnir

Please create a new issue not ask in here.

glepnir avatar Feb 11 '21 08:02 glepnir

Here is mine. Lightline style'ish Gruvbox colorscheme. image image image image image

Highly dynamic (see Gif) Code

Thank you @glepnir for an amazing tool (waiting patiently for https://github.com/glepnir/galaxyline.nvim/issues/24). Thank you @kraftwerk28 for your ideas and approach (took your cfg as a reference).

horseinthesky avatar Feb 18 '21 11:02 horseinthesky

@horseinthesky you can use <image> tag to wrap your pic url.

glepnir avatar Feb 18 '21 11:02 glepnir

image

This is Code

Thank you very much for the author recommend me a few days ago the plug-in

denstiny avatar Feb 24 '21 12:02 denstiny

vim.mp4

Small update. @glepnir help me figure out automatic switching between light and dark colorschemes so I thought I'd post a something here.

Can you share more on this? Are you loading theme color data from a toml file into your theme and refreshing neovim?

olimorris avatar Feb 27 '21 00:02 olimorris

I have a function like this

function M.Color(val)
      return function()
        local dark = {
            bg = "#282c34",
            bg2 = "#212026",
            base = "#b2b2b2",
            comp = "#c56ec3",
            func = "#bc6ec5",
            act1 = "#222226",
            DarkGoldenrod2 = "#eead0e", -- normal / unmodified
            chartreuse3 = "#66cd00", --insert
            SkyBlue2 = "#7ec0ee", -- modified
            chocolate = "#d2691e", -- replace
            gray = "#bebebe", -- visual
            plum3 = "#cd96cd", -- read-only / motion
            yellow = "#fabd2f",
            cyan = "#008080",
            darkblue = "#081633",
            green = "#afd700",
            orange = "#FF8800",
            purple = "#5d4d7a", --act2
            magenta = "#d16d9e",
            grey = "#c0c0c0",
            blue = "#0087d7",
            red = "#ec5f67",
            comments = "#2aa1ae",
            head1 = "#4f97d7",
            error = "#e0211d", --err
            warning = "#dc752f", -- war
            info = "#4f97d7" -- keyword
        }
        local light = {
            bg = "#fbf8ef",
            bg2 = "#efeae9",
            base = "#655370",
            comp = "#6c4173",
            act1 = "#e7e5eb",
            func = "#6c3163",
            DarkGoldenrod2 = "#eead0e", -- normal / unmodified
            chartreuse3 = "#66cd00", --insert
            SkyBlue2 = "#7ec0ee", -- modified
            chocolate = "#d2691e", -- replace
            gray = "#bebebe", -- visual
            plum3 = "#cd96cd", -- read-only / motion
            yellow = "#fabd2f",
            cyan = "#008080",
            darkblue = "#081633",
            green = "#afd700",
            orange = "#FF8800",
            purple = "#d3d3e7", --act2
            magenta = "#d16d9e",
            grey = "#c0c0c0",
            blue = "#0087d7",
            red = "#ec5f67",
            comments = "#2aa1ae",
            head1 = "#3a81c3",
            error = "#e0211d", -- err
            warning = "#dc752f", -- war
            info = "#3a81c3"
        }
        if vim.o.background ~= nil and vim.o.background == "light" then
            if light[val] ~= nil then
                return light[val]
            else
                return light.error
            end
        elseif vim.o.background ~= nil and vim.o.background == "dark" then
            if dark[val] ~= nil then
                return dark[val]
            else
                return dark.error
            end
        end
    end
end

And I call it like this

local c = require("plugins.statusline.colors")
gls.right[1] = {
    FileFormat = {
        provider = fileFormat,
        highlight = {c.Color('base'), c.Color('purple')}
    }
}
gls.right[2] = {
    LineInfo = {
        provider = lineColumn,
        separator = " | ",
        separator_highlight = {c.Color('base'), c.Color('purple')},
        highlight = {c.Color('base'), c.Color('purple')}
    }
}
gls.right[3] = {
    PerCent = {
        provider = linePercent,
        separator = i.slant.Left,
        separator_highlight = {c.Color('act1'), c.Color('purple')},
        highlight = {c.Color('base'), c.Color('act1')}
    }
}

Th3Whit3Wolf avatar Feb 27 '21 10:02 Th3Whit3Wolf

image

nvim conf https://github.com/cwebster2/vim

cwebster2 avatar Mar 03 '21 06:03 cwebster2

Screenshot_20210306_125356

full neovim configuration nvimrc galaxyline configuration galaxyline.lua

mnabila avatar Mar 06 '21 05:03 mnabila

now support mid section like this

eviline

glepnir avatar Mar 08 '21 06:03 glepnir

现在支持这样的中段

邪恶的

LSP symbol is very good

denstiny avatar Mar 08 '21 06:03 denstiny

hmm I think you should use english in github :)

glepnir avatar Mar 08 '21 06:03 glepnir

hmm I think you should use english in github :)

ok,I'm sorry

denstiny avatar Mar 08 '21 06:03 denstiny

Is there any galaxyline theme that automatically adapts to any colorscheme? I've tried using terminal colors, like:

 local colors = {
     bg = vim.g.terminal_color_0,
     fg = vim.g.terminal_color_15,
     section_bg = vim.g.terminal_color_12,
     blue = vim.g.terminal_color_12,
     green = vim.g.terminal_color_10,
     purple = vim.g.terminal_color_13,
     orange = vim.g.terminal_color_11,
     red1 = vim.g.terminal_color_9,
     red2 = vim.g.terminal_color_9,
     yellow = vim.g.terminal_color_3,
     gray1 = '#5c6370',
     gray2 = '#2c323d',
     gray3 = '#3e4452',
     darkgrey = '#5c6370',
     grey = '#848586',
     middlegrey = '#8791A5'
 }

But it relies on the colorscheme having defined terminal colors, and many colorschemes don't do it. Is there any other way?

metalelf0 avatar Mar 10 '21 14:03 metalelf0

hmm colorscheme should support terminal_color.

glepnir avatar Mar 10 '21 14:03 glepnir

Is there any galaxyline theme that automatically adapts to any colorscheme? I've tried using terminal colors, like:

 local colors = {
     bg = vim.g.terminal_color_0,
     fg = vim.g.terminal_color_15,
     section_bg = vim.g.terminal_color_12,
     blue = vim.g.terminal_color_12,
     green = vim.g.terminal_color_10,
     purple = vim.g.terminal_color_13,
     orange = vim.g.terminal_color_11,
     red1 = vim.g.terminal_color_9,
     red2 = vim.g.terminal_color_9,
     yellow = vim.g.terminal_color_3,
     gray1 = '#5c6370',
     gray2 = '#2c323d',
     gray3 = '#3e4452',
     darkgrey = '#5c6370',
     grey = '#848586',
     middlegrey = '#8791A5'
 }

But it relies on the colorscheme having defined terminal colors, and many colorschemes don't do it. Is there any other way?

You could try getting the color value of highlight groups. For example to get the value of the foreground for the Normal highlight group.

local normal = vim.fn.synIDattr(vim.fn.synIDtrans(vim.fn.hlID("Normal")), "fg#")

Th3Whit3Wolf avatar Mar 11 '21 01:03 Th3Whit3Wolf

normal insert view

Source code here

[Thanks to @ChristianChiarulli]

crivotz avatar Mar 12 '21 15:03 crivotz

Old - 13.03.2021 Bildschirmfoto 2021-03-13 um 23 01 33 old galaxyline.lua config file

Updated - 14.03.2021 Bildschirmfoto 2021-03-14 um 22 58 11 galaxyline.lua config file

tomothys avatar Mar 13 '21 22:03 tomothys

I created a simple status line

Screen Shot 2021-03-11 at 19 23 Screen Shot 2021-03-11 at 19 27 Screen Shot 2021-03-11 at 19 28 https://github.com/yamatsum/nvim-nonicons

yamatsum avatar Mar 15 '21 06:03 yamatsum

I have a somewhat minimal galaxyline that I love, dearly. Colors change on theme toggle:

Screen Shot 2021-03-16 at 10 40 59

Source code here.

Shoutout to @Th3Whit3Wolf and @glepnir. Their comments on #68 were a great source of inspiration.

EDIT: Huge shoutout to @disrupted for the epic Lua dotfiles - I've followed them line by line

olimorris avatar Mar 16 '21 10:03 olimorris

Does anyone know why eviline has different background colors where there is no component compared to @glepnir's screenshots?

Mine: Correct (above in this thread):

mfiano avatar Mar 16 '21 23:03 mfiano

@mfiano Please check the following settings. :highlight StatusLine

You will need to set the same value for galaxyline's bg and guibg.

yutkat avatar Mar 17 '21 01:03 yutkat

Proposal: why don't we (or @glepnir) define a format for a default palette, e.g. a base16 one, to be used by ALL galaxyline configs? This would allow much easier theming by creating a per-theme galaxyline palette valid for all configs.

metalelf0 avatar Mar 17 '21 13:03 metalelf0

Proposal: why don't we (or @glepnir) define a format for a default palette, e.g. a base16 one, to be used by ALL galaxyline configs? This would allow much easier theming by creating a per-theme galaxyline palette valid for all configs.

I think that's a great idea that would allow to reuse configurations without having to change all colors manually.

Currently (to tackle this issue) I am using the color file from the gruvbox plugin, which defines 36 colors : 16 dark, 16 light, and two additional "hard" and "soft" for both light and dark theme.

Maybe this feature could be mirrored by allowing galaxy palette to have a light and a dark theme ? (with a default one ?). I know that some people like to switching between light and dark according to the time, might try this one day, and having colorscheme providing both dark and light colors could help to provide this feature I wonder if hard and soft fg colors are useful, though (it's used for changing contrast). But it could also be optional.

edit : it could also be solved by using the colors defined in the vim colorscheme, as already mentionned in previous comments https://github.com/glepnir/galaxyline.nvim/issues/12#issuecomment-795530114

koalp avatar Mar 17 '21 15:03 koalp

edit : it could also be solved by using the colors defined in the vim colorscheme, as already mentionned in previous comments #12 (comment)

Yeah, that was something I was trying to setup, but results greatly vary in quality with this approach. Terminal colors aren't always defined in colorschemes (especially older ones), and syntax colors are way too subjective to base such a feature upon. But maybe I just didn't find the right settings, if you can get a decent combination please share!

metalelf0 avatar Mar 17 '21 15:03 metalelf0

Using the custom ShowLspClient element from eviline.lua, I struggle to get it to update when I have a Python and a Lua buffer open at the same time.

If I restore a session and the first buffer displayed is Lua then I see sumneko_lua. Then if I move to the Python buffer I just see No Active Lsp. Conversely, I start in the python buffer then I see pyright and then No active Lsp in the Lua file.

The Lsp's are fully working in both files though.

olimorris avatar Mar 17 '21 21:03 olimorris

@olimorris fixed now.

glepnir avatar Mar 18 '21 09:03 glepnir

@metalelf0 @koalp about theme check here https://github.com/glepnir/galaxyline.nvim/blob/main/lua/galaxyline/theme.lua

you can create pr for your favorite theme.i will merge.

glepnir avatar Mar 18 '21 09:03 glepnir

image

config here , Its still incomplete tho . I want to add this same statusline for inactive windows as well but colorless

siduck avatar Mar 18 '21 09:03 siduck

2021-03-19_19-19

One feature of my status bar is that I can use the ! key to toggle the information. 2021-03-19_19-19_1

https://github.com/yutkat/dotfiles/blob/master/.config/nvim/lua/rc/pluginconfig/galaxyline.lua

yutkat avatar Mar 19 '21 10:03 yutkat

I wonder if there is an example not using nerd font?

huyvohcmc avatar Mar 19 '21 17:03 huyvohcmc

@mfiano could you please share your config?

uvicorn avatar Mar 21 '21 12:03 uvicorn

@peach-lasagna I worked around it, but here it is: https://git.mfiano.net/mfiano/vim-config

mfiano avatar Mar 21 '21 12:03 mfiano

Thanks!

uvicorn avatar Mar 21 '21 13:03 uvicorn

Captura de Pantalla 2021-03-21 a la(s) 21 47 25

Code

lbavendanos avatar Mar 22 '21 03:03 lbavendanos

Please someone can tell me how i can insert datimetime in async mode. Thanks

sphynx79 avatar Mar 24 '21 13:03 sphynx79

@sphynx79 show time in statusline right?

glepnir avatar Mar 26 '21 12:03 glepnir

yes

sphynx79 avatar Mar 26 '21 12:03 sphynx79

@sphynx79

Here is a lua example

gls.left[1] = {
    ViMode = {
        provider = function()
            return ' ' .. '  ' .. os.date('%H:%M') .. ' ' 
        end,
        highlight = {colors.background, colors.green},
        separator = " ",
        separator_highlight = {colors.lightBackground, colors.lightBackground}
    }
}

This is what you want pretty much os.date('%H:%M')

Here are the docs on time and date formatting in lua

image

vuki656 avatar Mar 27 '21 18:03 vuki656

Screen Shot 2021-04-03 at 10 23 34 Combine config.

im6h avatar Apr 03 '21 03:04 im6h

This plugin is amazing! Thanks @glepnir! I have never seen a status line so easy to customize. With just a little work, I managed to setup this line with asynchronous weather information:

Captura de Tela 2021-04-04 às 20 01 45 Captura de Tela 2021-04-04 às 20 02 03

ronisbr avatar Apr 04 '21 23:04 ronisbr

@ronisbr Share the code pls.

horseinthesky avatar Apr 05 '21 05:04 horseinthesky

@ronisbr Share the code pls.

Yes sure! I just need to clean the code and I will submit to my GitHub repository. I will edit this comment when I do this (hopefully today!).

ronisbr avatar Apr 05 '21 12:04 ronisbr

@horseinthesky Done! Sorry for the delay. You can see how I did this in this repository:

https://github.com/ronisbr/nvim

ronisbr avatar Apr 07 '21 16:04 ronisbr

The fastest and easiest customize status line plugin. Thanks author and everyone for show cases

image

image

image

Code

nxvu699134 avatar Apr 09 '21 12:04 nxvu699134

statusline

Tinku10 avatar Apr 12 '21 10:04 Tinku10

image

zer0-5 avatar Apr 15 '21 14:04 zer0-5

Active window: image Inactive window: image

code

MagicDuck avatar Apr 20 '21 18:04 MagicDuck

I'm nearly finished a version I'm happy with, one thing I'm trying to figure out is how to dynamically change the text colour. The right most text here is currently black on blue "40[40]". The first number is the current cursor column the second number in square brackets is the overall length of the current line. I'd like to change the colours as you type, so amber when you hit 80 characters and red when you hit 100 chars, for example. Any help appreciated.

image

When its working I'll post the config.

jimcornmell avatar Apr 26 '21 08:04 jimcornmell

@jimcornmell

What if you create a highlight like:

highlight = 'MyHighlight',

And in the provider function you change the color to the one you want using:

vim.cmd('highlight MyHighlight guifg=' .. color .. ' guibg='..colors.section_bg)

?

ronisbr avatar Apr 26 '21 19:04 ronisbr

Thanks, that worked a treat, here is a snippet from my config: My full configuration is here

local lineLengthWarning = 80
local lineLengthError = 120

c = c+1
gls.right[c] = {
    CursorColumn = {
        provider = function()
            if (vim.fn.col('.') > lineLengthWarning)
            then
                if (vim.fn.col('.') > lineLengthError)
                then
                    vim.cmd('highlight LinePosHighlight guifg=' .. colors.linelongfg .. ' guibg=' .. colors.linelongbg)
                else
                    vim.cmd('highlight LinePosHighlight guifg=' .. colors.linelongwarnfg .. ' guibg=' .. colors.linelongbg)
                end
            else
                vim.cmd('highlight LinePosHighlight guifg=' .. colors.lineokfg .. ' guibg=' .. colors.lineokbg)
            end
            return " " .. vim.fn.col('.')
        end,
        separator = '⇔ ',
        separator_highlight = {colors.statsicon, colors.statsbg},
        highlight = 'LinePosHighlight'
    }
}

c = c+1
gls.right[c] = {
    LineLength = {
        provider = function()
            if (vim.fn.strwidth(vim.fn.getline('.')) > lineLengthWarning)
            then
                if (vim.fn.strwidth(vim.fn.getline('.')) > lineLengthError)
                then
                    vim.cmd('highlight LineLenHighlight guifg=' .. colors.linelongfg .. ' guibg=' .. colors.linelongbg)
                else
                    vim.cmd('highlight LineLenHighlight guifg=' .. colors.linelongwarnfg .. ' guibg=' .. colors.linelongbg)
                end
            else
                vim.cmd('highlight LineLenHighlight guifg=' .. colors.lineokfg .. ' guibg=' .. colors.lineokbg)
            end
            return "[" .. vim.fn.strwidth(vim.fn.getline('.')) .. "] "
        end,
        highlight = 'LineLenHighlight'
    }
}

jimcornmell avatar Apr 27 '21 08:04 jimcornmell

image Code

hackorum avatar May 11 '21 15:05 hackorum

image

Code

iwfan avatar May 15 '21 03:05 iwfan

image

could you please share your code for this

lanox avatar May 20 '21 05:05 lanox

image

could you please share your code for this Found in Lunar Vim

jedi04 avatar May 20 '21 15:05 jedi04

My version of galaxyline, including modified colorschemes to properly match with solarized (dark+light) and gruvbox (dark+light). I'm not always using galaxyline providers as some did not provide the desired on-demand live toggling. Instead i've included small functions within sections to give me finer control of changing statusline components on the fly.

A few rough guidelines for myself:

  1. I don't like large movements in the statusline
  2. I like multi-use statusline components (for instance, changing colours while text stays put) to maintain point 1.
  3. I try to find a balance between contrasting colours and readability. Favouring higher contrast for the more important indicators
  4. I don't like repetition, however i'm also lazy, so i'm sure there are some optimisations left in that space

git-changes-lsp-diagnostics-solarized-dark git-changes-lsp-diagnostics-solarized-light git-changes-lsp-diagnostics-gruvbox-dark git-changes-lsp-diagnostics-gruvbox-light

From left to right (roughly)
  • left
    • VIM mode indicator
      • colors change depending on mode
      • letter changes depending on mode
    • Window number the currently opened buffer resides in
    • indicator :: paste mode
    • indicator :: spelling check
    • indicator (multi-use) :: trailing whitespace | mixed indent (spaces+tabs)
    • git branch (if opened buffer resides in git directory, otherwise show dots)
      • branch name of current checked out git branch
    • git status (only shows up when opened buffer resides in git repository)
      • git additions (green if != 0)
      • git changes (yellow / orange if != 0)
      • git deletions (red if != 0)
  • middle
    • file icon
      • changes colour depending on :: modified, readonly, modifiable
    • file name
      • shows full absolute path (excluding home folder component) when screen width > 150 lines
      • shows file name when screen width < 150 lines
      • shows a hyphen if screen width == 0
  • right
    • LSP status (only shows up when opened buffer is attached to LSP client)
      • diagnostic error (red if != 0)
      • diagnostic warning (yellow / orange if != 0)
      • diagnostic information (blue if != 0)
      • diagnostic hint (green if != 0)
    • LSP details (if opened buffer is attached to LSP client, otherwise show dots)
      • number of LSP clients attached to buffer
      • LSP client name (if there are +1 clients attached to the buffer, it picks the name of the LSP client with the lowest LSP client ID, or first -defined- LSP client. Therefore; LSP client order matters)
    • file size
    • vim.bo.tabstop value or "indent level" of opened buffer
    • file type of opened buffer
      • if opened buffer is not utf-8 encoded the filetype name lights up with a slightly off colour
    • file format of opened buffer, depicted with an icon (dos, mac, unix)
    • position of cursor in opened buffer shown as line:column
    • position of cursor in opened buffer shown as a percentage
file :: ~/.config/nvim/lua/galaxyline-nvim.lua :: loaded via tjdevries/astronauta.nvim
require ('galaxyline').short_line_list = {
  'Mundo',
  'MundoDiff',
  'NvimTree',
  'fugitive',
  'fugitiveblame',
  'help',
  'minimap',
  'qf',
  'tabman',
  'tagbar',
  'toggleterm'
}

local vi_mode_mapping = {
  ['']   = {'Empty',        '-'},
  ['!']  = {'Shell',        '-'},
  ['^V'] = {'CommonVisual', 'B'}, -- NOTE: You'll have to remove '^V' and input a 'real' '^V' sequence. You can do that with the following key sequence: <SHIFT-i> + <CTRL-v> + <CTRL-v> (don't be slow with the double <CTRL-v>)
  ['R']  = {'Replace',      'R'},
  ['Rv'] = {'Normal',       '-'},
  ['S']  = {'Normal',       '-'},
  ['V']  = {'CommonVisual', 'L'},
  ['c']  = {'Command',      'C'},
  ['ce'] = {'Normal',       '-'},
  ['cv'] = {'Normal',       '-'},
  ['i']  = {'Insert',       'I'},
  ['ic'] = {'Normal',       '-'},
  ['n']  = {'Normal',       'N'},
  ['no'] = {'Normal',       '-'},
  ['r']  = {'Normal',       '-'},
  ['r?'] = {'Normal',       '-'},
  ['rm'] = {'Normal',       '-'},
  ['s']  = {'Normal',       '-'},
  ['t']  = {'Terminal',     'T'},
  ['v']  = {'CommonVisual', 'V'}
}

require ('galaxyline').section.left = {
  {
    LeftViModeColourSet = {
      provider = function()
        if vi_mode_mapping[vim.fn.mode()] == nil then
          vim.api.nvim_command("highlight link GalaxyViModeColourUnturned GalaxyViModeEmptyUnturned")
          vim.api.nvim_command("highlight link GalaxyViModeColourInverted GalaxyViModeEmptyInverted")
        else
          vim.api.nvim_command("highlight link GalaxyViModeColourUnturned GalaxyViMode" .. vi_mode_mapping[vim.fn.mode()][1] .. "Unturned")
          vim.api.nvim_command("highlight link GalaxyViModeColourInverted GalaxyViMode" .. vi_mode_mapping[vim.fn.mode()][1] .. "Inverted")
        end
      end
    }
  },
  {
    LeftViModeSeparator = {
      highlight = 'GalaxyViModeColourUnturned',
      provider = function()
        return ' '
      end
    }
  },
  {
    LeftViMode = {
      highlight = 'GalaxyViModeColourUnturned',
      provider = function()
        if vi_mode_mapping[vim.fn.mode()] == nil then
          return ' -'
        else
          return ' ' .. string.format('%s', vi_mode_mapping[vim.fn.mode()][2])
        end
      end,
      separator = ' ',
      separator_highlight = 'GalaxyViModeColourUnturned'
    }
  },
  {
    LeftWindowNumberSeparator = {
      highlight = 'GalaxyViModeColourUnturned',
      provider = function()
        return ''
      end,
      separator = ' ',
      separator_highlight = 'GalaxyViModeColourUnturned'
    }
  },
  {
    LeftWindowNumber = {
      highlight = 'GalaxyViModeColourUnturned',
      provider = function()
        return '  ' .. vim.api.nvim_win_get_number(vim.api.nvim_get_current_win())
      end,
      separator = ' ',
      separator_highlight = 'GalaxyViModeColourUnturned'
    }
  },
  {
    LeftStatusSeparator = {
      highlight = 'GalaxyViModeColourInverted',
      provider = function()
        return ''
      end,
      separator = ' ',
      separator_highlight = 'GalaxyViModeColourInverted'
    }
  },
  {
    LeftStatusPaste = {
      highlight = 'GalaxyMapperCommon6',
      provider = function()
        if vim.o.paste then
          return ''
        else
          return ''
        end
      end,
      separator = '  ',
      separator_highlight = 'GalaxyMapperCommon6',
    }
  },
  {
    LeftStatusSpell = {
      highlight = 'GalaxyMapperCommon6',
      provider = function()
        if vim.wo.spell then
          return '暈'
        else
          return ' '
        end
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon6'
    }
  },
  {
    LeftStatusMixedIndentWhiteSpace = {
      provider = function()
        vim.cmd('match none /\t/')

        if vim.fn.search([[\v(^\t+)]], 'nw') ~= 0 and vim.fn.search([[\v(^ +)]], 'nw') ~= 0 then
          vim.cmd('highlight link GalaxyLeftStatusMixedIndentWhiteSpace GalaxyMapperCommon6')
          vim.cmd('match ErrorMsg /\t/')
          return ' '
        end

        if vim.fn.search('\\s$', 'nw') ~= 0 then
          vim.cmd('highlight link GalaxyLeftStatusMixedIndentWhiteSpace GalaxyMapperCommon6')
          return 'ﲕ '
        end

        if vim.fn.search([[\v(^\t+)]], 'nw') ~= 0 then
          vim.cmd('highlight link GalaxyLeftStatusMixedIndentWhiteSpace GalaxyMapperCommon8')
        else
          vim.cmd('highlight link GalaxyLeftStatusMixedIndentWhiteSpace GalaxyMapperCommon6')
        end

        return ' '
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon6'
    }
  },
  {
    LeftGitSeparator = {
      highlight = 'GalaxyMapperCommon6',
      provider = function()
        return ''
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon6'
    }
  },
  {
    LeftGitBranch = {
      highlight = 'GalaxyMapperCommon6',
      provider = function()
        if require('galaxyline.condition').check_git_workspace() then
          return ' ' .. require('galaxyline.provider_vcs').get_git_branch()
        else
          return ' '
        end
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon6'
    }
  },
  {
    LeftGitDiffSeparator = {
      highlight = 'GalaxyMapperCommon1',
      provider = function()
        return ''
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon1',
    }
  },
  {
    LeftGitDiffAdd = {
      condition = require("galaxyline.condition").check_git_workspace,
      provider = function()
        if require('galaxyline.provider_vcs').diff_add() then
          vim.cmd('highlight link GalaxyLeftGitDiffAdd GalaxyLeftGitDiffAddActive')
          return '+' .. require('galaxyline.provider_vcs').diff_add()
        else
          vim.cmd('highlight link GalaxyLeftGitDiffAdd GalaxyLeftGitDiffInactive')
          return '+0 '
        end
      end
    }
  },
  {
    LeftGitDiffModified= {
      condition = require("galaxyline.condition").check_git_workspace,
      provider = function()
        if require('galaxyline.provider_vcs').diff_modified() then
          vim.cmd('highlight link GalaxyLeftGitDiffModified GalaxyLeftGitDiffModifiedActive')
          return '~' .. require('galaxyline.provider_vcs').diff_modified()
        else
          vim.cmd('highlight link GalaxyLeftGitDiffModified GalaxyLeftGitDiffInactive')
          return '~0 '
        end
      end
    }
  },
  {
    LeftGitDiffRemove = {
      condition = require("galaxyline.condition").check_git_workspace,
      provider = function()
        if require('galaxyline.provider_vcs').diff_remove() then
          vim.cmd('highlight link GalaxyLeftGitDiffRemove GalaxyLeftGitDiffRemoveActive')
          return '-' .. require('galaxyline.provider_vcs').diff_remove()
        else
          vim.cmd('highlight link GalaxyLeftGitDiffRemove GalaxyLeftGitDiffInactive')
          return '-0 '
        end
      end
    }
  },
}

require ('galaxyline').section.mid = {
  {
    MidFileStatus = {
      provider = function()
        if vim.bo.modified then
          vim.cmd('highlight link GalaxyMidFileStatus GalaxyMidFileStatusModified')
        elseif not vim.bo.modifiable then
          vim.cmd('highlight link GalaxyMidFileStatus GalaxyMidFileStatusRestricted')
        elseif vim.bo.readonly then
          vim.cmd('highlight link GalaxyMidFileStatus GalaxyMidFileStatusReadonly')
        elseif not vim.bo.modified then
          vim.cmd('highlight link GalaxyMidFileStatus GalaxyMidFileStatusUnmodified')
        end

        if require('nvim-web-devicons').get_icon(vim.fn.expand('%:e')) then
          return require('nvim-web-devicons').get_icon(vim.fn.expand('%:e')) .. ' '
        elseif not vim.bo.modified then
          return ' '
        end
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon5'
    }
  },
  {
    MidFileName = {
      highlight = 'GalaxyMapperCommon5',
      provider = function()
        if #vim.fn.expand '%:p' == 0 then
          return '-'
        end
        if vim.fn.winwidth(0) > 150 then
          return vim.fn.expand '%:~'
        else
          return vim.fn.expand '%:t'
        end
      end
    }
  }
}

require ('galaxyline').section.right = {
  {
    RightLspError = {
      provider = function()
        if #vim.tbl_keys(vim.lsp.buf_get_clients()) <= 0 then
           return
        end

        if vim.lsp.diagnostic.get_count(0, 'Error') == 0 then
          vim.cmd('highlight link GalaxyRightLspError GalaxyLeftLspInactive')
        else
          vim.cmd('highlight link GalaxyRightLspError GalaxyRightLspErrorActive')
        end

        return '!' .. vim.lsp.diagnostic.get_count(0, 'Error') .. ' '
      end
    }
  },
  {
    RightLspWarning = {
      provider = function()
        if #vim.tbl_keys(vim.lsp.buf_get_clients()) <= 0 then
           return
        end

        if vim.lsp.diagnostic.get_count(0, 'Warning') == 0 then
          vim.cmd('highlight link GalaxyRightLspWarning GalaxyLeftLspInactive')
        else
          vim.cmd('highlight link GalaxyRightLspWarning GalaxyRightLspWarningActive')
        end

        return '?' .. vim.lsp.diagnostic.get_count(0, 'Warning') .. ' '
      end
    }
  },
  {
    RightLspInformation = {
      provider = function()
        if #vim.tbl_keys(vim.lsp.buf_get_clients()) <= 0 then
           return
        end

        if vim.lsp.diagnostic.get_count(0, 'Information') == 0 then
          vim.cmd('highlight link GalaxyRightLspInformation GalaxyLeftLspInactive')
        else
          vim.cmd('highlight link GalaxyRightLspInformation GalaxyRightLspInformationActive')
        end

        return '+' .. vim.lsp.diagnostic.get_count(0, 'Information') .. ' '
      end
    }
  },
  {
    RightLspHint = {
      provider = function()
        if #vim.tbl_keys(vim.lsp.buf_get_clients()) <= 0 then
           return
        end

        if vim.lsp.diagnostic.get_count(0, 'Hint') == 0 then
          vim.cmd('highlight link GalaxyRightLspHint GalaxyLeftLspInactive')
        else
          vim.cmd('highlight link GalaxyRightLspHint GalaxyRightLspHintActive')
        end

        return '-' .. vim.lsp.diagnostic.get_count(0, 'Hint') .. ' '
      end
    }
  },
  {
    RightLspHintSeparator = {
      highlight = 'GalaxyMapperCommon1',
      provider = function()
        return ''
      end,
    }
  },
  {
    RightLspClient = {
      highlight = 'GalaxyMapperCommon4',
      provider = function()
        if #vim.tbl_keys(vim.lsp.buf_get_clients()) >= 1 then
          local lsp_client_name_first = vim.lsp.get_client_by_id(tonumber(vim.inspect(vim.tbl_keys(vim.lsp.buf_get_clients())):match('%d+'))).name:match('%l+')

          if lsp_client_name_first == nil then
            return #vim.tbl_keys(vim.lsp.buf_get_clients()) .. ': '
          else
            return #vim.tbl_keys(vim.lsp.buf_get_clients()) .. ':' .. lsp_client_name_first .. ' '
          end
        else
          return ' '
        end
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon4'
    }
  },
  {
    RightLspClientSeparator = {
      highlight = 'GalaxyMapperCommon4',
      provider = function()
        return ''
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon4'
    }
  },
  {
    RightFileSize = {
      highlight = 'GalaxyMapperCommon4',
      provider = 'FileSize',
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon4'
    }
  },
  {
    RightTabStop = {
      highlight = 'GalaxyMapperCommon4',
      provider = function()
        return string.format('%s', vim.bo.tabstop) .. ':'
      end,
    }
  },
  {
    RightFileType = {
      provider = function()
        if vim.bo.fileencoding == 'utf-8' then
          vim.cmd('highlight link GalaxyRightFileType GalaxyMapperCommon4')
        else
          vim.cmd('highlight link GalaxyRightFileType GalaxyMapperCommon8')
        end

        return string.format('%s', vim.bo.filetype)
      end,
    }
  },
  {
    RightFileEncoding = {
      highlight = 'GalaxyMapperCommon4',
      provider = function()
        local icons = {
          dos = '',
          mac  = '',
          unix = ''
        }
        if icons[vim.bo.fileformat] then
          return icons[vim.bo.fileformat]
        else
          return ''
        end
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon4'
    }
  },
  {
    RightFileEncodingSeparator = {
      highlight = 'GalaxyMapperCommon7',
      provider = function()
        return ''
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon7'
    }
  },
  {
    RightPositionNumerical = {
      highlight = 'GalaxyMapperCommon2',
      provider = function()
        return string.format('%s:%s  ', vim.fn.line('.'), vim.fn.col('.'))
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon2'
    }
  },
  {
    RightPositionPercentage = {
      highlight = 'GalaxyMapperCommon2',
      provider = function ()
        local percent = math.floor(100 * vim.fn.line('.') / vim.fn.line('$'))
        return string.format('%s%s ☰', percent, '%')
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon2'
    }
  },
  {
    RightPositionSeparator = {
      highlight = 'GalaxyMapperCommon2',
      provider = function()
        return '  '
      end
    }
  }
}

require ('galaxyline').section.short_line_left = {
  {
    ShortLineLeftBufferType = {
      highlight = 'GalaxyMapperCommon2',
      provider = function ()
        local BufferTypeMap = {
          ['Mundo'] = 'Mundo History',
          ['MundoDiff'] = 'Mundo Diff',
          ['NvimTree'] = 'Nvim Tree',
          ['fugitive'] = 'Fugitive',
          ['fugitiveblame'] = 'Fugitive Blame',
          ['help'] = 'Help',
          ['minimap'] = 'Minimap',
          ['qf'] = 'Quick Fix',
          ['tabman'] = 'Tab Manager',
          ['tagbar'] = 'Tagbar',
          ['toggleterm'] = 'Terminal'
        }
        local name = BufferTypeMap[vim.bo.filetype] or 'Editor'
        return string.format('  %s ', name)
      end,
      separator = ' ',
      separator_highlight = 'GalaxyMapperCommon7'
    }
  },
  {
    ShortLineLeftWindowNumber = {
      highlight = 'GalaxyMapperCommon6',
      provider = function()
        return '  ' .. vim.api.nvim_win_get_number(vim.api.nvim_get_current_win()) .. ' '
      end,
      separator = '',
      separator_highlight = 'GalaxyMapperCommon1'
    }
  }
}

require ('galaxyline').section.short_line_right = {
  {
    ShortLineRightBlank = {
      highlight = 'GalaxyMapperCommon6',
      provider = function()
        if vim.bo.filetype == 'toggleterm' then
          return ' ' .. vim.api.nvim_buf_get_var(0, 'toggle_number') .. ' '
        else
          return '  '
        end
      end,
      separator = '',
      separator_highlight = 'GalaxyMapperCommon1'
    }
  },
  {
    ShortLineRightInformational = {
      highlight = 'GalaxyMapperCommon2',
      provider = function()
        return ' Neovim '
      end,
      separator = '',
      separator_highlight = 'GalaxyMapperCommon7'
    }
  }
}
file :: ~/.config/nvim/lua/nvim-solarized-lua.lua :: loaded via tjdevries/astronauta.nvim

plugin :: https://github.com/ishan9299/nvim-solarized-lua call :: _G.self_color_solarized_dark() call :: _G.self_color_solarized_light()

function _G.self_color_solarized_dark()
  vim.g.solarized_italics = 1

  vim.cmd('set background=dark')
  vim.cmd('colorscheme solarized')

  vim.cmd('highlight StatusLine                                                                                guifg=#073642')

  vim.cmd('highlight GalaxyLeftGitDiffAddActive                                                                guibg=#073642 guifg=#00aa00')
  vim.cmd('highlight GalaxyLeftGitDiffInactive                                                                 guibg=#073642 guifg=#93a1a1')
  vim.cmd('highlight GalaxyLeftGitDiffModifiedActive                                                           guibg=#073642 guifg=#ffa003')
  vim.cmd('highlight GalaxyLeftGitDiffRemoveActive                                                             guibg=#073642 guifg=#dc322f')
  vim.cmd('highlight GalaxyLeftLspInactive                                                                     guibg=#073642 guifg=#93a1a1')
  vim.cmd('highlight GalaxyMapperCommon1                                                                       guibg=#073642 guifg=#657b83')
  vim.cmd('highlight GalaxyMapperCommon2                                                                       guibg=#93a1a1 guifg=#002b36')
  vim.cmd('highlight GalaxyMapperCommon3                                                                       guibg=#073642 guifg=#93a1a1')
  vim.cmd('highlight GalaxyMapperCommon4                                                                       guibg=#657b83 guifg=#002b36')
  vim.cmd('highlight GalaxyMapperCommon5                                                                       guibg=#073642 guifg=#93a1a1')
  vim.cmd('highlight GalaxyMapperCommon6                                                                       guibg=#657b83 guifg=#002b36')
  vim.cmd('highlight GalaxyMapperCommon7                                                                       guibg=#657b83 guifg=#93a1a1')
  vim.cmd('highlight GalaxyMapperCommon8                                                                       guibg=#657b83 guifg=#91a6ba')
  vim.cmd('highlight GalaxyMidFileStatusModified                                                               guibg=#073642 guifg=#00aa00')
  vim.cmd('highlight GalaxyMidFileStatusReadonly                                                               guibg=#073642 guifg=#ffa003')
  vim.cmd('highlight GalaxyMidFileStatusRestricted                                                             guibg=#073642 guifg=#dc322f')
  vim.cmd('highlight GalaxyMidFileStatusUnmodified                                                             guibg=#073642 guifg=#93a1a1')
  vim.cmd('highlight GalaxyRightLspErrorActive                                                                 guibg=#073642 guifg=#dc322f')
  vim.cmd('highlight GalaxyRightLspHintActive                                                                  guibg=#073642 guifg=#00aa00')
  vim.cmd('highlight GalaxyRightLspInformationActive                                                           guibg=#073642 guifg=#258bd2')
  vim.cmd('highlight GalaxyRightLspWarningActive                                                               guibg=#073642 guifg=#ffa003')
  vim.cmd('highlight GalaxyViModeCommandInverted                                                               guibg=#657b83 guifg=#258bd2')
  vim.cmd('highlight GalaxyViModeCommandUnturned                                                               guibg=#258bd2 guifg=#002b36')
  vim.cmd('highlight GalaxyViModeCommonVisualInverted                                                          guibg=#657b83 guifg=#d43681')
  vim.cmd('highlight GalaxyViModeCommonVisualUnturned                                                          guibg=#d43681 guifg=#002b36')
  vim.cmd('highlight GalaxyViModeEmptyInverted                                                                 guibg=#657b83 guifg=#93a1a1')
  vim.cmd('highlight GalaxyViModeEmptyUnturned                                                                 guibg=#93a1a1 guifg=#002b36')
  vim.cmd('highlight GalaxyViModeInsertInverted                                                                guibg=#657b83 guifg=#859a00')
  vim.cmd('highlight GalaxyViModeInsertUnturned                                                                guibg=#859a00 guifg=#002b36')
  vim.cmd('highlight GalaxyViModeNormalInverted                                                                guibg=#657b83 guifg=#93a1a1')
  vim.cmd('highlight GalaxyViModeNormalUnturned                                                                guibg=#93a1a1 guifg=#002b36')
  vim.cmd('highlight GalaxyViModeReplaceInverted                                                               guibg=#657b83 guifg=#dc322f')
  vim.cmd('highlight GalaxyViModeReplaceUnturned                                                               guibg=#dc322f guifg=#002b36')
  vim.cmd('highlight GalaxyViModeShellInverted                                                                 guibg=#657b83 guifg=#2aa198')
  vim.cmd('highlight GalaxyViModeShellUnturned                                                                 guibg=#2aa198 guifg=#002b36')
  vim.cmd('highlight GalaxyViModeTerminalInverted                                                              guibg=#657b83 guifg=#2aa198')
  vim.cmd('highlight GalaxyViModeTerminalUnturned                                                              guibg=#2aa198 guifg=#002b36')
end

function _G.self_color_solarized_light()
  vim.g.solarized_italics = 1

  vim.cmd('set background=light')
  vim.cmd('colorscheme solarized')

  vim.cmd('highlight StatusLine                                                                                              guifg=#eee8d5')

  vim.cmd('highlight GalaxyLeftGitDiffAddActive                                                                guibg=#eee8d5 guifg=#28a228')
  vim.cmd('highlight GalaxyLeftGitDiffInactive                                                                 guibg=#eee8d5 guifg=#586e75')
  vim.cmd('highlight GalaxyLeftGitDiffModifiedActive                                                           guibg=#eee8d5 guifg=#b8860b')
  vim.cmd('highlight GalaxyLeftGitDiffRemoveActive                                                             guibg=#eee8d5 guifg=#dc143c')
  vim.cmd('highlight GalaxyLeftLspInactive                                                                     guibg=#eee8d5 guifg=#586e75')
  vim.cmd('highlight GalaxyMapperCommon1                                                                       guibg=#eee8d5 guifg=#ded8c7')
  vim.cmd('highlight GalaxyMapperCommon2                                                                       guibg=#cac4b5 guifg=#586e75')
  vim.cmd('highlight GalaxyMapperCommon3                                                                       guibg=#eee8d5 guifg=#93a1a1')
  vim.cmd('highlight GalaxyMapperCommon4                                                                       guibg=#ded8c7 guifg=#586e75')
  vim.cmd('highlight GalaxyMapperCommon5                                                                       guibg=#eee8d5 guifg=#586e75')
  vim.cmd('highlight GalaxyMapperCommon6                                                                       guibg=#ded8c7 guifg=#586e75')
  vim.cmd('highlight GalaxyMapperCommon7                                                                       guibg=#ded8c7 guifg=#cac4b5')
  vim.cmd('highlight GalaxyMapperCommon8                                                                       guibg=#ded8c7 guifg=#fefefe')
  vim.cmd('highlight GalaxyMidFileStatusModified                                                               guibg=#eee8d5 guifg=#28a228')
  vim.cmd('highlight GalaxyMidFileStatusReadonly                                                               guibg=#eee8d5 guifg=#b8860b')
  vim.cmd('highlight GalaxyMidFileStatusRestricted                                                             guibg=#eee8d5 guifg=#dc143c')
  vim.cmd('highlight GalaxyMidFileStatusUnmodified                                                             guibg=#eee8d5 guifg=#586e75')
  vim.cmd('highlight GalaxyRightLspErrorActive                                                                 guibg=#eee8d5 guifg=#dc143c')
  vim.cmd('highlight GalaxyRightLspHintActive                                                                  guibg=#eee8d5 guifg=#28a228')
  vim.cmd('highlight GalaxyRightLspInformationActive                                                           guibg=#eee8d5 guifg=#258bd2')
  vim.cmd('highlight GalaxyRightLspWarningActive                                                               guibg=#eee8d5 guifg=#b8860b')
  vim.cmd('highlight GalaxyViModeCommandInverted                                                               guibg=#ded8c7 guifg=#258bd2')
  vim.cmd('highlight GalaxyViModeCommandUnturned                                                               guibg=#258bd2 guifg=#ded8c7')
  vim.cmd('highlight GalaxyViModeCommonVisualInverted                                                          guibg=#ded8c7 guifg=#d43681')
  vim.cmd('highlight GalaxyViModeCommonVisualUnturned                                                          guibg=#d43681 guifg=#ded8c7')
  vim.cmd('highlight GalaxyViModeEmptyInverted                                                                 guibg=#ded8c7 guifg=#cac4b5')
  vim.cmd('highlight GalaxyViModeEmptyUnturned                                                                 guibg=#cac4b5 guifg=#ded8c7')
  vim.cmd('highlight GalaxyViModeInsertInverted                                                                guibg=#ded8c7 guifg=#859a00')
  vim.cmd('highlight GalaxyViModeInsertUnturned                                                                guibg=#859a00 guifg=#ded8c7')
  vim.cmd('highlight GalaxyViModeNormalInverted                                                                guibg=#ded8c7 guifg=#cac4b5')
  vim.cmd('highlight GalaxyViModeNormalUnturned                                                                guibg=#cac4b5 guifg=#586e75')
  vim.cmd('highlight GalaxyViModeReplaceInverted                                                               guibg=#ded8c7 guifg=#dc143c')
  vim.cmd('highlight GalaxyViModeReplaceUnturned                                                               guibg=#dc143c guifg=#ded8c7')
  vim.cmd('highlight GalaxyViModeShellInverted                                                                 guibg=#ded8c7 guifg=#2aa198')
  vim.cmd('highlight GalaxyViModeShellUnturned                                                                 guibg=#2aa198 guifg=#ded8c7')
  vim.cmd('highlight GalaxyViModeTerminalInverted                                                              guibg=#ded8c7 guifg=#2aa198')
  vim.cmd('highlight GalaxyViModeTerminalUnturned                                                              guibg=#2aa198 guifg=#ded8c7')
end
file :: ~/.config/nvim/lua/gruvbox-nvim.lua :: loaded via tjdevries/astronauta.nvim

plugin :: https://github.com/npxbr/gruvbox.nvim call :: _G.self_color_gruvbox_dark() call :: _G.self_color_gruvbox_light()

function _G.self_color_gruvbox_dark()
  vim.g.gruvbox_invert_selection = 0
  vim.g.gruvbox_italic = 1
  vim.g.gruvbox_sign_column = 'bg0'

  vim.cmd('set background=dark')
  vim.cmd('colorscheme gruvbox')

  vim.cmd('highlight StatusLine                                                                                                guifg=#3c3836')

  vim.cmd('highlight GalaxyLeftGitDiffAddActive                                                                  guibg=#3c3836 guifg=#27b31a')
  vim.cmd('highlight GalaxyLeftGitDiffInactive                                                                   guibg=#3c3836 guifg=#ebdbb2')
  vim.cmd('highlight GalaxyLeftGitDiffModifiedActive                                                             guibg=#3c3836 guifg=#fe811b')
  vim.cmd('highlight GalaxyLeftGitDiffRemoveActive                                                               guibg=#3c3836 guifg=#fb4632')
  vim.cmd('highlight GalaxyLeftLspInactive                                                                       guibg=#3c3836 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyMapperCommon1                                                                         guibg=#3c3836 guifg=#504945')
  vim.cmd('highlight GalaxyMapperCommon2                                                                         guibg=#bdae93 guifg=#504945')
  vim.cmd('highlight GalaxyMapperCommon3                                                                         guibg=#3c3836 guifg=#ebdbb2')
  vim.cmd('highlight GalaxyMapperCommon4                                                                         guibg=#504945 guifg=#ebdbb2')
  vim.cmd('highlight GalaxyMapperCommon5                                                                         guibg=#3c3836 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyMapperCommon6                                                                         guibg=#504945 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyMapperCommon7                                                                         guibg=#504945 guifg=#bdae93')
  vim.cmd('highlight GalaxyMapperCommon8                                                                         guibg=#504945 guifg=#91a6ba')
  vim.cmd('highlight GalaxyMidFileStatusModified                                                                 guibg=#3c3836 guifg=#8ec07c')
  vim.cmd('highlight GalaxyMidFileStatusReadonly                                                                 guibg=#3c3836 guifg=#fe811b')
  vim.cmd('highlight GalaxyMidFileStatusRestricted                                                               guibg=#3c3836 guifg=#fb4632')
  vim.cmd('highlight GalaxyMidFileStatusUnmodified                                                               guibg=#3c3836 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyRightLspErrorActive                                                                   guibg=#3c3836 guifg=#fb4632')
  vim.cmd('highlight GalaxyRightLspHintActive                                                                    guibg=#3c3836 guifg=#27b31a')
  vim.cmd('highlight GalaxyRightLspInformationActive                                                             guibg=#3c3836 guifg=#127fff')
  vim.cmd('highlight GalaxyRightLspWarningActive                                                                 guibg=#3c3836 guifg=#fe811b')
  vim.cmd('highlight GalaxyViModeCommandInverted                                                                 guibg=#504945 guifg=#fabd2f')
  vim.cmd('highlight GalaxyViModeCommandUnturned                                                                 guibg=#fabd2f guifg=#3c3836')
  vim.cmd('highlight GalaxyViModeCommonVisualInverted                                                            guibg=#504945 guifg=#fe811b')
  vim.cmd('highlight GalaxyViModeCommonVisualUnturned                                                            guibg=#fe811b guifg=#3c3836')
  vim.cmd('highlight GalaxyViModeEmptyInverted                                                                   guibg=#504945 guifg=#bdae93')
  vim.cmd('highlight GalaxyViModeEmptyUnturned                                                                   guibg=#bdae93 guifg=#3c3836')
  vim.cmd('highlight GalaxyViModeInsertInverted                                                                  guibg=#504945 guifg=#83a598')
  vim.cmd('highlight GalaxyViModeInsertUnturned                                                                  guibg=#83a598 guifg=#3c3836')
  vim.cmd('highlight GalaxyViModeNormalInverted                                                                  guibg=#504945 guifg=#bdae93')
  vim.cmd('highlight GalaxyViModeNormalUnturned                                                                  guibg=#bdae93 guifg=#3c3836')
  vim.cmd('highlight GalaxyViModeReplaceInverted                                                                 guibg=#504945 guifg=#8ec07c')
  vim.cmd('highlight GalaxyViModeReplaceUnturned                                                                 guibg=#8ec07c guifg=#3c3836')
  vim.cmd('highlight GalaxyViModeShellInverted                                                                   guibg=#504945 guifg=#d3869b')
  vim.cmd('highlight GalaxyViModeShellUnturned                                                                   guibg=#d3869b guifg=#3c3836')
  vim.cmd('highlight GalaxyViModeTerminalInverted                                                                guibg=#504945 guifg=#d3869b')
  vim.cmd('highlight GalaxyViModeTerminalUnturned                                                                guibg=#d3869b guifg=#3c3836')
end

function _G.self_color_gruvbox_light()
  vim.g.gruvbox_contrast_light = 'medium'
  vim.g.gruvbox_invert_selection = 0
  vim.g.gruvbox_italic = 1
  vim.g.gruvbox_sign_column = 'bg0'

  vim.cmd('set background=light')
  vim.cmd('colorscheme gruvbox')

  vim.cmd('highlight StatusLine                                                                                                guifg=#ebdbb2')

  vim.cmd('highlight GalaxyLeftGitDiffAddActive                                                                  guibg=#ebdbb2 guifg=#27b31a')
  vim.cmd('highlight GalaxyLeftGitDiffInactive                                                                   guibg=#ebdbb2 guifg=#7c6f64')
  vim.cmd('highlight GalaxyLeftGitDiffModifiedActive                                                             guibg=#ebdbb2 guifg=#dc7f27')
  vim.cmd('highlight GalaxyLeftGitDiffRemoveActive                                                               guibg=#ebdbb2 guifg=#d83a03')
  vim.cmd('highlight GalaxyLeftLspInactive                                                                       guibg=#ebdbb2 guifg=#7c6f64')
  vim.cmd('highlight GalaxyMapperCommon1                                                                         guibg=#ebdbb2 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyMapperCommon2                                                                         guibg=#bdae93 guifg=#7c6f64')
  vim.cmd('highlight GalaxyMapperCommon3                                                                         guibg=#ebdbb2 guifg=#7c6f64')
  vim.cmd('highlight GalaxyMapperCommon4                                                                         guibg=#d5c4a1 guifg=#7c6f64')
  vim.cmd('highlight GalaxyMapperCommon5                                                                         guibg=#ebdbb2 guifg=#7c6f64')
  vim.cmd('highlight GalaxyMapperCommon6                                                                         guibg=#d5c4a1 guifg=#7c6f64')
  vim.cmd('highlight GalaxyMapperCommon7                                                                         guibg=#d5c4a1 guifg=#bdae93')
  vim.cmd('highlight GalaxyMapperCommon8                                                                         guibg=#d5c4a1 guifg=#fbf0c9')
  vim.cmd('highlight GalaxyMidFileStatusModified                                                                 guibg=#ebdbb2 guifg=#27b31a')
  vim.cmd('highlight GalaxyMidFileStatusReadonly                                                                 guibg=#ebdbb2 guifg=#dc7f27')
  vim.cmd('highlight GalaxyMidFileStatusRestricted                                                               guibg=#ebdbb2 guifg=#d83a03')
  vim.cmd('highlight GalaxyMidFileStatusUnmodified                                                               guibg=#ebdbb2 guifg=#7c6f64')
  vim.cmd('highlight GalaxyRightLspErrorActive                                                                   guibg=#ebdbb2 guifg=#d83a03')
  vim.cmd('highlight GalaxyRightLspHintActive                                                                    guibg=#ebdbb2 guifg=#27b31a')
  vim.cmd('highlight GalaxyRightLspInformationActive                                                             guibg=#ebdbb2 guifg=#127efc')
  vim.cmd('highlight GalaxyRightLspWarningActive                                                                 guibg=#ebdbb2 guifg=#dc7f27')
  vim.cmd('highlight GalaxyViModeCommandInverted                                                                 guibg=#d5c4a1 guifg=#dc7f27')
  vim.cmd('highlight GalaxyViModeCommandUnturned                                                                 guibg=#dc7f27 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyViModeCommonVisualInverted                                                            guibg=#d5c4a1 guifg=#ad3b14')
  vim.cmd('highlight GalaxyViModeCommonVisualUnturned                                                            guibg=#ad3b14 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyViModeEmptyInverted                                                                   guibg=#d5c4a1 guifg=#bdae93')
  vim.cmd('highlight GalaxyViModeEmptyUnturned                                                                   guibg=#bdae93 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyViModeInsertInverted                                                                  guibg=#d5c4a1 guifg=#076678')
  vim.cmd('highlight GalaxyViModeInsertUnturned                                                                  guibg=#076678 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyViModeNormalInverted                                                                  guibg=#d5c4a1 guifg=#bdae93')
  vim.cmd('highlight GalaxyViModeNormalUnturned                                                                  guibg=#bdae93 guifg=#7c6f64')
  vim.cmd('highlight GalaxyViModeReplaceInverted                                                                 guibg=#d5c4a1 guifg=#447a59')
  vim.cmd('highlight GalaxyViModeReplaceUnturned                                                                 guibg=#447a59 guifg=#d5c4a1')
  vim.cmd('highlight GalaxyViModeShellInverted                                                                   guibg=#d5c4a1 guifg=#d3869b')
  vim.cmd('highlight GalaxyViModeShellUnturned                                                                   guibg=#d3869b guifg=#d5c4a1')
  vim.cmd('highlight GalaxyViModeTerminalInverted                                                                guibg=#d5c4a1 guifg=#d3869b')
  vim.cmd('highlight GalaxyViModeTerminalUnturned                                                                guibg=#d3869b guifg=#d5c4a1')
end
file :: ~/.config/nvim/lua/theming.lua :: loaded via tjdevries/astronauta.nvim
_G.self_color_solarized_dark()
examples :: indicators
  • paste mode indicator-paste-mode
  • spelling check indicator-spelling-check
  • trailing whitespace indicator-trailing-whitespace
  • mixed indent indicator-mixed-indent
  • file modified indicator-file-modified
  • file not modifiable indicator-file-not-modifiable
  • file readonly indicator-file-readonly
  • buffer not utf-8 encoded indicator-not-utf-8
examples :: clear :: no git + no lsp

clear-solarized-dark clear-solarized-light clear-gruvbox-dark clear-gruvbox-light

examples :: modes :: solarized-dark

mode-solarized-dark-command mode-solarized-dark-insert mode-solarized-dark-replace mode-solarized-dark-terminal mode-solarized-dark-visual-block

examples :: modes :: solarized-light

mode-solarized-light-command mode-solarized-light-insert mode-solarized-light-replace mode-solarized-light-terminal mode-solarized-light-visual-block

examples :: modes :: gruvbox-dark

mode-gruvbox-dark-command mode-gruvbox-dark-insert mode-gruvbox-dark-replace mode-gruvbox-dark-terminal mode-gruvbox-dark-visual-block

examples :: modes :: gruvbox-light

mode-gruvbox-light-command mode-gruvbox-light-insert mode-gruvbox-light-replace mode-gruvbox-light-terminal mode-gruvbox-light-visual-block

lcrockett avatar May 25 '21 14:05 lcrockett

@lcrockett looks nice, but to be honest I have no idea how to use this?

lanox avatar May 26 '21 05:05 lanox

@lcrockett looks nice, but to be honest I have no idea how to use this?

@lanox see below

  1. ensure you'll have the plugin tjdevries/astronauta.nvim loaded and the other colorscheme plugins as listed under the details of my post
  2. copy the content of the files to the locations as depicted with file ::

Or you can simply copy the content of the files and reference them in your own init.lua. Whichever way you'd prefer.

lcrockett avatar May 26 '21 13:05 lcrockett

Normal file

With lsp

in startify

Also can I hide the bottom region , the one below galaxyline? (Using nvim nightly)

RaZ0rr-Two avatar May 27 '21 11:05 RaZ0rr-Two

The fastest and easiest customize status line plugin. Thanks author and everyone for show cases

image

image

image

Code

Page not found bro

mngshm avatar Jun 08 '21 09:06 mngshm

Page not found bro

Just click on his username and browse his dotfiles repo for 'galaxyline' or 'statusline' config.

RaZ0rr-Two avatar Jun 09 '21 06:06 RaZ0rr-Two

Minimalistic, lightline inspired 😊

image image image

Code

bartoszmaka avatar Jun 09 '21 11:06 bartoszmaka

图片

https://github.com/Avimitin/nerd-galaxyline

Easy to use with vim-plug.

Avimitin avatar Jun 17 '21 12:06 Avimitin

2021-07-01-003629_1345x29_scrot 2021-07-01-004100_1345x27_scrot 2021-07-01-004334_1344x26_scrot

krivahtoo avatar Jun 30 '21 21:06 krivahtoo

@skbolton CTRL-V is '\22', CTRL-S is '\19'

Xuyuanp avatar Jul 08 '21 03:07 Xuyuanp

Nice @xuyuanp. I ended up solving this by typing Ctrl-v Ctrl-v into the input and vim recognized the chars correctly. I might try swiching to '\22' though because its way clearer.

skbolton avatar Jul 08 '21 04:07 skbolton

Thanks, @yamatsum for the cool icons and @vuki656 for the timing code.

Code

vinodnimbalkar avatar Jul 08 '21 18:07 vinodnimbalkar

neonline

This is neonline, my take on a galaxyline similar to Spacemac's that also works well with tokyonight.

Groctel avatar Jul 09 '21 13:07 Groctel