feat(treesitter): add lang parameter to the query editor (#25181)

This commit is contained in:
Maria José Solano
2023-09-16 10:05:59 -07:00
committed by GitHub
parent 7e5ce42977
commit 28f54a7878
4 changed files with 20 additions and 13 deletions

View File

@@ -848,8 +848,10 @@ end
--- 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()
---
--- @param lang? string language to open the query editor for. If omitted, inferred from the current buffer's filetype.
function M.edit(lang)
require('vim.treesitter.dev').edit_query(lang)
end
return M