2023-05-08 17:03:45 +02:00
|
|
|
local haslualine, lualine = pcall(require, "lualine")
|
|
|
|
if not haslualine then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
2022-07-04 16:01:43 +02:00
|
|
|
local function getWords()
|
2023-09-06 16:28:37 +02:00
|
|
|
return tostring(vim.fn.wordcount().words) .. " Words"
|
2022-07-04 16:01:43 +02:00
|
|
|
end
|
|
|
|
|
2023-05-08 17:03:45 +02:00
|
|
|
lualine.setup({
|
2022-07-04 16:01:43 +02:00
|
|
|
options = {
|
|
|
|
theme = 'nightfly',
|
2024-01-13 22:11:07 +01:00
|
|
|
globalstatus = true
|
2022-07-04 16:01:43 +02:00
|
|
|
},
|
|
|
|
sections = {
|
|
|
|
lualine_a = {'mode'},
|
|
|
|
lualine_b = {'diff', 'diagnostics'},
|
|
|
|
lualine_c = {'filename'},
|
|
|
|
lualine_x = {'encoding', 'fileformat', 'filetype'},
|
|
|
|
lualine_y = {'filesize', getWords},
|
|
|
|
lualine_z = {'branch'},
|
|
|
|
},
|
|
|
|
inactive_sections = {
|
|
|
|
lualine_a = {'mode'},
|
|
|
|
lualine_b = {},
|
|
|
|
lualine_c = {'filename'},
|
|
|
|
lualine_x = {},
|
|
|
|
lualine_y = {'filesize'},
|
|
|
|
lualine_z = {'branch'},
|
|
|
|
},
|
|
|
|
})
|