-
Notifications
You must be signed in to change notification settings - Fork 407
RFC: Adopting full syntax support into vimtex #1781
Copy link
Copy link
Closed
Labels
Description
As many may know, vimtex does not provide its own syntax plugin. Instead, it builds on top of the one provided by Dr. Chip which is shipped with both Vim and neovim.
I've started to think about changing this. As a first step, I would adopt the latest version by Dr. Chip and rewrite it in terms of vimtex code style. Through some iterations of improvements, I think this could lead to a reduced workload with respect to maintenance and further development. Pros and cons of the top of my head.
Pros:
- Having full control means we can merge and optimize the implementation.
- Having full control means we can fix issues raised here that are not really vimtex issues.
- Can add more tests for syntax related features to assist in controlled development.
- I may learn more about syntax scripts.
- May be possible to fix some sync related bugs and similar. With time.
- It would mean that vimtex becomes a full filetype plugin in every sense, i.e. no clash with internal plugins.
Cons:
- More work for me.
- More area where there can be failures.
- Would need to consider some cases like whether
g:tex_flavorshould be respected/overwritten and similar. - Unsure about the license of
tex.vimand whether it is OK to "fork" it.
My thoughts for how to do it is something like this:
- Copy latest version.
- Clean up code (non breaking), adapt option names into vimtex schemes (e.g.
g:tex_concealinto something likeg:vimtex_syntax_config = {'conceal': ...}and so on). - Remove some legacy stuff (e.g., I think perhaps things like
g:tex_fastis unnecessary, similar withg:tex_nospelland perhaps alsog:tex_conceal).
In any case, I would be happy to hear other peoples thoughts and opinions on this.
Reactions are currently unavailable