@@ -28,20 +28,20 @@ M.render = function(namespace, root, buf)
28
28
local background = list .clamp_last (highlights .heading .backgrounds , level )
29
29
local foreground = list .clamp_last (highlights .heading .foregrounds , level )
30
30
31
- local virt_text = { string.rep (' ' , padding ) .. heading , { foreground , background } }
31
+ local heading_text = { string.rep (' ' , padding ) .. heading , { foreground , background } }
32
32
vim .api .nvim_buf_set_extmark (buf , namespace , start_row , 0 , {
33
33
end_row = end_row + 1 ,
34
34
end_col = 0 ,
35
35
hl_group = background ,
36
- virt_text = { virt_text },
36
+ virt_text = { heading_text },
37
37
virt_text_pos = ' overlay' ,
38
38
hl_eol = true ,
39
39
})
40
40
elseif capture == ' dash' then
41
41
local width = vim .api .nvim_win_get_width (util .buf_to_win (buf ))
42
- local virt_text = { state .config .dash :rep (width ), highlights .dash }
42
+ local dash_text = { state .config .dash :rep (width ), highlights .dash }
43
43
vim .api .nvim_buf_set_extmark (buf , namespace , start_row , 0 , {
44
- virt_text = { virt_text },
44
+ virt_text = { dash_text },
45
45
virt_text_pos = ' overlay' ,
46
46
})
47
47
elseif capture == ' code' then
@@ -67,11 +67,11 @@ M.render = function(namespace, root, buf)
67
67
local level = M .calculate_list_level (node )
68
68
local bullet = list .cycle (state .config .bullets , level )
69
69
70
- local virt_text = { string.rep (' ' , leading_spaces or 0 ) .. bullet , highlights .bullet }
70
+ local list_marker_text = { string.rep (' ' , leading_spaces or 0 ) .. bullet , highlights .bullet }
71
71
vim .api .nvim_buf_set_extmark (buf , namespace , start_row , start_col , {
72
72
end_row = end_row ,
73
73
end_col = end_col ,
74
- virt_text = { virt_text },
74
+ virt_text = { list_marker_text },
75
75
virt_text_pos = ' overlay' ,
76
76
})
77
77
end
@@ -86,11 +86,11 @@ M.render = function(namespace, root, buf)
86
86
end
87
87
end
88
88
89
- local virt_text = { value :gsub (' >' , state .config .quote ), highlight }
89
+ local quote_marker_text = { value :gsub (' >' , state .config .quote ), highlight }
90
90
vim .api .nvim_buf_set_extmark (buf , namespace , start_row , start_col , {
91
91
end_row = end_row ,
92
92
end_col = end_col ,
93
- virt_text = { virt_text },
93
+ virt_text = { quote_marker_text },
94
94
virt_text_pos = ' overlay' ,
95
95
})
96
96
elseif vim .tbl_contains ({ ' checkbox_unchecked' , ' checkbox_checked' }, capture ) then
@@ -103,11 +103,11 @@ M.render = function(namespace, root, buf)
103
103
local padding = vim .fn .strdisplaywidth (value ) - vim .fn .strdisplaywidth (checkbox )
104
104
105
105
if padding >= 0 then
106
- local virt_text = { string.rep (' ' , padding ) .. checkbox , highlight }
106
+ local checkbox_text = { string.rep (' ' , padding ) .. checkbox , highlight }
107
107
vim .api .nvim_buf_set_extmark (buf , namespace , start_row , start_col , {
108
108
end_row = end_row ,
109
109
end_col = end_col ,
110
- virt_text = { virt_text },
110
+ virt_text = { checkbox_text },
111
111
virt_text_pos = ' overlay' ,
112
112
})
113
113
end
@@ -152,11 +152,11 @@ M.render = function(namespace, root, buf)
152
152
highlight = highlights .table .row
153
153
end
154
154
155
- local virt_text = { row , highlight }
155
+ local table_row_text = { row , highlight }
156
156
vim .api .nvim_buf_set_extmark (buf , namespace , start_row , start_col , {
157
157
end_row = end_row ,
158
158
end_col = end_col ,
159
- virt_text = { virt_text },
159
+ virt_text = { table_row_text },
160
160
virt_text_pos = ' overlay' ,
161
161
})
162
162
end
0 commit comments