From 81c1ef2090928715b9c17529880b9b60fe3abfc8 Mon Sep 17 00:00:00 2001 From: Heitor Augusto Date: Sat, 28 Dec 2024 16:58:39 -0300 Subject: [PATCH] tests/fidget: update to new format --- .../plugins/by-name/fidget/default.nix | 160 +++++++++--------- 1 file changed, 81 insertions(+), 79 deletions(-) diff --git a/tests/test-sources/plugins/by-name/fidget/default.nix b/tests/test-sources/plugins/by-name/fidget/default.nix index 96e3027d..b20f0ac2 100644 --- a/tests/test-sources/plugins/by-name/fidget/default.nix +++ b/tests/test-sources/plugins/by-name/fidget/default.nix @@ -7,91 +7,91 @@ plugins.fidget = { enable = true; - 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 - ''; - 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"; + settings = { + progress = { + poll_rate = 0; + suppress_on_insert = false; + ignore_done_already = false; + ignore_empty_message = true; + notification_group.__raw = "function(msg) return msg.lsp_name end"; + clear_on_detach.__raw = '' + function(client_id) + local client = vim.lsp.get_client_by_id(client_id) + return client and client.name or nil + end + ''; + ignore = [ ]; + display = { + render_limit = 16; + done_ttl = 3; + done_icon = "✔"; + done_style = "Constant"; + progress_ttl.__raw = "math.huge"; + progress_icon = [ "dots" ]; + progress_style = "Warning_msg"; + group_style = "Title"; + icon_style = "Question"; + priority = 30; + skip_history = true; + format_message.__raw = "require('fidget.progress.display').default_format_message"; + format_annote.__raw = "function(msg) return msg.title end"; + format_group_name.__raw = "function(group) return tostring(group) end"; + overrides = { + rust_analyzer = { + name = "rust-analyzer"; + }; }; }; + lsp = { + progress_ringbuf_size = 0; + }; }; - 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) + notification = { + poll_rate = 10; + filter = "info"; + history_size = 128; + override_vim_notify = false; + configs = { + default.__raw = "require('fidget.notification').default_config"; + }; + redirect.__raw = '' + function(msg, level, opts) + if opts and opts.on_open then + return require("fidget.integration.nvim-notify").delegate(msg, level, opts) + end end - end - ''; - view = { - stackUpwards = true; - iconSeparator = " "; - groupSeparator = "---"; - groupSeparatorHl = "Comment"; + ''; + view = { + stack_upwards = true; + icon_separator = " "; + group_separator = "---"; + group_separator_hl = "Comment"; + }; + window = { + normal_hl = "Comment"; + winblend = 100; + border = "none"; + border_hl = ""; + zindex = 45; + max_width = 0; + max_height = 0; + x_padding = 1; + y_padding = 0; + align = "bottom"; + relative = "editor"; + }; }; - window = { - normalHl = "Comment"; - winblend = 100; - border = "none"; - borderHl = ""; - zindex = 45; - maxWidth = 0; - maxHeight = 0; - xPadding = 1; - yPadding = 0; - align = "bottom"; - relative = "editor"; + integration = { + nvim-tree = { + enable = false; + }; }; - }; - integration = { - nvim-tree = { - enable = false; + logger = { + level = "warn"; + float_precision = 1.0e-2; + path.__raw = "string.format('%s/fidget.nvim.log', vim.fn.stdpath('cache'))"; }; }; - logger = { - level = "warn"; - floatPrecision = 1.0e-2; - path.__raw = "string.format('%s/fidget.nvim.log', vim.fn.stdpath('cache'))"; - }; }; }; @@ -100,8 +100,10 @@ nvim-tree.enable = true; fidget = { enable = true; - integration = { - nvim-tree.enable = true; + settings = { + integration = { + nvim-tree.enable = true; + }; }; }; web-devicons.enable = true;