refactor(treesitter): use byte ranges from treesitter (#22589)

This commit is contained in:
Lewis Russell
2023-03-09 16:09:39 +00:00
committed by GitHub
parent 64d3f68c07
commit ae263aff95
6 changed files with 337 additions and 191 deletions

View File

@@ -277,6 +277,7 @@ end
---@return (string[]|string|nil)
function M.get_node_text(node, source, opts)
opts = opts or {}
-- TODO(lewis6991): concat only works when source is number.
local concat = vim.F.if_nil(opts.concat, true)
local metadata = opts.metadata or {}