feat: rename param

This commit is contained in:
Barrett Ruth 2026-02-02 01:07:59 -05:00
parent 851cdb0214
commit ea8a2cbaa9
5 changed files with 11 additions and 11 deletions

View file

@ -86,7 +86,7 @@ CONFIGURATION *fugitive-ts-config*
using `FugitiveTsAdd`/`FugitiveTsDelete` groups
(derived from `DiffAdd`/`DiffDelete` backgrounds).
{linenr} (boolean, default: true)
{gutter} (boolean, default: true)
Highlight line numbers with matching colors.
Only visible if line numbers are enabled.

View file

@ -155,7 +155,7 @@ function M.highlight_hunk(bufnr, ns, hunk, opts)
line_hl_group = line_hl,
priority = 198,
}
if opts.highlights.linenr then
if opts.highlights.gutter then
extmark_opts.number_hl_group = line_hl
end
pcall(vim.api.nvim_buf_set_extmark, bufnr, ns, buf_line, 0, extmark_opts)

View file

@ -1,7 +1,7 @@
---@class fugitive-ts.Highlights
---@field treesitter boolean
---@field background boolean
---@field linenr boolean
---@field gutter boolean
---@field vim boolean
---@class fugitive-ts.Config
@ -37,7 +37,7 @@ local default_config = {
highlights = {
treesitter = true,
background = true,
linenr = true,
gutter = true,
vim = false,
},
}
@ -172,7 +172,7 @@ function M.setup(opts)
vim.validate({
['highlights.treesitter'] = { opts.highlights.treesitter, 'boolean', true },
['highlights.background'] = { opts.highlights.background, 'boolean', true },
['highlights.linenr'] = { opts.highlights.linenr, 'boolean', true },
['highlights.gutter'] = { opts.highlights.gutter, 'boolean', true },
['highlights.vim'] = { opts.highlights.vim, 'boolean', true },
})
end

View file

@ -36,7 +36,7 @@ describe('highlight', function()
highlights = {
treesitter = true,
background = false,
linenr = false,
gutter = false,
vim = false,
},
}
@ -394,7 +394,7 @@ describe('highlight', function()
delete_buffer(bufnr)
end)
it('applies number_hl_group when linenr enabled', function()
it('applies number_hl_group when gutter enabled', function()
local bufnr = create_buffer({
'@@ -1,1 +1,2 @@',
' local x = 1',
@ -412,7 +412,7 @@ describe('highlight', function()
bufnr,
ns,
hunk,
default_opts({ highlights = { background = true, linenr = true } })
default_opts({ highlights = { background = true, gutter = true } })
)
local extmarks = get_extmarks(bufnr)
@ -427,7 +427,7 @@ describe('highlight', function()
delete_buffer(bufnr)
end)
it('does not apply number_hl_group when linenr disabled', function()
it('does not apply number_hl_group when gutter disabled', function()
local bufnr = create_buffer({
'@@ -1,1 +1,2 @@',
' local x = 1',
@ -445,7 +445,7 @@ describe('highlight', function()
bufnr,
ns,
hunk,
default_opts({ highlights = { background = true, linenr = false } })
default_opts({ highlights = { background = true, gutter = false } })
)
local extmarks = get_extmarks(bufnr)

View file

@ -28,7 +28,7 @@ describe('fugitive-ts', function()
highlights = {
treesitter = true,
background = true,
linenr = true,
gutter = true,
vim = false,
},
})