Skip to content

Commit

Permalink
plugins.gitsigns: remove deprecated options
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Jun 24, 2024
1 parent bd650b9 commit 18ecd74
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 41 deletions.
10 changes: 8 additions & 2 deletions plugins/git/gitsigns/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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.
'';

Expand All @@ -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.
'';

Expand Down Expand Up @@ -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.
Expand All @@ -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.
'';
};
Expand Down
45 changes: 6 additions & 39 deletions tests/test-sources/plugins/git/gitsigns.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
{
Expand Down Expand Up @@ -133,9 +103,6 @@
current_line_blame_formatter = " <author>, <author_time> - <summary> ";
current_line_blame_formatter_nc = " <author>";
trouble = false;
yadm = {
enable = false;
};
word_diff = false;
debug_mode = false;
};
Expand Down

0 comments on commit 18ecd74

Please sign in to comment.