diff options
author | Maria José Solano <majosolano99@gmail.com> | 2023-08-25 11:17:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 13:17:36 -0500 |
commit | 5d8ab32f3871b0232972cac1116ac7cba98389e5 (patch) | |
tree | 6333dd11015b7d863f2ccd1c105524809f9f482d /runtime/doc | |
parent | ecd99e7dd7383b708d9235e5b3d398b0216d65c7 (diff) | |
download | rneovim-5d8ab32f3871b0232972cac1116ac7cba98389e5.tar.gz rneovim-5d8ab32f3871b0232972cac1116ac7cba98389e5.tar.bz2 rneovim-5d8ab32f3871b0232972cac1116ac7cba98389e5.zip |
feat(treesitter): add a query editor (#24703)
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/news.txt | 2 | ||||
-rw-r--r-- | runtime/doc/treesitter.txt | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt index 82b390853c..637a33b555 100644 --- a/runtime/doc/news.txt +++ b/runtime/doc/news.txt @@ -133,6 +133,8 @@ The following new APIs and features were added. `vim.treesitter.language.register`. • The `#set!` directive now supports `injection.self` and `injection.parent` for injecting either the current node's language or the parent LanguageTree's language, respectively. + • Added `vim.treesitter.preview_query()`, for live editing of treesitter + queries. • |vim.ui.open()| opens URIs using the system default handler (macOS `open`, Windows `explorer`, Linux `xdg-open`, etc.) diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index 139b986786..287985f75b 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -676,8 +676,9 @@ inspect_tree({opts}) *vim.treesitter.inspect_tree()* language tree. While in the window, press "a" to toggle display of anonymous nodes, "I" - to toggle the display of the source language of each node, and press - <Enter> to jump to the node under the cursor in the source buffer. + to toggle the display of the source language of each node, "o" to toggle + the query previewer, and press <Enter> to jump to the node under the + cursor in the source buffer. Can also be shown with `:InspectTree`. *:InspectTree* @@ -730,6 +731,11 @@ node_contains({node}, {range}) *vim.treesitter.node_contains()* Return: ~ (boolean) True if the {node} contains the {range} +preview_query() *vim.treesitter.preview_query()* + Open a window for live editing of a treesitter query. + + Can also be shown with `:PreviewQuery`. *:PreviewQuery* + start({bufnr}, {lang}) *vim.treesitter.start()* Starts treesitter highlighting for a buffer |