Switch to newer lualine fork

This commit is contained in:
ViViDboarder 2021-10-21 10:24:28 -07:00
parent 8bc5c38067
commit c4d688ef51
2 changed files with 14 additions and 34 deletions

View File

@ -85,7 +85,7 @@ return require('packer').startup(function()
}
--]]
use {
"hoob3rt/lualine.nvim",
"shadmansaleh/lualine.nvim",
config = function() require("plugins.lualine").config_lualine(vim.g.colors_name) end,
}
use {

View File

@ -8,27 +8,7 @@ function M.custom_ffenc()
return enc .. "[" .. format .. "]"
end
return nil
end
-- Use only single letters for mode names
function M.single_letter_mode()
local mode_map = {
['__'] = '-',
['n'] = 'N',
['i'] = 'I',
['R'] = 'R',
['c'] = 'C',
['v'] = 'V',
['V'] = 'V',
[''] = 'V',
['s'] = 'S',
['S'] = 'S',
[''] = 'S',
['t'] = 'T',
}
return mode_map[vim.fn.mode()]
return ""
end
function M.mixed_indent()
@ -42,7 +22,7 @@ function M.mixed_indent()
return "i:" .. require("math").max(tab_indent, space_indent)
end
return nil
return ""
end
function M.trailing_whitespace()
@ -51,7 +31,7 @@ function M.trailing_whitespace()
return "tw:" .. line
end
return nil
return ""
end
-- Configure lualine witha provided theme
@ -69,11 +49,11 @@ function M.config_lualine(theme_name)
options = {
theme = theme_name,
icons_enabled = false,
component_separators = {"|", "|"},
section_separators = {"", ""},
component_separators = {left = "|", right = "|"},
section_separators = {left = "", right = ""},
},
sections = {
lualine_a = { M.single_letter_mode },
lualine_a = {{"mode", fmt = function(str) return str:sub(1, 1) end}},
lualine_b = {"FugitiveHead", "diff"},
lualine_c = {"filename"},
lualine_x = {M.custom_ffenc, "filetype"},