31
31
32
32
--- @private
33
33
--- @param suggestion copilotlsp.InlineEdit
34
- --- @return nes.LineCalculationResult
34
+ --- @return copilotlsp. nes.LineCalculationResult
35
35
function M ._calculate_lines (suggestion )
36
36
local deleted_lines_count = suggestion .range [" end" ].line - suggestion .range .start .line
37
37
local added_lines = vim .split (trim_end (suggestion .newText ), " \n " )
@@ -54,7 +54,7 @@ function M._calculate_lines(suggestion)
54
54
-- end
55
55
56
56
-- Calculate positions for delete highlight extmark
57
- --- @type nes.DeleteExtmark
57
+ --- @type copilotlsp. nes.DeleteExtmark
58
58
local delete_extmark = {
59
59
row = suggestion .range .start .line ,
60
60
end_row = (
@@ -64,7 +64,7 @@ function M._calculate_lines(suggestion)
64
64
}
65
65
66
66
-- Calculate positions for virtual lines extmark
67
- --- @type nes.VirtLinesExtmark
67
+ --- @type copilotlsp. nes.AddExtmark
68
68
local virt_lines_extmark = {
69
69
row = (
70
70
suggestion .range [" end" ].character ~= 0 and suggestion .range [" end" ].line
@@ -104,7 +104,7 @@ function M._display_next_suggestion(edits, ns_id)
104
104
if lines .deleted_lines_count > 0 then
105
105
-- Deleted range red highlight
106
106
vim .api .nvim_buf_set_extmark (bufnr , ns_id , lines .delete_extmark .row , 0 , {
107
- hl_group = " NesDelete " ,
107
+ hl_group = " CopilotLspNesDelete " ,
108
108
end_row = lines .delete_extmark .end_row ,
109
109
})
110
110
end
0 commit comments