2024-03-06 02:24:31 +01:00
|
|
|
if vim.g.did_load_lualine_plugin then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
vim.g.did_load_lualine_plugin = true
|
|
|
|
|
2024-09-26 04:58:13 +02:00
|
|
|
local navic = require('nvim-navic')
|
|
|
|
navic.setup {}
|
2024-03-06 02:24:31 +01:00
|
|
|
|
|
|
|
---Indicators for special modes,
|
|
|
|
---@return string status
|
|
|
|
local function extra_mode_status()
|
|
|
|
-- recording macros
|
|
|
|
local reg_recording = vim.fn.reg_recording()
|
|
|
|
if reg_recording ~= '' then
|
|
|
|
return ' @' .. reg_recording
|
|
|
|
end
|
|
|
|
-- executing macros
|
|
|
|
local reg_executing = vim.fn.reg_executing()
|
|
|
|
if reg_executing ~= '' then
|
|
|
|
return ' @' .. reg_executing
|
|
|
|
end
|
|
|
|
-- ix mode (<C-x> in insert mode to trigger different builtin completion sources)
|
|
|
|
local mode = vim.api.nvim_get_mode().mode
|
|
|
|
if mode == 'ix' then
|
|
|
|
return '^X: (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)'
|
|
|
|
end
|
|
|
|
return ''
|
|
|
|
end
|
|
|
|
|
|
|
|
require('lualine').setup {
|
|
|
|
globalstatus = true,
|
|
|
|
sections = {
|
2024-09-26 04:58:13 +02:00
|
|
|
lualine_a = { 'mode' },
|
|
|
|
lualine_b = { 'branch', 'diff', 'diagnostics' },
|
|
|
|
lualine_c = { "overseer" },
|
|
|
|
-- lualine_c = {
|
|
|
|
-- -- nvim-navic
|
|
|
|
-- navic.get_location, cond = navic.is_available
|
|
|
|
-- },
|
|
|
|
lualine_x = { 'encoding', 'fileformat', 'filetype' },
|
|
|
|
lualine_y = { 'progress' },
|
2024-03-06 02:24:31 +01:00
|
|
|
lualine_z = {
|
|
|
|
-- (see above)
|
|
|
|
{ extra_mode_status },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
options = {
|
2024-11-19 04:21:02 +01:00
|
|
|
theme = 'catppuccin-mocha',
|
2024-09-24 21:42:42 +02:00
|
|
|
-- component_separators = { left = '', right = ''},
|
2024-09-26 04:58:13 +02:00
|
|
|
component_separators = { left = '', right = '' },
|
2024-09-24 21:42:42 +02:00
|
|
|
-- section_separators = { left = '', right = ''},
|
2024-09-26 04:58:13 +02:00
|
|
|
section_separators = { left = '', right = '' },
|
2024-09-24 21:42:42 +02:00
|
|
|
ignore_focus = {
|
|
|
|
"dapui_scopes",
|
|
|
|
"dapui_breakpoints",
|
|
|
|
"dapui_stacks",
|
|
|
|
"dapui_watches",
|
|
|
|
"dap-repl",
|
|
|
|
"dapui_console"
|
|
|
|
},
|
2024-03-06 02:24:31 +01:00
|
|
|
},
|
|
|
|
-- Example top tabline configuration (this may clash with other plugins)
|
2024-09-24 21:42:42 +02:00
|
|
|
-- tabline = {
|
|
|
|
-- lualine_a = {
|
|
|
|
-- {
|
|
|
|
-- 'tabs',
|
|
|
|
-- mode = 1,
|
|
|
|
-- },
|
|
|
|
-- },
|
|
|
|
-- lualine_a = {
|
|
|
|
-- {
|
|
|
|
-- 'buffers',
|
|
|
|
-- show_filename_only = true,
|
|
|
|
-- show_bufnr = true,
|
|
|
|
-- mode = 4,
|
|
|
|
-- filetype_names = {
|
|
|
|
-- TelescopePrompt = 'Telescope',
|
|
|
|
-- dashboard = 'Dashboard',
|
|
|
|
-- fzf = 'FZF',
|
|
|
|
-- },
|
|
|
|
-- buffers_color = {
|
|
|
|
-- -- Same values as the general color option can be used here.
|
|
|
|
-- active = 'lualine_b_normal', -- Color for active buffer.
|
|
|
|
-- inactive = 'lualine_b_inactive', -- Color for inactive buffer.
|
|
|
|
-- },
|
|
|
|
-- },
|
|
|
|
-- },
|
2024-09-26 04:58:13 +02:00
|
|
|
-- lualine_b = {
|
2024-09-24 21:42:42 +02:00
|
|
|
-- lualine_c = {},
|
|
|
|
-- lualine_x = {},
|
|
|
|
-- lualine_y = {},
|
2024-09-26 04:58:13 +02:00
|
|
|
-- lualine_z = {}, -- Commented out so that buffers and file path are on the same line
|
2024-09-24 21:42:42 +02:00
|
|
|
-- },
|
2024-09-26 04:58:13 +02:00
|
|
|
winbar = {
|
|
|
|
lualine_a = {
|
|
|
|
-- {
|
|
|
|
-- "navic",
|
|
|
|
-- color_correction = nil,
|
|
|
|
-- navic_opts = nil
|
|
|
|
-- }
|
|
|
|
},
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = {
|
|
|
|
{
|
|
|
|
'filename',
|
|
|
|
path = 1,
|
|
|
|
file_status = true,
|
|
|
|
newfile_status = true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
function()
|
|
|
|
return navic.get_location()
|
|
|
|
end,
|
|
|
|
cond = function()
|
|
|
|
return navic.is_available()
|
|
|
|
end
|
|
|
|
},
|
|
|
|
},
|
|
|
|
-- lualine_x = {
|
|
|
|
-- {
|
|
|
|
-- 'filename',
|
|
|
|
-- path = 1,
|
|
|
|
-- file_status = true,
|
|
|
|
-- newfile_status = true,
|
|
|
|
-- },
|
|
|
|
-- },
|
2024-09-26 20:34:29 +02:00
|
|
|
lualine_y = {'location'},
|
|
|
|
lualine_z = {'searchcount','selectioncount'},
|
2024-09-26 04:58:13 +02:00
|
|
|
},
|
2024-03-06 02:24:31 +01:00
|
|
|
extensions = { 'fugitive', 'fzf', 'toggleterm', 'quickfix' },
|
|
|
|
}
|