summaryrefslogtreecommitdiffhomepage
path: root/src/blog/nvim-ts/get-parent.diff
blob: 959979295f7b719946804addd800e2cf4da2dedc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 		if node == nil then
 			error('No Tree-Sitter parser found.')
 		end
+
+		while node ~= nil and node:type() ~= 'operation' do
+			node = node:parent()
+		end
+
+		if node ~= nil then
+			-- TODO
+		end
 	end, {
 		buffer = true,
 		noremap = true,