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
|
-- theme stuff
|
||||||
use({ -- statusline
|
use({ -- statusline
|
||||||
'NTBBloodbath/galaxyline.nvim',
|
'CosmicNvim/galaxyline.nvim',
|
||||||
branch = 'main',
|
branch = 'main',
|
||||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||||
config = function()
|
config = function()
|
||||||
|
|
|
@ -277,102 +277,48 @@ gls.left = {
|
||||||
gls.right = {
|
gls.right = {
|
||||||
{
|
{
|
||||||
DiagnosticErrorLeftBracket = {
|
DiagnosticErrorLeftBracket = {
|
||||||
provider = BracketProvider(icons.rounded_left_filled, diag.get_diagnostic_error),
|
provider = BracketProvider(icons.arrow_left, diag.get_diagnostic_error),
|
||||||
highlight = 'GalaxyDiagnosticErrorInv',
|
highlight = 'DiagnosticError',
|
||||||
condition = condition.buffer_not_empty,
|
condition = condition.buffer_not_empty,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
DiagnosticError = {
|
DiagnosticError = {
|
||||||
provider = function()
|
provider = diag.get_diagnostic_error,
|
||||||
local error_result = diag.get_diagnostic_error()
|
highlight = 'DiagnosticError',
|
||||||
highlight('GalaxyDiagnosticError', colors.error, colors.statusline_bg)
|
icon = ' ' .. icons.error .. ' ',
|
||||||
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',
|
|
||||||
condition = condition.buffer_not_empty,
|
condition = condition.buffer_not_empty,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
DiagnosticWarnLeftBracket = {
|
DiagnosticWarnLeftBracket = {
|
||||||
provider = BracketProvider(icons.rounded_left_filled, diag.get_diagnostic_warn),
|
provider = BracketProvider(icons.arrow_left, diag.get_diagnostic_warn),
|
||||||
highlight = 'GalaxyDiagnosticWarnInv',
|
highlight = 'DiagnosticWarning',
|
||||||
condition = condition.buffer_not_empty,
|
condition = condition.buffer_not_empty,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
DiagnosticWarn = {
|
DiagnosticWarn = {
|
||||||
provider = function()
|
provider = diag.get_diagnostic_warn,
|
||||||
local warn_result = diag.get_diagnostic_warn()
|
highlight = 'DiagnosticWarning',
|
||||||
highlight('GalaxyDiagnosticWarn', colors.warn, colors.statusline_bg)
|
icon = ' ' .. icons.warn .. ' ',
|
||||||
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',
|
|
||||||
condition = condition.buffer_not_empty,
|
condition = condition.buffer_not_empty,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
DiagnosticInfoLeftBracket = {
|
DiagnosticInfoLeftBracket = {
|
||||||
provider = BracketProvider(icons.rounded_left_filled, diag.get_diagnostic_info),
|
provider = BracketProvider(icons.arrow_left, diag.get_diagnostic_info),
|
||||||
highlight = 'GalaxyDiagnosticInfoInv',
|
highlight = 'DiagnosticInfo',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
DiagnosticInfo = {
|
DiagnosticInfo = {
|
||||||
provider = function()
|
provider = diag.get_diagnostic_info,
|
||||||
local info_result = diag.get_diagnostic_info()
|
icon = ' ' .. icons.info .. ' ',
|
||||||
highlight('GalaxyDiagnosticInfo', colors.info, colors.statusline_bg)
|
highlight = 'DiagnosticInfo',
|
||||||
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',
|
|
||||||
condition = check_width_and_git_and_buffer,
|
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 = {
|
GitBranchRightBracket = {
|
||||||
provider = BracketProvider(icons.arrow_left_filled, true),
|
provider = BracketProvider(icons.arrow_left_filled, true),
|
||||||
|
|
|
@ -4,7 +4,11 @@ if not colors then
|
||||||
end
|
end
|
||||||
local highlight = require('cosmic.theme.highlight')
|
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('DiagnosticVirtualTextError', 'None', colors.error)
|
||||||
highlight('DiagnosticVirtualTextWarn', 'None', colors.warn)
|
highlight('DiagnosticVirtualTextWarn', 'None', colors.warn)
|
||||||
highlight('DiagnosticVirtualTextInfo', 'None', colors.info)
|
highlight('DiagnosticVirtualTextInfo', 'None', colors.info)
|
||||||
|
@ -29,16 +33,7 @@ highlight('LspDiagnosticsHint', 'None', colors.hint)
|
||||||
highlight('LspDiagnosticsSignError', 'None', colors.error)
|
highlight('LspDiagnosticsSignError', 'None', colors.error)
|
||||||
highlight('LspDiagnosticsSignWarning', 'None', colors.warn)
|
highlight('LspDiagnosticsSignWarning', 'None', colors.warn)
|
||||||
highlight('LspDiagnosticsSignInformation', 'None', colors.info)
|
highlight('LspDiagnosticsSignInformation', 'None', colors.info)
|
||||||
highlight('LspDiagnosticsSignHint', 'None', colors.hint)
|
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)
|
|
||||||
|
|
||||||
-- notification highlights
|
-- notification highlights
|
||||||
highlight('NotifyINFOBorder', nil, colors.hint)
|
highlight('NotifyINFOBorder', nil, colors.hint)
|
||||||
|
@ -54,8 +49,5 @@ highlight('NotifyTRACEBorder', nil, colors.trace)
|
||||||
highlight('NotifyTRACETitle', nil, colors.trace)
|
highlight('NotifyTRACETitle', nil, colors.trace)
|
||||||
highlight('NotifyTRACEIcon', nil, colors.trace)
|
highlight('NotifyTRACEIcon', nil, colors.trace)
|
||||||
|
|
||||||
highlight('TelescopeBorder', 'None', colors.floatBorder)
|
vim.cmd('hi FloatBorder guibg=None')
|
||||||
highlight('FloatermBorder', 'None', colors.floatBorder)
|
vim.cmd('hi! link FloatermBorder FloatBorder')
|
||||||
highlight('StatusLine', colors.statusline_bg, colors.statusline_bg)
|
|
||||||
highlight('FloatBorder', 'None', colors.floatBorder)
|
|
||||||
highlight('NormalFloat', 'Normal', 'Normal')
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ Full featured native LSP functionality!
|
||||||
- Amazing default theme thanks to [tokyonight.nvim](https://github.com/folke/tokyonight.nvim)
|
- 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)
|
- Enhanced syntax highlighting with [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)
|
||||||
- Dashboard via [dashboard-nvim](https://github.com/glepnir/dashboard-nvim)
|
- 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)
|
- 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)
|
- 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)
|
- Floating terminal with [vim-floaterm](https://github.com/voldikss/vim-floaterm)
|
||||||
|
|
Loading…
Add table
Reference in a new issue