clean unused components for lualine
This commit is contained in:
@@ -12,48 +12,6 @@ local music_stats = require('utils.music_stats')
|
|||||||
|
|
||||||
local get_fg = require('snacks').util.color
|
local get_fg = require('snacks').util.color
|
||||||
|
|
||||||
-- Setup NeoMiniMap extension
|
|
||||||
-- local minimap_extension = require("neominimap.statusline").lualine_default
|
|
||||||
local neominimap = require('neominimap.statusline')
|
|
||||||
local minimap_extension = {
|
|
||||||
sections = {
|
|
||||||
lualine_a = {
|
|
||||||
neominimap.plugin_name,
|
|
||||||
},
|
|
||||||
lualine_b = {
|
|
||||||
{ -- Branch
|
|
||||||
'branch',
|
|
||||||
separator = '',
|
|
||||||
padding = { left = 1, right = 0 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_c = {
|
|
||||||
neominimap.shortname,
|
|
||||||
},
|
|
||||||
lualine_y = {
|
|
||||||
{ -- Progress
|
|
||||||
'progress',
|
|
||||||
separator = '',
|
|
||||||
padding = { left = 0, right = 1 },
|
|
||||||
icon = '',
|
|
||||||
},
|
|
||||||
neominimap.position,
|
|
||||||
},
|
|
||||||
lualine_z = {
|
|
||||||
{ -- Time
|
|
||||||
'datetime',
|
|
||||||
style = '%a %R',
|
|
||||||
icon = ' ',
|
|
||||||
padding = { left = 0, right = 1 },
|
|
||||||
on_click = function()
|
|
||||||
vim.cmd('Telescope oldfiles')
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
filetypes = { 'neominimap' },
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Use lualine by default
|
-- Use lualine by default
|
||||||
if vim.g.statusline == nil then
|
if vim.g.statusline == nil then
|
||||||
vim.g.statusline = 'lualine'
|
vim.g.statusline = 'lualine'
|
||||||
@@ -96,26 +54,6 @@ local function open_git_diff()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function codeium_status()
|
|
||||||
local status = require('codeium.virtual_text').status()
|
|
||||||
|
|
||||||
if status.state == 'idle' then
|
|
||||||
-- Output was cleared, for example when leaving insert mode
|
|
||||||
return ' '
|
|
||||||
end
|
|
||||||
|
|
||||||
if status.state == 'waiting' then
|
|
||||||
-- Waiting for response
|
|
||||||
return 'Waiting...'
|
|
||||||
end
|
|
||||||
|
|
||||||
if status.state == 'completions' and status.total > 0 then
|
|
||||||
return string.format('%d/%d', status.current, status.total)
|
|
||||||
end
|
|
||||||
|
|
||||||
return ' 0 '
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Then only some of event fired we invoked this function
|
-- Then only some of event fired we invoked this function
|
||||||
vim.api.nvim_create_autocmd('User', {
|
vim.api.nvim_create_autocmd('User', {
|
||||||
group = ..., -- set some augroup here
|
group = ..., -- set some augroup here
|
||||||
@@ -133,12 +71,9 @@ vim.api.nvim_create_autocmd('User', {
|
|||||||
|
|
||||||
return { -- Lualine
|
return { -- Lualine
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
lazy = false,
|
lazy = true,
|
||||||
cond = require('data.func').check_global_var(
|
event = 'LazyFile',
|
||||||
'statusline',
|
cond = require('data.cond').lualine,
|
||||||
'lualine',
|
|
||||||
'lualine'
|
|
||||||
),
|
|
||||||
|
|
||||||
dependencies = require('data.deps').lualine,
|
dependencies = require('data.deps').lualine,
|
||||||
init = function()
|
init = function()
|
||||||
@@ -498,21 +433,6 @@ return { -- Lualine
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extensions = {
|
|
||||||
-- 'neo-tree',
|
|
||||||
-- 'lazy',
|
|
||||||
-- 'aerial',
|
|
||||||
-- 'fugitive',
|
|
||||||
-- 'fzf',
|
|
||||||
-- 'mason',
|
|
||||||
-- 'overseer',
|
|
||||||
-- 'toggleterm',
|
|
||||||
-- 'nvim-dap-ui',
|
|
||||||
-- 'quickfix',
|
|
||||||
-- 'symbols-outline',
|
|
||||||
-- 'trouble',
|
|
||||||
-- minimap_extension,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-- do not add trouble symbols if aerial is enabled
|
-- do not add trouble symbols if aerial is enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user