Skip to content

Commit

Permalink
docs: generate most highlght defs
Browse files Browse the repository at this point in the history
Resolves #1161
  • Loading branch information
lewis6991 committed Jan 16, 2025
1 parent 9541f5e commit 0797734
Show file tree
Hide file tree
Showing 3 changed files with 217 additions and 187 deletions.
132 changes: 126 additions & 6 deletions doc/gitsigns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1051,41 +1051,161 @@ GitSignsChangedeleteLn
Used for buffer line (when `config.linehl == true`) of 'changedelete' signs.

Fallbacks: `GitSignsChangeLn`
*hl-GitSignsTopdeleteLn*
GitSignsTopdeleteLn
Used for buffer line (when `config.linehl == true`) of 'topdelete' signs.

Fallbacks: `GitSignsDeleteLn`
*hl-GitSignsUntrackedLn*
GitSignsUntrackedLn
Used for buffer line (when `config.linehl == true`) of 'untracked' signs.

Fallbacks: `GitSignsAddLn`
*hl-GitSignsAddCul*
GitSignsAddCul
Used for the text of 'add' signs when the cursor is on the same line as the sign.
Used for the text (when the cursor is on the same line as the sign) of 'add' signs.

Fallbacks: `GitSignsAdd`
*hl-GitSignsChangeCul*
GitSignsChangeCul
Used for the text of 'change' signs when the cursor is on the same line as the sign.
Used for the text (when the cursor is on the same line as the sign) of 'change' signs.

Fallbacks: `GitSignsChange`
*hl-GitSignsDeleteCul*
GitSignsDeleteCul
Used for the text of 'delete' signs when the cursor is on the same line as the sign.
Used for the text (when the cursor is on the same line as the sign) of 'delete' signs.

Fallbacks: `GitSignsDelete`
*hl-GitSignsChangedeleteCul*
GitSignsChangedeleteCul
Used for the text of 'changedelete' signs when the cursor is on the same line as the sign.
Used for the text (when the cursor is on the same line as the sign) of 'changedelete' signs.

Fallbacks: `GitSignsChangeCul`
*hl-GitSignsTopdeleteCul*
GitSignsTopdeleteCul
Used for the text of 'topdelete' signs when the cursor is on the same line as the sign.
Used for the text (when the cursor is on the same line as the sign) of 'topdelete' signs.

Fallbacks: `GitSignsDeleteCul`
*hl-GitSignsUntrackedCul*
GitSignsUntrackedCul
Used for the text of 'untracked' signs when the cursor is on the same line as the sign.
Used for the text (when the cursor is on the same line as the sign) of 'untracked' signs.

Fallbacks: `GitSignsAddCul`
*hl-GitSignsStagedAdd*
GitSignsStagedAdd
Used for the text of 'add' staged signs.

Fallbacks: `GitSignsAdd` (fg=50%)
*hl-GitSignsStagedChange*
GitSignsStagedChange
Used for the text of 'change' staged signs.

Fallbacks: `GitSignsChange` (fg=50%)
*hl-GitSignsStagedDelete*
GitSignsStagedDelete
Used for the text of 'delete' staged signs.

Fallbacks: `GitSignsDelete` (fg=50%)
*hl-GitSignsStagedChangedelete*
GitSignsStagedChangedelete
Used for the text of 'changedelete' staged signs.

Fallbacks: `GitSignsChangedelete` (fg=50%)
*hl-GitSignsStagedTopdelete*
GitSignsStagedTopdelete
Used for the text of 'topdelete' staged signs.

Fallbacks: `GitSignsTopdelete` (fg=50%)
*hl-GitSignsStagedUntracked*
GitSignsStagedUntracked
Used for the text of 'untracked' staged signs.

Fallbacks: `GitSignsUntracked` (fg=50%)
*hl-GitSignsStagedAddNr*
GitSignsStagedAddNr
Used for number column (when `config.numhl == true`) of 'add' staged signs.

Fallbacks: `GitSignsAddNr` (fg=50%)
*hl-GitSignsStagedChangeNr*
GitSignsStagedChangeNr
Used for number column (when `config.numhl == true`) of 'change' staged signs.

Fallbacks: `GitSignsChangeNr` (fg=50%)
*hl-GitSignsStagedDeleteNr*
GitSignsStagedDeleteNr
Used for number column (when `config.numhl == true`) of 'delete' staged signs.

