debug completion
This commit is contained in:
parent
bd75f7dd32
commit
9a58c366c6
@ -225,9 +225,8 @@ function M.trigger_completion()
|
||||
local context = {}
|
||||
local cursor_line = line
|
||||
|
||||
-- Add up to 10 previous lines for context
|
||||
local start_line = math.max(1, line - 10)
|
||||
for i = start_line, line - 1 do
|
||||
-- Add all previous lines for context
|
||||
for i = 1, line - 1 do
|
||||
if lines[i] and #lines[i] > 0 then
|
||||
table.insert(context, string.format("L%d: %s", i, lines[i]))
|
||||
end
|
||||
@ -240,9 +239,8 @@ function M.trigger_completion()
|
||||
table.insert(context, cursor_marker)
|
||||
end
|
||||
|
||||
-- Add up to 10 lines after current line
|
||||
local end_line = math.min(#lines, line + 10)
|
||||
for i = line + 1, end_line do
|
||||
-- Add all remaining lines
|
||||
for i = line + 1, #lines do
|
||||
if lines[i] and #lines[i] > 0 then
|
||||
table.insert(context, string.format("L%d: %s", i, lines[i]))
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user