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
This commit is contained in:
Maria José Solano
2023-09-15 03:10:55 -07:00
committed by GitHub
parent 2d9e7a33f4
commit 28233bcb49
6 changed files with 48 additions and 43 deletions

View File

@@ -835,4 +835,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.
---
--- Can also be shown with `:EditQuery`. *:EditQuery*
---
--- Note that the editor opens a scratch buffer, and so queries aren't persisted on disk.
function M.edit()
require('vim.treesitter.dev').edit_query()
end
return M