diff options
author | Santos Gallegos <stsewd@protonmail.com> | 2021-02-07 01:10:37 -0500 |
---|---|---|
committer | Santos Gallegos <stsewd@protonmail.com> | 2021-02-07 01:27:38 -0500 |
commit | 947f9a04d45f36dca86ab98d22a9d3e3eaf6fd86 (patch) | |
tree | f46d145223eda6427bfa0be66a78e308b7527dc9 /runtime/lua/vim/treesitter/query.lua | |
parent | b894fbcbe8a0a518753bd47cdc2bb621bf1389d8 (diff) | |
download | rneovim-947f9a04d45f36dca86ab98d22a9d3e3eaf6fd86.tar.gz rneovim-947f9a04d45f36dca86ab98d22a9d3e3eaf6fd86.tar.bz2 rneovim-947f9a04d45f36dca86ab98d22a9d3e3eaf6fd86.zip |
treesitter: small fixes
Mostly typos I found while reading the code.
Diffstat (limited to 'runtime/lua/vim/treesitter/query.lua')
-rw-r--r-- | runtime/lua/vim/treesitter/query.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua index e49f54681d..8b94348994 100644 --- a/runtime/lua/vim/treesitter/query.lua +++ b/runtime/lua/vim/treesitter/query.lua @@ -111,7 +111,7 @@ end --- Gets the text corresponding to a given node -- @param node the node --- @param bufnr the buffer from which the node in extracted. +-- @param bufnr the buffer from which the node is extracted. function M.get_node_text(node, source) local start_row, start_col, start_byte = node:start() local end_row, end_col, end_byte = node:end_() @@ -215,10 +215,10 @@ predicate_handlers["vim-match?"] = predicate_handlers["match?"] local directive_handlers = { ["set!"] = function(_, _, _, pred, metadata) if #pred == 4 then - -- (set! @capture "key" "value") + -- (#set! @capture "key" "value") metadata[pred[2]][pred[3]] = pred[4] else - -- (set! "key" "value") + -- (#set! "key" "value") metadata[pred[2]] = pred[3] end end, @@ -245,7 +245,7 @@ local directive_handlers = { end } ---- Adds a new predicates to be used in queries +--- Adds a new predicate to be used in queries -- -- @param name the name of the predicate, without leading # -- @param handler the handler function to be used @@ -355,10 +355,10 @@ end --- Iterates of the captures of self on a given range. -- --- @param node The node under witch the search will occur +-- @param node The node under which the search will occur -- @param buffer The source buffer to search -- @param start The starting line of the search --- @param stop The stoping line of the search (end-exclusive) +-- @param stop The stopping line of the search (end-exclusive) -- -- @returns The matching capture id -- @returns The captured node @@ -388,12 +388,12 @@ function Query:iter_captures(node, source, start, stop) return iter end ---- Iterates of the matches of self on a given range. +--- Iterates the matches of self on a given range. -- --- @param node The node under witch the search will occur +-- @param node The node under which the search will occur -- @param buffer The source buffer to search -- @param start The starting line of the search --- @param stop The stoping line of the search (end-exclusive) +-- @param stop The stopping line of the search (end-exclusive) -- -- @returns The matching pattern id -- @returns The matching match |