tree-sitter-gnuplot 4.0.0

gnuplot grammar for the tree-sitter parsing library
Documentation

tree-sitter-gnuplot

CI codecov npm crates.io PyPI License: MIT PRs Welcome

A tree-sitter grammar for gnuplot 6.x.

Supports .gnuplot, .gp, .plt, .plot, .gnu files. Built with an external scanner for command disambiguation, comprehensive syntax highlighting queries, and 92 corpus tests.

This project is the next evolution of gnuplot.vim, designed for accuracy to gnuplot 6 syntax and long-term maintainability.

Node and field stability

Node type names and field names are the query API: highlights.scm, editor plugins and language servers match on them, and a change that leaves the schema valid can still make an existing query match nothing. Such changes are released as breaking.

Function plots bind their expression to the function field of plot_element. Earlier releases bound it to data, which is now used only for datafile and datablock sources, so a query written as (plot_element data: (function ...)) must become (plot_element function: (function ...)). Both fields already existed, so node-types.json remains backward compatible — only which field the parser populates changed.