@@ -389,6 +389,7 @@ M.indent = function(config, node, state)
389
389
local skip_marker = state .skip_marker_at_level
390
390
local indent_size = config .indent_size or 2
391
391
local padding = config .padding or 0
392
+ local start_level = config .level or 2
392
393
local level = node .level
393
394
local with_markers = config .with_markers
394
395
local with_expanders = config .with_expanders == nil and file_nesting .is_enabled ()
@@ -403,7 +404,7 @@ M.indent = function(config, node, state)
403
404
end
404
405
end
405
406
406
- if indent_size == 0 or level < 2 or not with_markers then
407
+ if indent_size == 0 or level < 0 or not with_markers then
407
408
local len = indent_size * level + padding
408
409
local expander = get_expander ()
409
410
if level == 0 or not expander then
@@ -426,12 +427,12 @@ M.indent = function(config, node, state)
426
427
table.insert (indent , { text = string.rep (" " , padding ) })
427
428
end
428
429
429
- for i = 1 , level do
430
+ for i = start_level - 1 , level do
430
431
local char = " "
431
432
local spaces_count = indent_size
432
433
local highlight = nil
433
434
434
- if i > 1 and not skip_marker [i ] or i == level then
435
+ if i > start_level - 1 and not skip_marker [i ] or i == level then
435
436
spaces_count = spaces_count - 1
436
437
char = indent_marker
437
438
highlight = marker_highlight
0 commit comments