plugins/fidget: adapt to latest rewrite of the plugin

This commit is contained in:
Gaetan Lepage 2023-11-30 17:03:04 +01:00 committed by Gaétan Lepage
parent 5d49b9b66d
commit b38dbdb0dc
2 changed files with 805 additions and 234 deletions

View file

@ -7,50 +7,102 @@
plugins.fidget = {
enable = true;
text = {
spinner = "pipe";
done = "";
commenced = "Started";
completed = "Completed";
};
align = {
bottom = true;
right = true;
};
timer = {
spinnerRate = 125;
fidgetDecay = 2000;
taskDecay = 1000;
};
window = {
relative = "win";
blend = 100;
zindex = null;
border = "none";
};
fmt = {
leftpad = true;
stackUpwards = true;
maxWidth = 0;
fidget.__raw = ''
function(fidget_name, spinner)
return string.format("%s %s", spinner, fidget_name)
progress = {
pollRate = 0;
suppressOnInsert = false;
ignoreDoneAlready = false;
ignoreEmptyMessage = true;
notificationGroup = "function(msg) return msg.lsp_name end";
clearOnDetach = ''
function(client_id)
local client = vim.lsp.get_client_by_id(client_id)
return client and client.name or nil
end
'';
task.__raw = ''
function(task_name, message, percentage)
return string.format(
"%s%s [%s]",
message,
percentage and string.format(" (%s%%)", percentage) or "",
task_name
)
ignore = [];
display = {
renderLimit = 16;
doneTtl = 3;
doneIcon = "";
doneStyle = "Constant";
progressTtl = "math.huge";
progressIcon = {
pattern = "dots";
};
progressStyle = "WarningMsg";
groupStyle = "Title";
iconStyle = "Question";
priority = 30;
skipHistory = true;
formatMessage = "require('fidget.progress.display').default_format_message";
formatAnnote = "function(msg) return msg.title end";
formatGroupName = "function(group) return tostring(group) end";
overrides = {
rust_analyzer = {
name = "rust-analyzer";
};
};
};
lsp = {
progressRingbufSize = 0;
};
};
notification = {
pollRate = 10;
filter = "info";
historySize = 128;
overrideVimNotify = false;
configs = {
default = "require('fidget.notification').default_config";
};
redirect = ''
function(msg, level, opts)
if opts and opts.on_open then
return require("fidget.integration.nvim-notify").delegate(msg, level, opts)
end
end
'';
view = {
stackUpwards = true;
iconSeparator = " ";
groupSeparator = "---";
groupSeparatorHl = "Comment";
};
window = {
normalHl = "Comment";
winblend = 100;
border = "none";
borderHl = "";
zindex = 45;
maxWidth = 0;
maxHeight = 0;
xPadding = 1;
yPadding = 0;
align = "bottom";
relative = "editor";
};
};
debug = {
logging = false;
strict = false;
integration = {
nvim-tree = {
enable = false;
};
};
logger = {
level = "warn";
floatPrecision = 0.01;
path.__raw = "string.format('%s/fidget.nvim.log', vim.fn.stdpath('cache'))";
};
};
};
nvim-tree-integration = {
plugins = {
nvim-tree.enable = true;
fidget = {
enable = true;
integration = {
nvim-tree.enable = true;
};
};
};
};