diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2023-09-20 04:15:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-20 04:15:23 -0700 |
commit | 1b55f51d0d8468ca357514a868ac8e188b0c8722 (patch) | |
tree | 7212864dc2bcaa4ff2e6123620d6596692826509 /runtime/lua/vim/treesitter/query.lua | |
parent | 50d5fcc0bc1a3a67b9c3cc7066d97593ea3cc22d (diff) | |
download | rneovim-1b55f51d0d8468ca357514a868ac8e188b0c8722.tar.gz rneovim-1b55f51d0d8468ca357514a868ac8e188b0c8722.tar.bz2 rneovim-1b55f51d0d8468ca357514a868ac8e188b0c8722.zip |
docs: misc #24561
fix #24699
fix #25253
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) |