mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-20 23:16:47 +00:00
init
This commit is contained in:
106
nvim/lua/config/lualine.lua
Normal file
106
nvim/lua/config/lualine.lua
Normal file
@@ -0,0 +1,106 @@
|
||||
require('lualine').setup({
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'auto',
|
||||
component_separators = { left = '', right = '' },
|
||||
section_separators = { left = '', right = '' },
|
||||
disabled_filetypes = {},
|
||||
always_divide_middle = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
||||
lualine_c = { 'filename', 'lsp_progress' },
|
||||
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_y = { 'progress' },
|
||||
lualine_z = { 'location' },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
})
|
||||
|
||||
local colors = {
|
||||
yellow = '#ECBE7B',
|
||||
cyan = '#008080',
|
||||
darkblue = '#081633',
|
||||
green = '#98be65',
|
||||
orange = '#FF8800',
|
||||
violet = '#a9a1e1',
|
||||
magenta = '#c678dd',
|
||||
blue = '#51afef',
|
||||
red = '#ec5f67',
|
||||
}
|
||||
|
||||
local config = {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = 'gruvbox',
|
||||
component_separators = { '', '' },
|
||||
section_separators = { '', '' },
|
||||
disabled_filetypes = {},
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { 'mode' },
|
||||
lualine_b = { 'filename' },
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = { 'encoding', 'fileformat', 'filetype' },
|
||||
lualine_z = { 'branch' },
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { 'filename' },
|
||||
lualine_x = { 'location' },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
}
|
||||
|
||||
-- Inserts a component in lualine_c at left section
|
||||
local function ins_left(component)
|
||||
table.insert(config.sections.lualine_c, component)
|
||||
end
|
||||
|
||||
-- Inserts a component in lualine_x ot right section
|
||||
local function ins_right(component)
|
||||
table.insert(config.sections.lualine_x, component)
|
||||
end
|
||||
|
||||
--ins_left {
|
||||
--'lsp_progress',
|
||||
--display_components = { 'lsp_client_name', { 'title', 'percentage', 'message' }},
|
||||
---- With spinner
|
||||
---- display_components = { 'lsp_client_name', 'spinner', { 'title', 'percentage', 'message' }},
|
||||
--colors = {
|
||||
--percentage = colors.cyan,
|
||||
--title = colors.cyan,
|
||||
--message = colors.cyan,
|
||||
--spinner = colors.cyan,
|
||||
--lsp_client_name = colors.magenta,
|
||||
--use = true,
|
||||
--},
|
||||
--separators = {
|
||||
--component = ' ',
|
||||
--progress = ' | ',
|
||||
--message = { pre = '(', post = ')'},
|
||||
--percentage = { pre = '', post = '%% ' },
|
||||
--title = { pre = '', post = ': ' },
|
||||
--lsp_client_name = { pre = '[', post = ']' },
|
||||
--spinner = { pre = '', post = '' },
|
||||
--message = { commenced = 'In Progress', completed = 'Completed' },
|
||||
--},
|
||||
--display_components = { 'lsp_client_name', 'spinner', { 'title', 'percentage', 'message' } },
|
||||
--timer = { progress_enddelay = 500, spinner = 1000, lsp_client_name_enddelay = 1000 },
|
||||
--spinner_symbols = { '🌑 ', '🌒 ', '🌓 ', '🌔 ', '🌕 ', '🌖 ', '🌗 ', '🌘 ' },
|
||||
--}
|
||||
Reference in New Issue
Block a user