Fixed mode colors for visual block mode
Added buffer count for lualine
This commit is contained in:
@@ -28,18 +28,17 @@ return {
|
|||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- FIXME: fix visual block mode not showing properly
|
|
||||||
local mode_color = {
|
local mode_color = {
|
||||||
n = colors.red,
|
n = colors.red,
|
||||||
i = colors.green,
|
i = colors.green,
|
||||||
v = colors.blue,
|
v = colors.blue,
|
||||||
[""] = colors.blue,
|
[""] = colors.blue,
|
||||||
V = colors.blue,
|
V = colors.blue,
|
||||||
c = colors.magenta,
|
c = colors.magenta,
|
||||||
no = colors.red,
|
no = colors.red,
|
||||||
s = colors.orange,
|
s = colors.orange,
|
||||||
S = colors.orange,
|
S = colors.orange,
|
||||||
[""] = colors.orange,
|
[""] = colors.orange,
|
||||||
ic = colors.yellow,
|
ic = colors.yellow,
|
||||||
R = colors.violet,
|
R = colors.violet,
|
||||||
Rv = colors.violet,
|
Rv = colors.violet,
|
||||||
@@ -146,6 +145,9 @@ return {
|
|||||||
removed = { fg = colors.red, bg = "None" },
|
removed = { fg = colors.red, bg = "None" },
|
||||||
},
|
},
|
||||||
cond = conditions.hide_in_width,
|
cond = conditions.hide_in_width,
|
||||||
|
on_click = function()
|
||||||
|
vim.cmd("Neogit")
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
local fileformat = {
|
local fileformat = {
|
||||||
"fileformat",
|
"fileformat",
|
||||||
@@ -177,6 +179,34 @@ return {
|
|||||||
vim.cmd("Mason")
|
vim.cmd("Mason")
|
||||||
end,
|
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 = {
|
local filetype = {
|
||||||
"filetype",
|
"filetype",
|
||||||
color = { fg = colors.darkblue, bg = "None" },
|
color = { fg = colors.darkblue, bg = "None" },
|
||||||
@@ -259,7 +289,7 @@ return {
|
|||||||
lualine_b = { filename, branch },
|
lualine_b = { filename, branch },
|
||||||
lualine_c = { diagnostics, sep, harpoon },
|
lualine_c = { diagnostics, sep, harpoon },
|
||||||
lualine_x = { copilot, diff, fileformat, lazy, mason },
|
lualine_x = { copilot, diff, fileformat, lazy, mason },
|
||||||
lualine_y = { filetype, progress },
|
lualine_y = { buffers, filetype, progress },
|
||||||
lualine_z = { location },
|
lualine_z = { location },
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
|
|||||||
Reference in New Issue
Block a user