Fixed mode colors for visual block mode
Added buffer count for lualine
This commit is contained in:
@@ -28,18 +28,17 @@ return {
|
||||
end,
|
||||
}
|
||||
|
||||
-- FIXME: fix visual block mode not showing properly
|
||||
local mode_color = {
|
||||
n = colors.red,
|
||||
i = colors.green,
|
||||
v = colors.blue,
|
||||
[""] = colors.blue,
|
||||
[""] = colors.blue,
|
||||
V = colors.blue,
|
||||
c = colors.magenta,
|
||||
no = colors.red,
|
||||
s = colors.orange,
|
||||
S = colors.orange,
|
||||
[""] = colors.orange,
|
||||
[""] = colors.orange,
|
||||
ic = colors.yellow,
|
||||
R = colors.violet,
|
||||
Rv = colors.violet,
|
||||
@@ -146,6 +145,9 @@ return {
|
||||
removed = { fg = colors.red, bg = "None" },
|
||||
},
|
||||
cond = conditions.hide_in_width,
|
||||
on_click = function()
|
||||
vim.cmd("Neogit")
|
||||
end,
|
||||
}
|
||||
local fileformat = {
|
||||
"fileformat",
|
||||
@@ -177,6 +179,34 @@ return {
|
||||
vim.cmd("Mason")
|
||||
end,
|
||||
}
|
||||
local buffers = {
|
||||
function()
|
||||
local bufs = vim.api.nvim_list_bufs()
|
||||
local bufNumb = 0
|
||||
local function buffer_is_valid(buf_id, buf_name)
|
||||
return 1 == vim.fn.buflisted(buf_id) and buf_name ~= ""
|
||||
end
|
||||
for idx = 1, #bufs do
|
||||
local buf_id = bufs[idx]
|
||||
local buf_name = vim.api.nvim_buf_get_name(buf_id)
|
||||
if buffer_is_valid(buf_id, buf_name) then
|
||||
bufNumb = bufNumb + 1
|
||||
end
|
||||
end
|
||||
|
||||
if bufNumb == 0 then
|
||||
return "No buffs"
|
||||
elseif bufNumb == 1 then
|
||||
return bufNumb .. " buff"
|
||||
else
|
||||
return bufNumb .. " buffs"
|
||||
end
|
||||
end,
|
||||
color = { fg = colors.darkblue, bg = "None" },
|
||||
on_click = function()
|
||||
require("buffer_manager.ui").toggle_quick_menu()
|
||||
end,
|
||||
}
|
||||
local filetype = {
|
||||
"filetype",
|
||||
color = { fg = colors.darkblue, bg = "None" },
|
||||
@@ -259,7 +289,7 @@ return {
|
||||
lualine_b = { filename, branch },
|
||||
lualine_c = { diagnostics, sep, harpoon },
|
||||
lualine_x = { copilot, diff, fileformat, lazy, mason },
|
||||
lualine_y = { filetype, progress },
|
||||
lualine_y = { buffers, filetype, progress },
|
||||
lualine_z = { location },
|
||||
},
|
||||
inactive_sections = {
|
||||
|
||||
Reference in New Issue
Block a user