2024-07-24 15:55:36 +03:00
|
|
|
local noice_mode = require("noice").api.statusline.mode
|
2023-11-18 02:27:14 +02:00
|
|
|
-- Statusline
|
2023-11-25 14:37:36 +02:00
|
|
|
--- @type LazyPluginSpec
|
2023-11-18 02:27:14 +02:00
|
|
|
return {
|
|
|
|
"nvim-lualine/lualine.nvim",
|
|
|
|
dependencies = { "kyazdani42/nvim-web-devicons" },
|
2024-06-26 11:34:00 +03:00
|
|
|
opts = {
|
|
|
|
sections = {
|
2024-07-23 14:41:08 +03:00
|
|
|
lualine_x = {
|
2024-07-24 15:55:36 +03:00
|
|
|
"encoding",
|
|
|
|
"fileformat",
|
|
|
|
"filetype",
|
2024-07-23 14:41:08 +03:00
|
|
|
{
|
2024-07-24 15:55:36 +03:00
|
|
|
noice_mode.get,
|
|
|
|
cond = noice_mode.has,
|
2024-07-23 14:41:08 +03:00
|
|
|
color = { fg = "#ff9e64" },
|
|
|
|
},
|
|
|
|
},
|
2024-06-26 11:34:00 +03:00
|
|
|
lualine_z = {
|
|
|
|
{
|
|
|
|
"selectioncount",
|
|
|
|
cond = function()
|
|
|
|
local mode = vim.fn.mode()
|
|
|
|
return mode == "v" or mode == "V" or mode == "\22"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"location",
|
|
|
|
cond = function()
|
|
|
|
local mode = vim.fn.mode()
|
|
|
|
return mode ~= "v" and mode ~= "V" and mode ~= "\22"
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2023-11-21 22:29:51 +02:00
|
|
|
config = true,
|
2023-11-18 02:27:14 +02:00
|
|
|
}
|