feat(lualine): Add winbar and modify overseer

This commit is contained in:
Jiří Štefka 2024-09-26 04:58:13 +02:00
parent 8ad3a834ce
commit c1fe17012b
Signed by: jiriks74
GPG Key ID: 1D5E30D3DB2264DE
2 changed files with 60 additions and 22 deletions

@ -1,3 +1,8 @@
if vim.g.did_load_c_plugin then
return
end
vim.g.did_load_c_plugin = true
-- Exit if the language server isn't available
if vim.fn.executable('clangd') ~= 1 then
return
@ -16,6 +21,9 @@ vim.lsp.start {
cmd = { 'clangd' },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
capabilities = require('user.lsp').make_client_capabilities(),
on_attach = function(client, bufnr)
require("nvim-navic").attach(client, bufnr)
end
}
local dap = require("dap")

@ -3,8 +3,8 @@ if vim.g.did_load_lualine_plugin then
end
vim.g.did_load_lualine_plugin = true
-- local navic = require('nvim-navic')
-- avic.setup {}
local navic = require('nvim-navic')
navic.setup {}
---Indicators for special modes,
---@return string status
@ -30,11 +30,15 @@ end
require('lualine').setup {
globalstatus = true,
sections = {
lualine_c = {
-- nvim-navic
-- { navic.get_location, cond = navic.is_available },
},
lualine_y = { "overseer" },
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' },
lualine_z = {
-- (see above)
{ extra_mode_status },
@ -43,9 +47,9 @@ require('lualine').setup {
options = {
theme = 'auto',
-- component_separators = { left = '', right = ''},
component_separators = { left = '', right = ''},
component_separators = { left = '', right = '' },
-- section_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
section_separators = { left = '', right = '' },
ignore_focus = {
"dapui_scopes",
"dapui_breakpoints",
@ -63,7 +67,6 @@ require('lualine').setup {
-- mode = 1,
-- },
-- },
-- lualine_b = {
-- lualine_a = {
-- {
-- 'buffers',
@ -82,20 +85,47 @@ require('lualine').setup {
-- },
-- },
-- },
-- lualine_b = {
-- lualine_c = {},
-- lualine_x = {},
-- lualine_y = {},
-- -- lualine_z = {}, -- Commented out so that buffers and file path are on the same line
-- },
-- winbar = {
-- lualine_z = {
-- {
-- 'filename',
-- path = 1,
-- file_status = true,
-- newfile_status = true,
-- },
-- },
-- lualine_z = {}, -- Commented out so that buffers and file path are on the same line
-- },
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,
-- },
-- },
lualine_y = {'searchcount','selectioncount'},
lualine_z = {'location'},
},
extensions = { 'fugitive', 'fzf', 'toggleterm', 'quickfix' },
}