2023-12-14 13:20:36 +00:00
|
|
|
local function my_location()
|
2023-12-14 13:45:10 +00:00
|
|
|
local line = vim.fn.line(".")
|
|
|
|
local line_cnt = vim.fn.line("$")
|
|
|
|
local col = vim.fn.virtcol(".")
|
|
|
|
local col_cnt = vim.fn.virtcol("$") - 1
|
|
|
|
return string.format("%3d(%d):%d(%d)", line, line_cnt, col, col_cnt)
|
2023-12-14 13:20:36 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return {
|
|
|
|
{
|
|
|
|
"akinsho/bufferline.nvim",
|
|
|
|
enabled = custom.full_feature,
|
|
|
|
main = "bufferline",
|
|
|
|
event = "VeryLazy",
|
|
|
|
keys = {
|
|
|
|
{ "zn", "<cmd>BufferLineCycleNext<cr>" },
|
|
|
|
{ "zp", "<cmd>BufferLineCyclePrev<cr>" },
|
|
|
|
{ "zcn", "<cmd>BufferLineMoveNext<cr>" },
|
|
|
|
{ "zcp", "<cmd>BufferLineMovePrev<cr>" },
|
|
|
|
},
|
|
|
|
opts = {
|
|
|
|
options = {
|
|
|
|
numbers = "ordinal",
|
|
|
|
diagnostics = "nvim_lsp",
|
|
|
|
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
|
|
|
local icon = level:match("error") and " " or " "
|
|
|
|
return " " .. icon .. count
|
|
|
|
end,
|
|
|
|
separator_style = "thick",
|
|
|
|
offsets = {
|
|
|
|
{
|
|
|
|
filetype = "NvimTree",
|
|
|
|
text = "Nvim Tree",
|
|
|
|
text_align = "center",
|
|
|
|
separator = true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
persist_buffer_sort = false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"nvim-lualine/lualine.nvim",
|
|
|
|
enabled = custom.full_feature,
|
|
|
|
dependencies = {
|
2023-12-14 14:36:59 +00:00
|
|
|
"nvim-tree/nvim-web-devicons",
|
|
|
|
"dokwork/lualine-ex",
|
|
|
|
"nvim-lua/plenary.nvim",
|
2023-12-14 13:20:36 +00:00
|
|
|
},
|
|
|
|
main = "lualine",
|
|
|
|
event = "VeryLazy",
|
|
|
|
opts = {
|
|
|
|
sections = {
|
2023-12-14 13:45:10 +00:00
|
|
|
lualine_a = { "mode" },
|
2023-12-14 14:36:59 +00:00
|
|
|
lualine_b = { "branch", "diff", "ex.lsp.single", "diagnostics" },
|
2023-12-14 13:45:10 +00:00
|
|
|
lualine_c = { "filename" },
|
|
|
|
lualine_x = { "encoding" , "fileformat", "filetype" },
|
|
|
|
lualine_y = { "progress" },
|
2023-12-14 13:20:36 +00:00
|
|
|
lualine_z = { my_location },
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = { },
|
|
|
|
lualine_b = { },
|
2023-12-14 13:45:10 +00:00
|
|
|
lualine_c = { "filename" },
|
|
|
|
lualine_x = { "encoding", "fileformat", "filetype" },
|
|
|
|
lualine_y = { "progress" },
|
2023-12-14 13:20:36 +00:00
|
|
|
lualine_z = { my_location },
|
|
|
|
},
|
|
|
|
options = {
|
|
|
|
disabled_filetypes = {
|
2023-12-14 13:45:10 +00:00
|
|
|
statusline = {"NvimTree"},
|
2023-12-14 13:20:36 +00:00
|
|
|
winbar = {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
init = function(_)
|
|
|
|
vim.o.mousemoveevent = true
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
}
|