Skip to content

Commit efac835

Browse files
authored
feat(concealer): code block background min_width (#1328)
closes #1327
1 parent d537d3c commit efac835

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/neorg/modules/core/concealer/module.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ module.public = {
638638
end
639639

640640
local line_lengths = {}
641-
local max_len = 0
641+
local max_len = config.min_width or 0
642642
for row_0b = row_start_0b, row_end_0bin do
643643
local len = get_line_length(bufid, row_0b)
644644
if len > max_len then
@@ -929,6 +929,10 @@ module.config.public = {
929929
-- within the code block.
930930
width = "fullwidth",
931931

932+
-- When set to a number, the code block background will be at least
933+
-- this many chars wide. Useful in conjunction with `width = "content"`
934+
min_width = nil,
935+
932936
-- Additional padding to apply to either the left or the right. Making
933937
-- these values negative is considered undefined behaviour (it is
934938
-- likely to work, but it's not officially supported).

0 commit comments

Comments
 (0)