diff options
Diffstat (limited to 'runtime/lua/vim/treesitter/query.lua')
-rw-r--r-- | runtime/lua/vim/treesitter/query.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/lua/vim/treesitter/query.lua b/runtime/lua/vim/treesitter/query.lua index 44ed37d64e..313d837d5c 100644 --- a/runtime/lua/vim/treesitter/query.lua +++ b/runtime/lua/vim/treesitter/query.lua @@ -843,11 +843,13 @@ function M.omnifunc(findstart, base) return require('vim.treesitter._query_linter').omnifunc(findstart, base) end ---- Open a window for live editing of a treesitter query. +--- Opens a live editor to query the buffer you started from. --- ---- Can also be shown with `:EditQuery`. *:EditQuery* +--- Can also be shown with *:EditQuery*. --- ---- Note that the editor opens a scratch buffer, and so queries aren't persisted on disk. +--- If you move the cursor to a capture name ("@foo"), text matching the capture is highlighted in +--- the source buffer. The query editor is a scratch buffer, use `:write` to save it. You can find +--- example queries at `$VIMRUNTIME/queries/`. --- --- @param lang? string language to open the query editor for. If omitted, inferred from the current buffer's filetype. function M.edit(lang) |