Fix _node_text

Signed-off-by: Micah Halter <micah@balena.io>
This commit is contained in:
Micah Halter
2022-04-19 08:52:34 -04:00
parent af894203cf
commit 366a72009a

View File

@@ -135,10 +135,7 @@ end
local function _node_text(node, bufnr)
local text = vim.treesitter.query.get_node_text(node, bufnr)
if type(text) == "table" then
text = text[1]
end
return text
return text:match("(%S+).*")
end
--- Fill in a match result based on a seed node