Fallbacks: `GitSignsDeleteNr` (fg=50%)
*hl-GitSignsStagedChangedeleteNr*
GitSignsStagedChangedeleteNr
Used for number column (when `config.numhl == true`) of 'changedelete' staged signs.

Fallbacks: `GitSignsChangedeleteNr` (fg=50%)
*hl-GitSignsStagedTopdeleteNr*
GitSignsStagedTopdeleteNr
Used for number column (when `config.numhl == true`) of 'topdelete' staged signs.

Fallbacks: `GitSignsTopdeleteNr` (fg=50%)
*hl-GitSignsStagedUntrackedNr*
GitSignsStagedUntrackedNr
Used for number column (when `config.numhl == true`) of 'untracked' staged signs.

Fallbacks: `GitSignsUntrackedNr` (fg=50%)
*hl-GitSignsStagedAddLn*
GitSignsStagedAddLn
Used for buffer line (when `config.linehl == true`) of 'add' staged signs.

Fallbacks: `GitSignsAddLn` (fg=50%)
*hl-GitSignsStagedChangeLn*
GitSignsStagedChangeLn
Used for buffer line (when `config.linehl == true`) of 'change' staged signs.

Fallbacks: `GitSignsChangeLn` (fg=50%)
*hl-GitSignsStagedChangedeleteLn*
GitSignsStagedChangedeleteLn
Used for buffer line (when `config.linehl == true`) of 'changedelete' staged signs.

Fallbacks: `GitSignsChangedeleteLn` (fg=50%)
*hl-GitSignsStagedTopdeleteLn*
GitSignsStagedTopdeleteLn
Used for buffer line (when `config.linehl == true`) of 'topdelete' staged signs.

Fallbacks: `GitSignsTopdeleteLn` (fg=50%)
*hl-GitSignsStagedUntrackedLn*
GitSignsStagedUntrackedLn
Used for buffer line (when `config.linehl == true`) of 'untracked' staged signs.

Fallbacks: `GitSignsUntrackedLn` (fg=50%)
*hl-GitSignsStagedAddCul*
GitSignsStagedAddCul
Used for the text (when the cursor is on the same line as the sign) of 'add' staged signs.

Fallbacks: `GitSignsAddCul` (fg=50%)
*hl-GitSignsStagedChangeCul*
GitSignsStagedChangeCul
Used for the text (when the cursor is on the same line as the sign) of 'change' staged signs.

Fallbacks: `GitSignsChangeCul` (fg=50%)
*hl-GitSignsStagedDeleteCul*
GitSignsStagedDeleteCul
Used for the text (when the cursor is on the same line as the sign) of 'delete' staged signs.

Fallbacks: `GitSignsDeleteCul` (fg=50%)
*hl-GitSignsStagedChangedeleteCul*
GitSignsStagedChangedeleteCul
Used for the text (when the cursor is on the same line as the sign) of 'changedelete' staged signs.

Fallbacks: `GitSignsChangedeleteCul` (fg=50%)
*hl-GitSignsStagedTopdeleteCul*
GitSignsStagedTopdeleteCul
Used for the text (when the cursor is on the same line as the sign) of 'topdelete' staged signs.

Fallbacks: `GitSignsTopdeleteCul` (fg=50%)
*hl-GitSignsStagedUntrackedCul*
GitSignsStagedUntrackedCul
Used for the text (when the cursor is on the same line as the sign) of 'untracked' staged signs.

Fallbacks: `GitSignsUntrackedCul` (fg=50%)
*hl-GitSignsAddPreview*
GitSignsAddPreview
Used for added lines in previews.
Expand Down
3 changes: 3 additions & 0 deletions gen_help.lua
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ local function gen_highlights_doc()
fallbacks_tbl[#fallbacks_tbl + 1] = string.format('`%s`', f)
end
local fallbacks = table.concat(fallbacks_tbl, ', ')
if spec.fg_factor then
fallbacks = fallbacks .. (' (fg=%d%%)'):format(spec.fg_factor * 100)
end
res[#res + 1] = string.format('%s*hl-%s*', string.rep(' ', 56), name)
res[#res + 1] = string.format('%s', name)
if spec.desc then
Expand Down
Loading

0 comments on commit 0797734

Please sign in to comment.