Comments (6)
Because it uses the Treesitter AST, my expectation is matchup#ts_syntax#skip_expr would be very fast. (At least faster than vim syntax highlighting.) Maybe there is something wrong in the way it's computed or cached.
Can you provide a sample C file which has the issue?
from vim-matchup.
src/nvim/regexp_nfa.c
in Nvim source code.
from vim-matchup.
I may have made a mistake when testing this. It seems that when I fully enable matchup treesitter support (matchup = { enable = true }
), vim-matchup freezes Nvim every time viewport scrolls by a screen. However, if I disable that (matchup = { enable = false }
), vim-matchup only freezes the first time I stop cursor on a curly brace and is fast afterwards. This is probably not needed then.
from vim-matchup.
from vim-matchup.
I see a huge amount of lag in regexp_nfa.c when scrolling but it doesn't seem to be caused by ts syntax skip but instead this call to get_active_nodes
When I comment this line out the lag disappears. What I don't understand is that get_active_nodes is gated behind ts_utils.memoize_by_buf_tick
Yet when scrolling it seems to be called again and again, even if the buffer hasn't changed.
from vim-matchup.
Had this same issue but in Lua files, when moving cursor up/down and hitting a bracked it would freeze the editor for a bit (on a very beefy machine), fixed by disabling the plugin. Might be a Neovim issue, disabled Navic as well for the same reason.
from vim-matchup.
Related Issues (20)
- Feature request: disable closing hint HOT 3
- offscreen doesn't display
- Wrong matching across strings HOT 2
- Crash when shell case is incomplete
- Matchup adding random characters on the beginning of the buffer. HOT 8
- clarification about lazy loading on keys HOT 6
- Incompatibility with nvim-cmp snippet completion HOT 8
- Matching string and char delimeters HOT 2
- how to activate ruby's `|` delimeter for block arguments HOT 4
- MatchParen(Cur) Highlight persists in virtual fold text
- invalid node type for language perl
- invalid node type for language bash HOT 5
- Svelte error was reported after treesitter's commit of svelte parsing HOT 4
- Quotes support for VIM HOT 1
- C++ bracket mistmatch with literal character
- Unexpected `]%` behaviour
- Documentation on how to add Treesitter support for a custom language HOT 2
- 'Invalid node type "where"' error in Haskell files HOT 2
- Invalid treesitter nodes with Haskell HOT 1
- Recent errors showing up HOT 1
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 vim-matchup.