refactor: use start, and end_ naming for ranges

This commit is contained in:
Oleksandr Smirnov 2025-08-29 19:11:34 +03:00
parent 46725147f7
commit 79562a4ffb
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -65,8 +65,8 @@ end
---@class gopher.TsResult
---@field name string
---@field start_line integer
---@field end_line integer
---@field start integer
---@field end_ integer
---@field is_varstruct boolean
---@param bufnr integer
@ -95,8 +95,8 @@ local function do_stuff(bufnr, parent_type, query)
assert(res.name ~= nil, "No capture name found")
local start_row, _, end_row, _ = parent_node:range()
res["start_line"] = start_row + 1
res["end_line"] = end_row + 1
res["start"] = start_row + 1
res["end_"] = end_row + 1
return res
end

View file

@ -72,7 +72,7 @@ local function handle_tags(fpath, bufnr, range, user_args)
else
if st.is_varstruct then
table.insert(cmd, "-line")
table.insert(cmd, string.format("%d,%d", st.start_line, st.end_line))
table.insert(cmd, string.format("%d,%d", st.start, st.end_))
else
table.insert(cmd, "-struct")
table.insert(cmd, st.name)