🪴 a tiny, customizable statusline for neovim
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

utils: update `utils.get_fmt()`

robin 2d41df65 837401d5

+5 -17
+5 -17
lua/lylla/utils.lua
··· 112 112 end 113 113 114 114 function utils.get_fmt() 115 - local filetype = vim.bo.filetype 116 - if not filetype then 117 - return 118 - end 119 - local formatters = require("mossy.filetype").get(filetype, "formatting") 120 - if #formatters == 0 then 121 - return 122 - end 123 - 124 - local fmt = vim.iter(formatters):find(function(formatter) 125 - if formatter.cond and not formatter.cond({ buf = 0 }) then 126 - return false 115 + local formatters = require("mossy").get() 116 + return vim.iter(ipairs(formatters)):fold("", function(str, i, formatter) 117 + if i == 1 then 118 + return formatter.name 127 119 end 128 120 129 - if formatter.cmd and vim.fn.executable(formatter.cmd) == 0 then 130 - return false 131 - end 132 - return true 121 + return str .. " 󰧟 " .. formatter.name 133 122 end) 134 - return fmt and fmt.name or nil 135 123 end 136 124 137 125 ---@param mode string