mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2024-12-13 05:20:38 +00:00
fix statusline bug, handle all Vim modes
This commit is contained in:
parent
bce7e624e2
commit
a3dbef5872
1 changed files with 21 additions and 11 deletions
|
@ -216,20 +216,30 @@ gls.right[3] = {
|
|||
}
|
||||
|
||||
local mode_colors = {
|
||||
[110] = { "NORMAL", colors.red },
|
||||
[105] = { "INSERT", colors.dark_purple },
|
||||
[99] = { "COMMAND", colors.pink },
|
||||
[116] = { "TERMINAL", colors.green },
|
||||
[118] = { "VISUAL", colors.cyan },
|
||||
[22] = { "V-BLOCK", colors.cyan },
|
||||
[86] = { "V_LINE", colors.cyan },
|
||||
[82] = { "REPLACE", colors.orange },
|
||||
[115] = { "SELECT", colors.nord_blue },
|
||||
[83] = { "S-LINE", colors.nord_blue },
|
||||
['n'] = { "NORMAL", colors.red },
|
||||
['no'] = { "N-PENDING", colors.red },
|
||||
['i'] = { "INSERT", colors.dark_purple },
|
||||
['ic'] = { "INSERT", colors.dark_purple },
|
||||
['t'] = { "TERMINAL", colors.green },
|
||||
['v'] = { "VISUAL", colors.cyan },
|
||||
['V'] = { "V-LINE", colors.cyan },
|
||||
[''] = { "V-BLOCK", colors.cyan },
|
||||
['R'] = { "REPLACE", colors.orange },
|
||||
['Rv'] = { "V-REPLACE", colors.orange },
|
||||
['s'] = { "SELECT", colors.nord_blue },
|
||||
['S'] = { "S-LINE", colors.nord_blue },
|
||||
[''] = { "S-BLOCK", colors.nord_blue },
|
||||
['c'] = { "COMMAND", colors.pink },
|
||||
['cv'] = { "COMMAND", colors.pink },
|
||||
['ce'] = { "COMMAND", colors.pink },
|
||||
['r'] = { "PROMPT", colors.teal },
|
||||
['rm'] = { "MORE", colors.teal },
|
||||
['r?'] = { "CONFIRM", colors.teal },
|
||||
['!'] = { "SHELL", colors.green },
|
||||
}
|
||||
|
||||
local mode = function(n)
|
||||
return mode_colors[vim.fn.mode():byte()][n]
|
||||
return mode_colors[vim.fn.mode()][n]
|
||||
end
|
||||
|
||||
gls.right[4] = {
|
||||
|
|
Loading…
Reference in a new issue