mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 11:14:08 +09:00
nixvim: show active formatter in lualine, prefer biome when available
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
@@ -1,3 +1,25 @@
|
||||
{...}: {
|
||||
programs.nixvim.plugins.lualine.enable = true;
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
settings.sections.lualine_x = [
|
||||
{
|
||||
__raw = ''
|
||||
function()
|
||||
local ok, conform = pcall(require, "conform")
|
||||
if not ok then return "" end
|
||||
local formatters = conform.list_formatters(0)
|
||||
for _, f in ipairs(formatters) do
|
||||
if f.available then
|
||||
return " " .. f.name
|
||||
end
|
||||
end
|
||||
return ""
|
||||
end
|
||||
'';
|
||||
}
|
||||
"encoding"
|
||||
"fileformat"
|
||||
"filetype"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user