Skip to content

Commit 9075055

Browse files
fix: remove pipe_table.filler config and RenderMarkdownTableFill highlight
## Details The table filler highlight is used for inlined spaces to pad out tables so that columns line up nicely. However using a special highlight group for this does not serve a purpose. There are many other instances where we add spaces for padding and in all cases we use the default padding highlight "Normal". To make the behavior more similar to other components the highlight and configuration option have been removed. In some ways this could be a breaking change, but I really can't see a use case for having the padding stand out (i.e. using a custom background color), I imagine all existing usage of this option set some value that ends up having no visual effect. If any bug reports are submitted around this I will reconsider by either adding it back or marking this as a hard breaking change, depending on the use case.
1 parent bd482f9 commit 9075055

8 files changed

Lines changed: 5 additions & 23 deletions

File tree

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -730,8 +730,6 @@ require('render-markdown').setup({
730730
head = 'RenderMarkdownTableHead',
731731
-- Highlight for everything else, main table rows and the line below.
732732
row = 'RenderMarkdownTableRow',
733-
-- Highlight for inline padding used to add back concealed space.
734-
filler = 'RenderMarkdownTableFill',
735733
-- Determines how the table as a whole is rendered.
736734
-- | none | { enabled = false } |
737735
-- | normal | { border_enabled = false } |
@@ -1497,8 +1495,6 @@ require('render-markdown').setup({
14971495
head = 'RenderMarkdownTableHead',
14981496
-- Highlight for everything else, main table rows and the line below.
14991497
row = 'RenderMarkdownTableRow',
1500-
-- Highlight for inline padding used to add back concealed space.
1501-
filler = 'RenderMarkdownTableFill',
15021498
-- Determines how the table as a whole is rendered.
15031499
-- | none | { enabled = false } |
15041500
-- | normal | { border_enabled = false } |
@@ -1766,7 +1762,6 @@ The table below shows all the highlight groups with their default link
17661762
| RenderMarkdownTodo | @markup.raw | Todo custom checkbox |
17671763
| RenderMarkdownTableHead | @markup.heading | Pipe table heading rows |
17681764
| RenderMarkdownTableRow | Normal | Pipe table body rows |
1769-
| RenderMarkdownTableFill | Conceal | Pipe table inline padding |
17701765
| RenderMarkdownSuccess | DiagnosticOk | Success related callouts |
17711766
| RenderMarkdownInfo | DiagnosticInfo | Info related callouts |
17721767
| RenderMarkdownHint | DiagnosticHint | Hint related callouts |

doc/render-markdown.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*render-markdown.txt* For NVIM v0.11.6 Last change: 2026 March 04
1+
*render-markdown.txt* For NVIM v0.11.6 Last change: 2026 March 05
22

33
==============================================================================
44
Table of Contents *render-markdown-table-of-contents*
@@ -796,8 +796,6 @@ Default Configuration ~
796796
head = 'RenderMarkdownTableHead',
797797
-- Highlight for everything else, main table rows and the line below.
798798
row = 'RenderMarkdownTableRow',
799-
-- Highlight for inline padding used to add back concealed space.
800-
filler = 'RenderMarkdownTableFill',
801799
-- Determines how the table as a whole is rendered.
802800
-- | none | { enabled = false } |
803801
-- | normal | { border_enabled = false } |
@@ -1547,8 +1545,6 @@ Table Configuration ~
15471545
head = 'RenderMarkdownTableHead',
15481546
-- Highlight for everything else, main table rows and the line below.
15491547
row = 'RenderMarkdownTableRow',
1550-
-- Highlight for inline padding used to add back concealed space.
1551-
filler = 'RenderMarkdownTableFill',
15521548
-- Determines how the table as a whole is rendered.
15531549
-- | none | { enabled = false } |
15541550
-- | normal | { border_enabled = false } |
@@ -1865,9 +1861,6 @@ The table below shows all the highlight groups with their default link
18651861

18661862
RenderMarkdownTableRow Normal Pipe table body rows
18671863

1868-
RenderMarkdownTableFill Conceal Pipe table inline
1869-
padding
1870-
18711864
RenderMarkdownSuccess DiagnosticOk Success related
18721865
callouts
18731866

lua/render-markdown/core/colors.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ M.colors = {
5656
-- Pipe tables
5757
TableHead = '@markup.heading',
5858
TableRow = 'Normal',
59-
TableFill = 'Conceal',
6059
-- Callouts
6160
Success = 'DiagnosticOk',
6261
Info = 'DiagnosticInfo',

lua/render-markdown/health.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ local state = require('render-markdown.state')
66
local M = {}
77

88
---@private
9-
M.version = '8.11.13'
9+
M.version = '8.11.14'
1010

1111
function M.check()
1212
M.start('versions')

lua/render-markdown/render/markdown/table.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ function Render:row(row)
288288

289289
if vim.tbl_contains({ 'trimmed', 'padded' }, self.config.cell) then
290290
for i, col in ipairs(row.cols) do
291-
local node = col.node
292291
local delim = self.data.delim.cols[i]
292+
local node = col.node
293293
local space = col.space
294294
local fill = delim.width - col.width
295295
-- delim(20) : --------------------
@@ -337,7 +337,7 @@ function Render:shift(node, side, amount)
337337
if amount > 0 then
338338
self.marks:add(self.config, true, node.start_row, col, {
339339
priority = 0,
340-
virt_text = self:line():pad(amount, self.config.filler):get(),
340+
virt_text = self:line():pad(amount):get(),
341341
virt_text_pos = 'inline',
342342
})
343343
elseif amount < 0 then

lua/render-markdown/settings.lua

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,6 @@ M.pipe_table = {}
16171617
---@field alignment_indicator string
16181618
---@field head string
16191619
---@field row string
1620-
---@field filler string
16211620
---@field style render.md.table.Style
16221621

16231622
---@class (exact) render.md.table.cell.Context
@@ -1692,8 +1691,6 @@ M.pipe_table.default = {
16921691
head = 'RenderMarkdownTableHead',
16931692
-- Highlight for everything else, main table rows and the line below.
16941693
row = 'RenderMarkdownTableRow',
1695-
-- Highlight for inline padding used to add back concealed space.
1696-
filler = 'RenderMarkdownTableFill',
16971694
-- Determines how the table as a whole is rendered.
16981695
-- | none | { enabled = false } |
16991696
-- | normal | { border_enabled = false } |
@@ -1715,7 +1712,6 @@ function M.pipe_table.schema()
17151712
alignment_indicator = { type = 'string' },
17161713
head = { type = 'string' },
17171714
row = { type = 'string' },
1718-
filler = { type = 'string' },
17191715
style = { enum = M.pipe_table.style },
17201716
})
17211717
end

lua/render-markdown/types.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@
286286
---@field alignment_indicator? string
287287
---@field head? string
288288
---@field row? string
289-
---@field filler? string
290289
---@field style? render.md.table.Style
291290

292291
---@class (exact) render.md.quote.UserConfig: render.md.base.UserConfig

tests/util.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ end
416416
---@param spaces integer
417417
---@return vim.api.keyset.set_extmark
418418
function M.table.padding(spaces)
419-
return M.padding(spaces, 0, 'RmTableFill')
419+
return M.padding(spaces, 0)
420420
end
421421

422422
---@param marks render.md.test.Marks

0 commit comments

Comments
 (0)