mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-11-18 00:16:26 +00:00
Switch to newer lualine fork
This commit is contained in:
parent
8bc5c38067
commit
c4d688ef51
@ -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 {
|
||||
|
@ -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"},
|
||||
|
Loading…
Reference in New Issue
Block a user