feat(statusline): fork galaxyline
This commit is contained in:
parent
3cbf8cbb8d
commit
1866fc1218
4 changed files with 25 additions and 87 deletions
|
@ -46,7 +46,7 @@ return packer.startup(function()
|
|||
|
||||
-- theme stuff
|
||||
use({ -- statusline
|
||||
'NTBBloodbath/galaxyline.nvim',
|
||||
'CosmicNvim/galaxyline.nvim',
|
||||
branch = 'main',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||
config = function()
|
||||
|
|
|
@ -277,102 +277,48 @@ gls.left = {
|
|||
gls.right = {
|
||||
{
|
||||
DiagnosticErrorLeftBracket = {
|
||||
provider = BracketProvider(icons.rounded_left_filled, diag.get_diagnostic_error),
|
||||
highlight = 'GalaxyDiagnosticErrorInv',
|
||||
provider = BracketProvider(icons.arrow_left, diag.get_diagnostic_error),
|
||||
highlight = 'DiagnosticError',
|
||||
condition = condition.buffer_not_empty,
|
||||
},
|
||||
},
|
||||
{
|
||||
DiagnosticError = {
|
||||
provider = function()
|
||||
local error_result = diag.get_diagnostic_error()
|
||||
highlight('GalaxyDiagnosticError', colors.error, colors.statusline_bg)
|
||||
highlight('GalaxyDiagnosticErrorInv', colors.statusline_bg, colors.error)
|
||||
|
||||
if error_result ~= '' and error_result ~= nil then
|
||||
return error_result
|
||||
end
|
||||
end,
|
||||
icon = icons.error .. ' ',
|
||||
highlight = 'GalaxyDiagnosticError',
|
||||
condition = condition.buffer_not_empty,
|
||||
},
|
||||
},
|
||||
{
|
||||
DiagnosticErrorRightBracket = {
|
||||
provider = {
|
||||
BracketProvider(icons.rounded_right_filled, diag.get_diagnostic_error),
|
||||
BracketProvider(' ', diag.get_diagnostic_error),
|
||||
},
|
||||
highlight = 'GalaxyDiagnosticErrorInv',
|
||||
provider = diag.get_diagnostic_error,
|
||||
highlight = 'DiagnosticError',
|
||||
icon = ' ' .. icons.error .. ' ',
|
||||
condition = condition.buffer_not_empty,
|
||||
},
|
||||
},
|
||||
{
|
||||
DiagnosticWarnLeftBracket = {
|
||||
provider = BracketProvider(icons.rounded_left_filled, diag.get_diagnostic_warn),
|
||||
highlight = 'GalaxyDiagnosticWarnInv',
|
||||
provider = BracketProvider(icons.arrow_left, diag.get_diagnostic_warn),
|
||||
highlight = 'DiagnosticWarning',
|
||||
condition = condition.buffer_not_empty,
|
||||
},
|
||||
},
|
||||
{
|
||||
DiagnosticWarn = {
|
||||
provider = function()
|
||||
local warn_result = diag.get_diagnostic_warn()
|
||||
highlight('GalaxyDiagnosticWarn', colors.warn, colors.statusline_bg)
|
||||
highlight('GalaxyDiagnosticWarnInv', colors.statusline_bg, colors.warn)
|
||||
|
||||
if warn_result ~= '' and warn_result ~= nil then
|
||||
return warn_result
|
||||
end
|
||||
end,
|
||||
highlight = 'GalaxyDiagnosticWarn',
|
||||
icon = icons.warn .. ' ',
|
||||
condition = condition.buffer_not_empty,
|
||||
},
|
||||
},
|
||||
{
|
||||
DiagnosticWarnRightBracket = {
|
||||
provider = {
|
||||
BracketProvider(icons.rounded_right_filled, diag.get_diagnostic_warn),
|
||||
BracketProvider(' ', diag.get_diagnostic_warn),
|
||||
},
|
||||
highlight = 'GalaxyDiagnosticWarnInv',
|
||||
provider = diag.get_diagnostic_warn,
|
||||
highlight = 'DiagnosticWarning',
|
||||
icon = ' ' .. icons.warn .. ' ',
|
||||
condition = condition.buffer_not_empty,
|
||||
},
|
||||
},
|
||||
{
|
||||
DiagnosticInfoLeftBracket = {
|
||||
provider = BracketProvider(icons.rounded_left_filled, diag.get_diagnostic_info),
|
||||
highlight = 'GalaxyDiagnosticInfoInv',
|
||||
provider = BracketProvider(icons.arrow_left, diag.get_diagnostic_info),
|
||||
highlight = 'DiagnosticInfo',
|
||||
},
|
||||
},
|
||||
{
|
||||
DiagnosticInfo = {
|
||||
provider = function()
|
||||
local info_result = diag.get_diagnostic_info()
|
||||
highlight('GalaxyDiagnosticInfo', colors.info, colors.statusline_bg)
|
||||
highlight('GalaxyDiagnosticInfoInv', colors.statusline_bg, colors.info)
|
||||
|
||||
if info_result ~= '' and info_result ~= nil then
|
||||
return info_result
|
||||
end
|
||||
end,
|
||||
icon = icons.info .. ' ',
|
||||
highlight = 'GalaxyDiagnosticInfo',
|
||||
provider = diag.get_diagnostic_info,
|
||||
icon = ' ' .. icons.info .. ' ',
|
||||
highlight = 'DiagnosticInfo',
|
||||
condition = check_width_and_git_and_buffer,
|
||||
},
|
||||
},
|
||||
{
|
||||
DiagnosticInfoRightBracket = {
|
||||
provider = {
|
||||
BracketProvider(icons.rounded_right_filled, diag.get_diagnostic_info),
|
||||
BracketProvider(' ', diag.get_diagnostic_info),
|
||||
},
|
||||
highlight = 'GalaxyDiagnosticInfoInv',
|
||||
condition = condition.buffer_not_empty,
|
||||
},
|
||||
},
|
||||
{
|
||||
GitBranchRightBracket = {
|
||||
provider = BracketProvider(icons.arrow_left_filled, true),
|
||||
|
|
|
@ -4,7 +4,11 @@ if not colors then
|
|||
end
|
||||
local highlight = require('cosmic.theme.highlight')
|
||||
|
||||
-- diagnostic virtual text highlights
|
||||
-- @TODO: can i get rid of this?
|
||||
highlight('StatusLine', colors.statusline_bg, colors.statusline_bg)
|
||||
|
||||
-- @TODO: is all this work worth it?
|
||||
--[[ -- diagnostic virtual text highlights
|
||||
highlight('DiagnosticVirtualTextError', 'None', colors.error)
|
||||
highlight('DiagnosticVirtualTextWarn', 'None', colors.warn)
|
||||
highlight('DiagnosticVirtualTextInfo', 'None', colors.info)
|
||||
|
@ -29,16 +33,7 @@ highlight('LspDiagnosticsHint', 'None', colors.hint)
|
|||
highlight('LspDiagnosticsSignError', 'None', colors.error)
|
||||
highlight('LspDiagnosticsSignWarning', 'None', colors.warn)
|
||||
highlight('LspDiagnosticsSignInformation', 'None', colors.info)
|
||||
highlight('LspDiagnosticsSignHint', 'None', colors.hint)
|
||||
|
||||
-- signature highlight color
|
||||
-- highlight('LspSignatureActiveParameter', 'None', colors.orange)
|
||||
|
||||
-- currently not working?
|
||||
highlight('TelescopeSelectionCaret', 'None', colors.selection_caret)
|
||||
|
||||
-- autocomplete highlights
|
||||
highlight('CmpItemAbbrDeprecated', 'None', colors.warn)
|
||||
highlight('LspDiagnosticsSignHint', 'None', colors.hint) ]]
|
||||
|
||||
-- notification highlights
|
||||
highlight('NotifyINFOBorder', nil, colors.hint)
|
||||
|
@ -54,8 +49,5 @@ highlight('NotifyTRACEBorder', nil, colors.trace)
|
|||
highlight('NotifyTRACETitle', nil, colors.trace)
|
||||
highlight('NotifyTRACEIcon', nil, colors.trace)
|
||||
|
||||
highlight('TelescopeBorder', 'None', colors.floatBorder)
|
||||
highlight('FloatermBorder', 'None', colors.floatBorder)
|
||||
highlight('StatusLine', colors.statusline_bg, colors.statusline_bg)
|
||||
highlight('FloatBorder', 'None', colors.floatBorder)
|
||||
highlight('NormalFloat', 'Normal', 'Normal')
|
||||
vim.cmd('hi FloatBorder guibg=None')
|
||||
vim.cmd('hi! link FloatermBorder FloatBorder')
|
||||
|
|
|
@ -33,7 +33,7 @@ Full featured native LSP functionality!
|
|||
- Amazing default theme thanks to [tokyonight.nvim](https://github.com/folke/tokyonight.nvim)
|
||||
- Enhanced syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
|
||||
- Dashboard via [dashboard-nvim](https://github.com/glepnir/dashboard-nvim)
|
||||
- Hand-built statusline with [galaxyline](https://github.com/NTBBloodbath/galaxyline.nvim)
|
||||
- Hand-built statusline with [galaxyline](https://github.com/CosmicNvim/galaxyline.nvim)
|
||||
- Explore files with [nvim-tree](https://github.com/kyazdani42/nvim-tree.lua)
|
||||
- Fuzzy finder and some LSP actions with [Telescope](https://github.com/nvim-telescope/telescope.nvim)
|
||||
- Floating terminal with [vim-floaterm](https://github.com/voldikss/vim-floaterm)
|
||||
|
|
Loading…
Add table
Reference in a new issue