-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
visuals/fidget: migrate to new configuration #211
Conversation
6cd899c
to
15d81df
Compare
04dab9c
to
78425d0
Compare
Diff: a.lua{
progress = {
poll_rate = 0,
suppress_on_insert = false,
ignore_done_already = false,
ignore_empty_message = false,
clear_on_detach =
function(client_id)
local client = vim.lsp.get_client_by_id(client_id)
return client and client.name or nil
end,
notification_group =
function(msg) return msg.lsp_client.name end,
ignore = {},
display = {
render_limit = 16,
done_ttl = 3,
done_icon = "✔",
done_style = "Constant",
progress_ttl = math.huge,
progress_icon =
{ pattern = "dots", period = 1 },
progress_style =
"WarningMsg",
group_style = "Title",
icon_style = "Question",
priority = 30,
skip_history = true,
format_message =
require("fidget.progress.display").default_format_message,
format_annote =
function(msg) return msg.title end,
format_group_name =
function(group) return tostring(group) end,
overrides = {
rust_analyzer = { name = "rust-analyzer" },
},
},
lsp = {
progress_ringbuf_size = 0,
log_handler = false,
},
},
notification = {
poll_rate = 10,
filter = vim.log.levels.INFO,
history_size = 128,
override_vim_notify = 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 = {
stack_upwards = true,
icon_separator = " ",
group_separator = "---",
group_separator_hl =
"Comment",
render_message =
function(msg, cnt)
return cnt == 1 and msg or string.format("(%dx) %s", cnt, msg)
end,
},
window = {
normal_hl = "Comment",
winblend = 100,
border = "none",
zindex = 45,
max_width = 0,
max_height = 0,
x_padding = 1,
y_padding = 0,
align = "bottom",
relative = "editor",
},
},
integration = {
["nvim-tree"] = {
enable = true,
},
["xcodebuild-nvim"] = {
enable = true,
},
},
logger = {
level = vim.log.levels.WARN,
max_size = 10000,
float_precision = 0.01,
path =
string.format("%s/fidget.nvim.log", vim.fn.stdpath("cache")),
},
} b.lua{
["integration"] = {
["nvim-tree"] = {["enable"] = true},
["xcodebuild-nvim"] = {["enable"] = true}
},
["logger"] = {
["float_precision"] = 0.010000,
["level"] = vim.log.levels.WARN,
["max_size"] = 10000,
["path"] = string.format("%s/fidget.nvim.log", vim.fn.stdpath("cache"))
},
["notification"] = {
["configs"] = {
["default"] = require("fidget.notification").default_config
},
["filter"] = vim.log.levels.INFO,
["history_size"] = 128,
["override_vim_notify"] = false,
["poll_rate"] = 10,
["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"] = {
["group_separator"] = "---",
["group_separator_hl"] = "Comment",
["icon_separator"] = " ",
["render_message"] = function(msg, cnt)
return cnt == 1 and msg or string.format("(%dx) %s", cnt, msg)
end,
["stack_upwards"] = true
},
["window"] = {
["align"] = "bottom",
["border"] = "none",
["max_height"] = 0,
["max_width"] = 0,
["normal_hl"] = "Comment",
["relative"] = "editor",
["winblend"] = 100,
["x_padding"] = 1,
["y_padding"] = 0,
["zindex"] = 45
}
},
["progress"] = {
["clear_on_detach"] = function(client_id)
local client = vim.lsp.get_client_by_id(client_id)
return client and client.name or nil
end,
["display"] = {
["done_icon"] = "✓",
["done_style"] = "Constant",
["done_ttl"] = 3,
["format_annote"] = function(msg)
return msg.title
end,
["format_group_name"] = function(group)
return tostring(group)
end,
["format_message"] = require("fidget.progress.display").default_format_message,
["group_style"] = "Title",
["icon_style"] = "Question",
["overrides"] = {["rust_analyzer"] = {name = "rust-analyzer"}},
["priority"] = 30,
["progress_icon"] = {
["pattern"] = "dots",
["period"] = 1
},
["progress_style"] = "WarningMsg",
["progress_ttl"] = 99999,
["render_limit"] = 16,
["skip_history"] = true
},
["ignore_done_already"] = false,
["ignore_empty_message"] = false,
["lsp"] = {["log_handler"] = false, ["progress_ringbuf_size"] = 100},
["notification_group"] = function(msg)
return msg.lsp_client.name
end,
["poll_rate"] = 0,
["suppress_on_insert"] = false
}
} |
Was not caused by fidget. |
78425d0
to
f11b23e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
23cd7bb
to
adde1f0
Compare
Added missing docs entry. Should be good now. |
Could you use |
84daeba
to
fc51196
Compare
pushed a commit to use I'm planning to add a custom right now what I'm thinking is something like: some_option = mkOption {
type = nvim.types.rawLua;
default = nvim.types.newRawLua ''function() return 1 end'';
}
config.some_option = nvim.types.newRawLua ''function() return 2 end''; it's a bit clunky though so I'm open to other ideas |
The reason I did not use |
visuals/fidget: migrate to new configuration
Updates
fidget.nvim
to use the rewritten configuration options. Also uses #181.Opening it up as a draft PR because I still need to figure out how to handle the commented out options.