summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-08 19:45:21 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-07-08 19:45:21 +0200
commit8c0ace95e67f76b900cacd8daa38faa1444cb3b9 (patch)
treefcd2e3fff9d1563f94b79d6babdbdb66e1702d1c
parenta16d066ac637ad82c2217ad1cced2e23bb6a5dc9 (diff)
Remove colors for ViMode, replace with text
-rw-r--r--.config/nvim/lua/cfg/galaxyline/init.lua40
1 files changed, 15 insertions, 25 deletions
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, {