refactor(treesitter): delegate region calculation to treesitter (#22553)

This commit is contained in:
Lewis Russell
2023-03-08 17:22:28 +00:00
committed by GitHub
parent 898f902e00
commit 276b647fdb
6 changed files with 323 additions and 189 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 {}