sponsor Vim development Vim logo Vim Book Ad

VPE-Syntax : Tree-sitter and text propery based syntax highlighting.

 script karma  Rating 4/1, Downloaded by 393  Comments, bugs, improvements  Vim wiki

created by
Paul Ollis
 
script type
utility
 
description
Significant changes for version 0.2

  - This version uses version 0.2 of VPE-Sitter, which has a work around to
    provide greatly increased stability - I have not seen any message up
    highlighting.

  - Support for users to add languages. See:

        https://vpe-syntax.readthedocs.io/en/latest/guide/adding_a_language.html

    for a tutorial.

  - Some minimal, initial documentation:

        https://vpe-syntax.readthedocs.io/en/latest/

  - A colour scheme editor - started using the command "Synsit tweak" - to help
    in developing extended colour schemes for VPE-Syntax highlighting.

  See https://github.com/paul-ollis/vpe_syntax/blob/v0.2/README.rst for some
  more details, including screenshot and screen-cast of the colour scheme
  editor.

Requirements

  VPE-Syntax requires a minimum of Vim 9 and Python 3.11

  VPE-Syntax has only been tested on Linux and Windows.

What it is all about

  This is a Vim Python plugin that is implemented on top of VPE, see:

      https://www.vim.org/scripts/script.php?script_id=5905

  It provides text property based syntax highlighting using Tree-sitter to
  rapidly parse your code. Please see the README at:
  https://github.com/paul-ollis/vpe_syntax for additional notes.

Status

  This is an alpha release that only provides support files to highlight Python
  and C code. It is in some ways a prototype, but I am using day-to-day for
  Python code.

  Documentation is much needed, which will probably be the main focus of the
  next release.

Tree-sitter and Vim

  Tree-sitter is a relatively new library specifically designed to provide code
  parsing that is fast enough to be used as the basis of editor tooling. See::

    https://tree-sitter.github.io/tree-sitter/

  Tree-sitter has been discussed as a possible way to overcome certain
  limitations of Vim's built-in sytax highlighting mechanism
  (https://github.com/vim/vim/issues/9087). While NeoVim has made strides in
  this area, a native Vim implementation still seems some way off.

  In the meantime, this plugin may provide a way for Vim users to experience the
  improvements possible with a Tree-sitter approach. It has been designed to be
  performant - the current version seems to handle files of around 25,000 lines
  well. It can even handle the 262,858 line sqlite3.c file referred to the above
  issue 9087. On my PC it takes about 4 seconds to initially highlight the
  entire file, but Vim remains responsive at all times.

  Improvements in scalability may be made in future releases.

Source code

  The source code is hosted at https://github.com/paul-ollis/vpe_syntax.
  You can raise bugs or feature requests there. Pull requests are also welcome.
 
install details
The download provides a Python installation script that automates installation. See the README in the download for instructions.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vpe-syntax-0.2.0.zip 0.2 2025-10-15 9.0 Paul Ollis Stable highlighting, colour scheme editor.
vpe-syntax-0.1.1.zip 0.1.1 2025-09-11 9.0 Paul Ollis This download now provides a Python installation script.
vpe-syntax-stub-0.1.0.zip 0.1.0 2025-09-10 9.0 Paul Ollis Initial upload
ip used for rating: 216.73.216.44

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github