mirror of
https://github.com/LazyVim/starter.git
synced 2026-07-22 04:21:03 +00:00
22 lines
611 B
Lua
22 lines
611 B
Lua
local running_linters = function()
|
|
local spinner_chars = { "⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏" }
|
|
local running = require("lint").get_running()
|
|
if #running > 0 then
|
|
local index = math.floor(vim.loop.now() / 150) % #spinner_chars + 1
|
|
return "linters " .. spinner_chars[index] .. " " .. table.concat(running, ",")
|
|
else
|
|
return "linters ▪"
|
|
end
|
|
end
|
|
|
|
return {
|
|
"nvim-lualine/lualine.nvim",
|
|
event = "VeryLazy",
|
|
opts = function(_, opts)
|
|
table.insert(opts.sections.lualine_x, {
|
|
function()
|
|
return running_linters()
|
|
end,
|
|
})
|
|
end,
|
|
}
|