> There are alternatives, but all of them are compromises.
> - Make the matchadd() stuff faster somehow.
> - Add highlighting bound to marks (probably also requires updating the
>   column of marks, which is expensive).
> - Integrate with syntax highlighting (keep state per line).
> 
> I would think the syntax highlighting solution currently works best,
> since it has been optimized to cache state.

Yes, It would be great to have something with performance of syntax 
highlighting and interface of matchaddpos().

I am extracting semantic token information from clang and it ideally fits with 
the matchaddpos() interface. Token position gathered from clang simplified 
looks like [(start_line, start_col), (end_line, end_col)], where end_col points 
to the next column right after the tokens end (like C++ container.end()) and 
columns are byte columns, so call to matchaddpos('TokenType', [[start_line, 
start_col, end_col - start_col]], 1) does the job (for the single line tokens 
of course).

Another must have for semantic highlighting is knowledge of the dirty regions 
where tokens need to be updated. Clang interface allows to extract tokens for 
the specific ranges. And for the small ranges it is blazingly fast.

Multiline tokens are nice to have, but not crucial, since they can be 
represented by multiple single line tokens.

https://github.com/davits/DyeVim Here is the highlighting plugin.

Regards,
Davit Samvelyan.

And I am willing to help by any means necessary.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui