feat: incremental highlight #111
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
barrettruth/diffs.nvim#111
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Prerequisites
Problem
I notice treesitter hl make thing a bit slow on large file. (when there's hundred of hunks/injections)
I make a branch to highlight only on-screen content first: https://github.com/phanen/diffs.nvim/tree/faster
But it have a bit flicker. But maybe worth exploration.
Proposed solution
.
Alternatives considered
.
closes #108
@phanen hm. obviously, fantastic idea. do you think the flicker is genuinely avoidable in any way?
Throw some ideas at me. May be worth considering before we implement such solution.
Not sure. iirc
nvim_set_decoration_provider()is also used for builtin semantic token/builtin treesitter implementation, but both they have flicker issue, just more or less. We can reduce it as much as possible I think, will explore when I have more time.Actually the main issue I want to resolve is it's slow on enter the fugitive diff buffer (highlight is called 3 times for me (in different autocmd), each time cost ~500ms).
... when I frequently navigate between alternate file (
:e #, even with:b #), the block is also frequent.Thanks. Not surprised as I was definitely just iterating on this and making sure things are highlighted as a baseline. I edited your issue to close #108 (since, well, it ought to).