mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
fitur baru custom lualine style
This commit is contained in:
parent
1c107be959
commit
06995762e0
3 changed files with 49 additions and 13 deletions
|
@ -47,12 +47,44 @@ local diff = {
|
|||
cond = hide_in_width,
|
||||
}
|
||||
|
||||
-- for config style
|
||||
local component_separators = { left = "", right = "" }
|
||||
local section_separators = { left = "", right = "" }
|
||||
local icon_mode = ""
|
||||
local sts_mode = 0
|
||||
|
||||
local data_exists, custom_ui = pcall(require, "custom.ui")
|
||||
if data_exists then
|
||||
if type(custom_ui) == "table" then
|
||||
if custom_ui.lualine_style == 1 then
|
||||
component_separators = { left = "", right = "" }
|
||||
section_separators = { left = "", right = "" }
|
||||
elseif custom_ui.lualine_style == 2 then
|
||||
component_separators = { left = "", right = "" }
|
||||
section_separators = { left = " ", right = " " }
|
||||
elseif custom_ui.lualine_style == 3 then
|
||||
component_separators = { left = "", right = "" }
|
||||
section_separators = { left = "", right = "" }
|
||||
end
|
||||
|
||||
if custom_ui.status_icon == 1 then
|
||||
icon_mode = " "
|
||||
sts_mode = 1
|
||||
elseif custom_ui.status_icon == 2 then
|
||||
icon_mode = " "
|
||||
sts_mode = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local mode = {
|
||||
"mode",
|
||||
fmt = function(str)
|
||||
return "--" .. str .. "--"
|
||||
-- return " " .. str
|
||||
-- return " " .. str
|
||||
if sts_mode == 0 then
|
||||
return "--" .. str .. "--"
|
||||
else
|
||||
return icon_mode .. str
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
|
@ -180,15 +212,8 @@ lualine.setup({
|
|||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "auto",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
-- component_separators = { left = "", right = "" },
|
||||
-- section_separators = { left = "", right = "" },
|
||||
-- component_separators = { left = "", right = "" },
|
||||
-- section_separators = { left = " ", right = " " },
|
||||
-- component_separators = { left = "", right = "" },
|
||||
-- section_separators = { left = "", right = "" },
|
||||
|
||||
component_separators = component_separators,
|
||||
section_separators = section_separators,
|
||||
disabled_filetypes = {
|
||||
"TelescopePrompt",
|
||||
"packer",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue