Tony Mechelynck wrote:
> On Tue, Jan 19, 2021 at 9:53 AM Softwafe Engineer <timsofteng@gmail.com> wrote:
> >
> > Hello. Any plans about improving of syntax highlighting? I've tried treesitter in neovim and it's pretty cool. In other hand vim's regexp solution is not best I suppose.
> >
> > Thanks
>
> IMHO, the Vim way of highlighting syntax gives pretty cool results;
To be fair, supporting tree-sitter seems really nice.
Perhaps it does not need native support but can be implemented
as a plugin, using Vim text properties?
I have not tried tree-sitter yet, but I glanced at at:
https://tree-sitter.github.io/tree-sitter/
https://github.com/nvim-treesitter/nvim-treesitter
It could provide syntax highlighting for several languages,
based on a real parser of each language. In contrast, vim
native syntax highlighting is based on heuristics with regexps.
Vim syntax highlighting works quite well in general despite using
heuristics, but some complex languages are impossible to get
100% right with vim syntax highlighting (e.g. sh, Perl, c++,...).
It's a bit similar to heuristic indexing (ctags, cscope) vs indexing
with clangd, rtags (etc) which have a full parser and are thus 100%
reliable in principle.
Syntax highlighting with tree-sitter may not only be more accurate,
but perhaps faster and we piggy-back on another tool to support
languages.
Regards
Dominique
--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAON-T_iRSZud%2Br7toSYSP%2BDGjsb00WC%3DTR0F4yRbuvR2YjtEyg%40mail.gmail.com.
Tuesday, January 19, 2021
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment