diff options
author | Riley Bruins <ribru17@hotmail.com> | 2025-01-28 09:59:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-28 18:59:04 +0100 |
commit | b88874d33c15bb0fd7a421230f8bf819056d7665 (patch) | |
tree | 97b21d11ad7fd8b3fc8a1df828212a84a3bf4798 /runtime/lua/vim/treesitter/query.lua | |
parent | a119dab40f939121d5e5a0c622f19911c9c9ce03 (diff) | |
download | rneovim-b88874d33c15bb0fd7a421230f8bf819056d7665.tar.gz rneovim-b88874d33c15bb0fd7a421230f8bf819056d7665.tar.bz2 rneovim-b88874d33c15bb0fd7a421230f8bf819056d7665.zip |
fix(treesitter): empty queries can disable injections (#31748)
**Problem:** Currently, if users want to efficiently disable injections,
they have to delete the injection query files at their runtime path.
This is because we only check for existence of the files before running
the query over the entire buffer.
**Solution:** Check for existence of query files, *and* that those files
actually have captures. This will allow users to just comment out
existing queries (or better yet, just add their own injection query to
`~/.config/nvim` which contains only comments) to disable running the
query over the entire buffer (a potentially slow operation)
Diffstat (limited to 'runtime/lua/vim/treesitter/query.lua')
0 files changed, 0 insertions, 0 deletions