From e6c913b930a027eab53d9ca7676b4b3ce10febcf Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 23 Jun 2024 16:26:20 +0200 Subject: [PATCH] plugins.gitsigns: remove deprecated options https://github.com/lewis6991/gitsigns.nvim/issues/453 --- plugins/git/gitsigns/options.nix | 10 ++++- tests/test-sources/plugins/git/gitsigns.nix | 45 +++------------------ 2 files changed, 14 insertions(+), 41 deletions(-) diff --git a/plugins/git/gitsigns/options.nix b/plugins/git/gitsigns/options.nix index ebc4e3c20..e1c9911e5 100644 --- a/plugins/git/gitsigns/options.nix +++ b/plugins/git/gitsigns/options.nix @@ -3,8 +3,11 @@ with lib; { signs = let + # TODO (2024-06-24): find a way to properly remove the `hl`, `numhl` and `linehl` options + # https://github.com/lewis6991/gitsigns.nvim/issues/453#issuecomment-2178736570 signOptions = defaults: { hl = helpers.defaultNullOpts.mkStr defaults.hl '' + **DEPRECATED** Specifies the highlight group to use for the sign. ''; @@ -13,10 +16,12 @@ with lib; ''; numhl = helpers.defaultNullOpts.mkStr defaults.numhl '' + **DEPRECATED** Specifies the highlight group to use for the number column. ''; linehl = helpers.defaultNullOpts.mkStr defaults.linehl '' + **DEPRECATED** Specifies the highlight group to use for the line. ''; @@ -398,8 +403,6 @@ with lib; Note that the keys map onto the output of: `git blame --line-porcelain` - - {opts} Passed directly from `settings.current_line_blame_formatter_opts`. - Return: The result of this function is passed directly to the `opts.virt_text` field of `|nvim_buf_set_extmark|` and thus must be a list of `[text, highlight]` tuples. @@ -420,7 +423,10 @@ with lib; ''; yadm = { + # TODO (2024-06-24): find a way to properly remove this option + # https://github.com/lewis6991/gitsigns.nvim/issues/453#issuecomment-2178743878 enable = helpers.defaultNullOpts.mkBool false '' + **DEPRECATED** Enable YADM support. ''; }; diff --git a/tests/test-sources/plugins/git/gitsigns.nix b/tests/test-sources/plugins/git/gitsigns.nix index 9694b4059..67e30689b 100644 --- a/tests/test-sources/plugins/git/gitsigns.nix +++ b/tests/test-sources/plugins/git/gitsigns.nix @@ -9,42 +9,12 @@ settings = { signs = { - add = { - hl = "GitSignsAdd"; - text = "┃"; - numhl = "GitSignsAddNr"; - linehl = "GitSignsAddLn"; - }; - change = { - hl = "GitSignsChange"; - text = "┃"; - numhl = "GitSignsChangeNr"; - linehl = "GitSignsChangeLn"; - }; - delete = { - hl = "GitSignsDelete"; - text = "▁"; - numhl = "GitSignsDeleteNr"; - linehl = "GitSignsDeleteLn"; - }; - topdelete = { - hl = "GitSignsDelete"; - text = "▔"; - numhl = "GitSignsDeleteNr"; - linehl = "GitSignsDeleteLn"; - }; - changedelete = { - hl = "GitSignsChange"; - text = "~"; - numhl = "GitSignsChangeNr"; - linehl = "GitSignsChangeLn"; - }; - untracked = { - hl = "GitSignsAdd"; - text = "┆"; - numhl = "GitSignsAddNr"; - linehl = "GitSignsAddLn"; - }; + add.text = "┃"; + change.text = "┃"; + delete.text = "▁"; + topdelete.text = "▔"; + changedelete.text = "~"; + untracked.text = "┆"; }; worktrees = [ { @@ -133,9 +103,6 @@ current_line_blame_formatter = " , - "; current_line_blame_formatter_nc = " "; trouble = false; - yadm = { - enable = false; - }; word_diff = false; debug_mode = false; };