aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorMaria José Solano <majosolano99@gmail.com>2023-09-15 03:10:55 -0700
committerGitHub <noreply@github.com>2023-09-15 03:10:55 -0700
commit28233bcb49067aaa70fa6e5fec14e2cc4bcaa315 (patch)
tree5e2185b09159cba8b962d3bc0453891ddc05c117 /runtime/doc
parent2d9e7a33f41c842521c74d45927cfcb1874c711b (diff)
downloadrneovim-28233bcb49067aaa70fa6e5fec14e2cc4bcaa315.tar.gz
rneovim-28233bcb49067aaa70fa6e5fec14e2cc4bcaa315.tar.bz2
rneovim-28233bcb49067aaa70fa6e5fec14e2cc4bcaa315.zip
refactor(treesitter): rename "preview" => "edit" #25161
"Edit" more closely describes the generic application than "Preview", though the buffer contents don't (yet) map to an actual file on disk. https://github.com/neovim/neovim/pull/24703#discussion_r1321719133
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/news.txt2
-rw-r--r--runtime/doc/treesitter.txt17
2 files changed, 11 insertions, 8 deletions
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 9adc90ac21..0162a99619 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -135,7 +135,7 @@ 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
+ • Added `vim.treesitter.query.edit()`, for live editing of treesitter
queries.
• Improved error messages for query parsing.
diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt
index c62e210be1..64b4ca7ca2 100644
--- a/runtime/doc/treesitter.txt
+++ b/runtime/doc/treesitter.txt
@@ -676,8 +676,8 @@ inspect_tree({opts}) *vim.treesitter.inspect_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, "o" to toggle
- the query previewer, and press <Enter> to jump to the node under the
- cursor in the source buffer.
+ the query editor, and press <Enter> to jump to the node under the cursor
+ in the source buffer.
Can also be shown with `:InspectTree`. *:InspectTree*
@@ -730,11 +730,6 @@ 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
@@ -858,6 +853,14 @@ add_predicate({name}, {handler}, {force})
meanings
• {force} (boolean|nil)
+edit() *vim.treesitter.query.edit()*
+ Open a window for live editing of a treesitter query.
+
+ Can also be shown with `:EditQuery`. *:EditQuery*
+
+ Note that the editor opens a scratch buffer, and so queries aren't
+ persisted on disk.
+
get({lang}, {query_name}) *vim.treesitter.query.get()*
Returns the runtime query {query_name} for {lang}.