nvim/lua/cosmic/plugins/lualine/init.lua
Matthew Leong 7e81d05408
Clean out themes + lots of clean up (#87)
* refactor: remove extra themes

* feat: clean up theme setup

* refactor: move highlights/colors to galaxyline plugin

* feat: add lualine sections

* feat: add lualine icons

* feat: add user config override for lualine

* refactor: remove galaxy line :D

* refactor: clean out notify-nvim configs

* refactor: clean up utils

* refactor: clean up utils - icons
2022-12-27 13:24:27 -08:00

92 lines
2.1 KiB
Lua

local config = require('cosmic.core.user')
local utils = require('cosmic.utils')
local lsp_utils = require('cosmic.utils.lsp')
local icons = require('cosmic.utils.icons')
local custom_sections = {
branch = { 'b:gitsigns_head', icon = icons.branch },
diff = {
'diff',
source = utils.diff_source(),
symbols = {
added = icons.diff_add .. ' ',
modified = icons.diff_modified .. ' ',
removed = icons.diff_remove .. ' ',
},
},
shortenedFilePath = {
'filename',
path = 0,
symbols = {
modified = icons.diff_modified,
},
},
relativeFilePath = {
'filename',
path = 1,
symbols = {
modified = icons.diff_modified,
},
},
}
require('lualine').setup(utils.merge({
options = {
theme = 'tokyonight',
},
sections = {
lualine_a = { 'mode' },
lualine_b = {
{
'filetype',
icon_only = true,
padding = {
left = 1,
right = 0,
},
separator = '',
},
custom_sections.shortenedFilePath,
},
lualine_c = { custom_sections.diff },
lualine_x = { 'diagnostics' },
lualine_y = { lsp_utils.get_lsp_status_str },
lualine_z = { 'location', 'progress' },
},
inactive_sections = {
lualine_a = {},
lualine_b = {
{
'filetype',
icon_only = true,
padding = {
left = 1,
right = 0,
},
separator = '',
},
custom_sections.shortenedFilePath,
},
lualine_c = { custom_sections.diff },
lualine_x = { 'diagnostics' },
lualine_y = { 'location', 'progress' },
lualine_z = {},
},
winbar = {
lualine_a = { utils.get_short_cwd },
lualine_b = { custom_sections.branch },
lualine_c = { custom_sections.relativeFilePath },
lualine_x = { 'filetype' },
lualine_y = {},
lualine_z = {},
},
inactive_winbar = {
lualine_a = { utils.get_short_cwd },
lualine_b = { custom_sections.branch },
lualine_c = { custom_sections.relativeFilePath },
lualine_x = { 'filetype' },
lualine_y = {},
lualine_z = {},
},
extensions = { 'quickfix', 'fugitive', 'nvim-tree' },
}, config.lualine or {}))