Comments (8)
- "Mom, can we get more treesitter tests?"
- "We have treesitter tests at home".
from neovim.
This is most definitely because we've switched from iter_captures to iter_matches.
I don't think this is intended. We can add the repro steps as a testcase to prevent this happening again, but I'm surprised our current tests don't capture this in some way.
from neovim.
- "Mom, can we get more treesitter tests?"
- "We have treesitter tests at home".
In that case, would it be worth adding nvim-treesitters CI to Neovim's CI? It would certainly boost coverage.
from neovim.
How did this even work before with iter_captures
? Does ts_query_cursor_next_capture
order iterated nodes based on "specificity"? As far as I can tell, we are not doing anything on the Neovim side to do this ordering. The old highlighter that use iter_captures
just applied extmarks in the exact order returned from the iterator.
from neovim.
It'd also be fine to just not consider specificity anymore, that's totally fine but some queries need to be reworked then (e.g. some of C's highlights) and this should be documented to avoid further confusion
I do think we should do this too and make the order defined in the query the only thing that influences priority. Having two separate metrics that influence priority is confusing. But in the interest of supporting BWC we should still fix this in the meantime.
from neovim.
In that case, would it be worth adding nvim-treesitters CI to Neovim's CI? It would certainly boost coverage.
Actually, I'd claim we should do the converse: add a treesitter highlight test suite (mirroring tree-sitter test
, but using our highlighter instead of the Rust crate -- either tree-sitter's or theHamsta's) exercising the bundled queries and expose it in a way that nvim-treesitter can steal leverage.
from neovim.
How did this even work before with iter_captures
iter_captures return the results based on the order of a node in the tree, so the outer appears before the inner and so on
from neovim.
The repro in the OP actually caused the highlighter to error when I added it as a testcase. Haven't got time to debug, but using iter_captures
as before works fine.
from neovim.
Related Issues (20)
- New colorscheme breaks syntax highlighting of keywords HOT 3
- nvim via flake in contrib/flake.nix broken, master and nightly HOT 4
- Ability to switch to the old Neovim color scheme HOT 6
- Neovim Qt is is not included in the Neovim `0.10.0` stable release for Windows HOT 2
- With ext_cmdline activated the buffer used for incsearch and command-preview is not the last buffer before entering cmdline_mode HOT 5
- Priorotise ambiguous ex commands HOT 1
- Colors initialized incorrectly on startup (TERM and termguicolors set correctly) HOT 2
- Commenting is too restrictive for toggling uncomment HOT 19
- autocmd only works once after upgrade to 0.10.0 HOT 2
- feedkeys with esc no behaving as expected in cmdline mode HOT 1
- Disable built-in formatting for zig HOT 11
- Let `mksession` preserve and/or `nvim -S` respect buffer ordering
- asynchronous :make, :grep, etc HOT 4
- When closing neovim "Pending mode change to already current mode (0) requested. Either pending mode expired or there is an application bug."
- systemlist generates errors when buffer number is passed and command expects stdin HOT 5
- Way to test neovim plugin on github CI / avoid hit enter to continue after message HOT 2
- Unable to build from latest git HOT 2
- neovim hang at rpcrequest when use vim.iter in decoration_provider on_win HOT 2
- [refactor] create types and format modules HOT 1
- Syntax highlighting can't be disabled HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neovim.