From 8c0ace95e67f76b900cacd8daa38faa1444cb3b9 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 8 Jul 2021 19:45:21 +0200 Subject: Remove colors for ViMode, replace with text --- .config/nvim/lua/cfg/galaxyline/init.lua | 40 ++++++++++++-------------------- 1 file changed, 15 insertions(+), 25 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/lua/cfg/galaxyline/init.lua b/.config/nvim/lua/cfg/galaxyline/init.lua index c59d4f4..c4bc5ef 100644 --- a/.config/nvim/lua/cfg/galaxyline/init.lua +++ b/.config/nvim/lua/cfg/galaxyline/init.lua @@ -9,6 +9,7 @@ end -- local colors = require('galaxyline.theme').default local colors = { bg = "#0A0A0A", + fg = "#D0D0D0", yellow = "#DCDCAA", dark_yellow = "#D7BA7D", cyan = "#4EC9B0", @@ -34,37 +35,26 @@ gl.short_line_list = { "NvimTree", "vista", "dbui", "packer" } table.insert(gls.left, { ViMode = { provider = function() - -- auto change color according the vim mode - local mode_color = { - n = colors.blue, - i = colors.green, - v = colors.purple, - [""] = colors.purple, - V = colors.purple, - c = colors.magenta, - no = colors.blue, - s = colors.orange, - S = colors.orange, - [""] = colors.orange, - ic = colors.yellow, - R = colors.red, - Rv = colors.red, - cv = colors.blue, - ce = colors.blue, - r = colors.cyan, - rm = colors.cyan, - ["r?"] = colors.cyan, - ["!"] = colors.blue, - t = colors.blue, + local alias = { + n = 'NORMAL', + i = 'INSERT', + c = 'COMMAND', + V = 'VISUAL', + [''] = 'VISUAL', + v = 'VISUAL', + R = 'REPLACE', } - vim.api.nvim_command("hi GalaxyViMode guifg=" .. mode_color[vim.fn.mode()]) - return "▊" + local alias_mode = alias[vim.fn.mode()] + if alias_mode == nil then + alias_mode = vim.fn.mode() + end + return alias_mode..' ' end, separator_highlight = "StatusLineSeparator", highlight = "StatusLineNC", }, }) --- print(vim.fn.getbufvar(0, 'ts')) + vim.fn.getbufvar(0, "ts") table.insert(gls.left, { -- cgit v1.2.3-70-g09d2