-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add format function for LSP progress #1275
Comments
Please see #1276 |
Thanks for the suggestion! I think the proper way is to add some kind of |
Fair enough. My current workaround is quite hacky: notify.setup({
content = {
format = function (str)
local parts = vim.split(str.msg, ': ')
if #parts == 2 then
return parts[2]
end
return string.format('\n %s \n', str.msg)
end,
},
window = {
winblend = 0,
config = function ()
local pad = vim.o.cmdheight + (vim.o.laststatus > 0 and 1 or 0)
return {
row = vim.o.lines - pad - 1,
col = vim.o.columns,
border = 'none',
anchor = 'SE',
}
end,
}
})
}) |
I don't find the code particularly hacky, on the contrary even - quite concise and to the point. The fact that it is applied to any notification and not only to the ones coming from LSP progress - yeah, maybe. |
Contributing guidelines
Module(s)
mini.notify
Description
Currently the LSP progress message format is hardcoded. See
mini.nvim/lua/mini/notify.lua
Line 678 in df1559e
It would be nice to make this more dynamic, via a format function.
The text was updated successfully, but these errors were encountered: