@@ -495,22 +495,32 @@ module.public = {
495
495
end
496
496
end ,
497
497
498
- multilevel_copied = function (config , bufid , node )
498
+ --- @param node TSNode
499
+ quote_concealed = function (config , bufid , node )
499
500
if not config .icons then
500
501
return
501
502
end
502
- local row_0b , col_0b , len = get_node_position_and_text_length (bufid , node )
503
+
504
+ local lines_count_0b = vim .api .nvim_buf_line_count (bufid ) - 1
505
+
506
+ local prefix = node :named_child (0 )
507
+
508
+ local row_0b , col_0b , len = get_node_position_and_text_length (bufid , prefix )
509
+ local row_last_0b = node :end_ ()
510
+
503
511
local last_icon , last_highlight
504
- for i = 1 , len do
505
- if config .icons [i ] ~= nil then
506
- last_icon = config .icons [i ]
507
- end
508
- if not last_icon then
509
- goto continue
512
+ for line = row_0b , row_last_0b > lines_count_0b and lines_count_0b or row_last_0b do
513
+ for col = 1 , len do
514
+ if config .icons [col ] ~= nil then
515
+ last_icon = config .icons [col ]
516
+ end
517
+ if not last_icon then
518
+ goto continue
519
+ end
520
+ last_highlight = config .highlights [col ] or last_highlight
521
+ set_mark (bufid , line , col_0b + (col - 1 ), last_icon , last_highlight )
522
+ :: continue::
510
523
end
511
- last_highlight = config .highlights [i ] or last_highlight
512
- set_mark (bufid , row_0b , col_0b + (i - 1 ), last_icon , last_highlight )
513
- :: continue::
514
524
end
515
525
end ,
516
526
@@ -730,12 +740,12 @@ module.config.public = {
730
740
quote = {
731
741
icons = { " │" },
732
742
nodes = {
733
- " quote1_prefix " ,
734
- " quote2_prefix " ,
735
- " quote3_prefix " ,
736
- " quote4_prefix " ,
737
- " quote5_prefix " ,
738
- " quote6_prefix " ,
743
+ " quote1 " ,
744
+ " quote2 " ,
745
+ " quote3 " ,
746
+ " quote4 " ,
747
+ " quote5 " ,
748
+ " quote6 " ,
739
749
},
740
750
highlights = {
741
751
" @neorg.quotes.1.prefix" ,
@@ -745,7 +755,7 @@ module.config.public = {
745
755
" @neorg.quotes.5.prefix" ,
746
756
" @neorg.quotes.6.prefix" ,
747
757
},
748
- render = module .public .icon_renderers .multilevel_copied ,
758
+ render = module .public .icon_renderers .quote_concealed ,
749
759
},
750
760
heading = {
751
761
icons = { " ◉" , " ◎" , " ○" , " ✺" , " ▶" , " ⤷" },
0 commit comments