.config/nvim/lua/kamu/plugins/lualine.lua aktualisiert
This commit is contained in:
@@ -1,42 +1,42 @@
|
||||
local palette = require("catppuccin.palettes.init").get_palette()
|
||||
|
||||
local mode_map = {
|
||||
['n'] = 'NORMAL',
|
||||
['no'] = 'O-PENDING',
|
||||
['nov'] = 'O-PENDING',
|
||||
['noV'] = 'O-PENDING',
|
||||
['n'] = 'NORMAL',
|
||||
['no'] = 'O-PENDING',
|
||||
['nov'] = 'O-PENDING',
|
||||
['noV'] = 'O-PENDING',
|
||||
['no\22'] = 'O-PENDING',
|
||||
['niI'] = 'NORMAL',
|
||||
['niR'] = 'NORMAL',
|
||||
['niV'] = 'NORMAL',
|
||||
['nt'] = 'NORMAL',
|
||||
['ntT'] = 'NORMAL',
|
||||
['v'] = 'VISUAL',
|
||||
['vs'] = 'VISUAL',
|
||||
['V'] = 'V-LINE',
|
||||
['Vs'] = 'V-LINE',
|
||||
['niI'] = 'NORMAL',
|
||||
['niR'] = 'NORMAL',
|
||||
['niV'] = 'NORMAL',
|
||||
['nt'] = 'NORMAL',
|
||||
['ntT'] = 'NORMAL',
|
||||
['v'] = 'VISUAL',
|
||||
['vs'] = 'VISUAL',
|
||||
['V'] = 'V-LINE',
|
||||
['Vs'] = 'V-LINE',
|
||||
['\22'] = 'V-BLOCK',
|
||||
['\22s'] = 'V-BLOCK',
|
||||
['s'] = 'SELECT',
|
||||
['S'] = 'S-LINE',
|
||||
['s'] = 'SELECT',
|
||||
['S'] = 'S-LINE',
|
||||
['\19'] = 'S-BLOCK',
|
||||
['i'] = 'INSERT',
|
||||
['ic'] = 'INSERT',
|
||||
['ix'] = 'INSERT',
|
||||
['R'] = 'REPLACE',
|
||||
['Rc'] = 'REPLACE',
|
||||
['Rx'] = 'REPLACE',
|
||||
['Rv'] = 'V-REPLACE',
|
||||
['Rvc'] = 'V-REPLACE',
|
||||
['Rvx'] = 'V-REPLACE',
|
||||
['c'] = 'COMMAND',
|
||||
['cv'] = 'EX',
|
||||
['ce'] = 'EX',
|
||||
['r'] = 'REPLACE',
|
||||
['rm'] = 'MORE',
|
||||
['r?'] = 'CONFIRM',
|
||||
['!'] = 'SHELL',
|
||||
['t'] = 'TERMINAL',
|
||||
['i'] = 'INSERT',
|
||||
['ic'] = 'INSERT',
|
||||
['ix'] = 'INSERT',
|
||||
['R'] = 'REPLACE',
|
||||
['Rc'] = 'REPLACE',
|
||||
['Rx'] = 'REPLACE',
|
||||
['Rv'] = 'V-REPLACE',
|
||||
['Rvc'] = 'V-REPLACE',
|
||||
['Rvx'] = 'V-REPLACE',
|
||||
['c'] = 'COMMAND',
|
||||
['cv'] = 'EX',
|
||||
['ce'] = 'EX',
|
||||
['r'] = 'REPLACE',
|
||||
['rm'] = 'MORE',
|
||||
['r?'] = 'CONFIRM',
|
||||
['!'] = 'SHELL',
|
||||
['t'] = 'TERMINAL',
|
||||
}
|
||||
|
||||
local mode2themeMap = {
|
||||
@@ -65,15 +65,15 @@ end
|
||||
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = {'kyazdani42/nvim-web-devicons', opt = true },
|
||||
dependencies = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = 'catppuccin',
|
||||
--fmt = string.lower,
|
||||
icons_enabled = true,
|
||||
component_separators = { left = '', right = ''},
|
||||
section_separators = { left = '', right = ''},
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {
|
||||
statusline = {},
|
||||
winbar = {},
|
||||
@@ -90,18 +90,18 @@ return {
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{
|
||||
'mode',
|
||||
color = function()
|
||||
if vim.fn.mode() == "n" then return { fg = palette.text, gui = "bold" } end
|
||||
return { fg = "#000000", gui = "bold" }
|
||||
end,
|
||||
-- fmt = function(str) return str:sub(1,1) end,
|
||||
}},
|
||||
'mode',
|
||||
color = function()
|
||||
if vim.fn.mode() == "n" then return { fg = palette.text, gui = "bold" } end
|
||||
return { fg = "#000000", gui = "bold" }
|
||||
end,
|
||||
-- fmt = function(str) return str:sub(1,1) end,
|
||||
} },
|
||||
lualine_b = {
|
||||
{
|
||||
'branch',
|
||||
color = { fg = "#FFF"},
|
||||
icon = {'', color = function() return { fg = getModeColor('a','bg') } end },
|
||||
color = { fg = "#FFF" },
|
||||
icon = { 'εéá', color = function() return { fg = getModeColor('a', 'bg') } end },
|
||||
},
|
||||
{
|
||||
'diff',
|
||||
@@ -109,52 +109,59 @@ return {
|
||||
-- custom color for each section of the component in format
|
||||
-- {fg = '#rrggbb', bg= '#rrggbb', gui='style'}
|
||||
-- or highlight group
|
||||
added = nil, -- {fg = '#rrggbb', bg= '#rrggbb', gui='style'}, -- changes diff's added color
|
||||
added = nil, -- {fg = '#rrggbb', bg= '#rrggbb', gui='style'}, -- changes diff's added color
|
||||
modified = { fg = "#FFFFFF" }, -- changes diff's modified color
|
||||
removed = nil, -- changes diff's removed color
|
||||
removed = nil, -- changes diff's removed color
|
||||
},
|
||||
},
|
||||
-- 'diagnostics'
|
||||
-- 'diagnostics'
|
||||
},
|
||||
lualine_c = {{
|
||||
lualine_c = { {
|
||||
'filename',
|
||||
on_click = function(nc, mb, mods)
|
||||
local tb = require("telescope.builtin")
|
||||
if mb == "l" then
|
||||
--vim.print(mods)
|
||||
local mod = mods:gsub("%s+", "")
|
||||
if mod == "c" then tb.find_files(); return end
|
||||
if mod == "a" then tb.buffers(); return end
|
||||
if mod == "c" then
|
||||
tb.find_files(); return
|
||||
end
|
||||
if mod == "a" then
|
||||
tb.buffers(); return
|
||||
end
|
||||
end
|
||||
--require("telescope.builtin").find_files()
|
||||
end,
|
||||
}},
|
||||
} },
|
||||
lualine_x = {
|
||||
-- {
|
||||
-- function()
|
||||
-- return getModeColor('a','bg')
|
||||
-- end
|
||||
-- },
|
||||
'encoding', 'fileformat', 'filetype'},
|
||||
-- print recording messages
|
||||
{
|
||||
require("noice").api.statusline.mode.get,
|
||||
cond = function()
|
||||
return require("noice").api.statusline.mode.has() and string.match(require("noice").api.statusline.mode.get(), '^recording @.$') ~= nil
|
||||
end,
|
||||
color = { fg = "#ff9e64" },
|
||||
},
|
||||
'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = {
|
||||
{
|
||||
'progress',
|
||||
color = { fg = "#FFFFFF"},
|
||||
color = { fg = "#FFFFFF" },
|
||||
}
|
||||
},
|
||||
lualine_z = {{
|
||||
lualine_z = { {
|
||||
'location',
|
||||
color = function(section)
|
||||
if vim.fn.mode() == "n" then return { fg = palette.text } end
|
||||
return { fg = "#000000", }
|
||||
end,
|
||||
}}
|
||||
} }
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = {'filename'},
|
||||
lualine_x = {'location'},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user