New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(treesitter): rename query previewer to query editor #25161
Conversation
Maybe add a note to the doc string about the current limitations (only a "scratch query" for now)? |
Also, I just noticed a limitation of the current query editor: it does not play nicely with injected languages -- for example, you cannot test Is it possible to add an optional argument to override the language for which the query editor is opened? |
@clason as of today the query editor will use the parser from the filetype of the “base buffer” (the one from where the inspector was opened if the editor was toggled, or the source buffer if just using the |
I'd say just specify the parser; no need for filetype lookups. And no need to add that to the command; an advanced feature like that is fine to reserve for the Lua function.
Sure :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up on this!
"Edit" more closely describes the generic application than "Preview", though the buffer contents don't (yet) map to an actual file on disk. neovim#24703 (comment)
As agreed in #24703 (comment).