Skip to content

fix: syntax and ftplugin fixes - #24

Merged
dpezto merged 12 commits into
mainfrom
fix/codex-audit
Oct 10, 2026
Merged

dpezto merged 12 commits into
mainfrom
fix/codex-audit

Conversation

@dpezto

@dpezto dpezto commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Syntax and ftplugin fixes checked against gnuplot 6.0.5, plus a test runner that fails on script errors. Each commit fixes one issue and carries its regression test.

  • test: fail the runner on Vim script errors
  • fix(syntax): sync from the start of the file
  • fix(syntax): end datablocks where gnuplot does
  • fix(syntax): open datablocks that follow another command
  • fix(syntax): continue comments across a trailing backslash
  • fix(syntax): close unterminated strings at the end of the line
  • fix(syntax): keep the dot in .5 and 1. inside the number
  • fix(syntax): highlight calls with a space before the parenthesis
  • fix(ftplugin): stop pairing < and > for %
  • docs: drop the matchpairs setting from the ftplugin docs
  • test: remove a duplicated if assertion

nvim --headless -u NONE -S tests/run.vim passes on the final commit.

dpezto added 11 commits October 10, 2026 07:56
A script error skipped its assertion without touching v:errors, so the
runner printed ok and nvim exited 0.
Without a sync rule, jumping into a long datablock highlighted its lines as
commands. Datablocks have no length limit, so only fromstart is correct.
gnuplot closes a datablock on the first line that starts with the terminator
in column one, so an indented EOD is data and EODxyz ends the block.
gnuplot accepts `print 1; $d << EOD`, and function blocks use the same
header, so the start pattern no longer needs to begin the line.
The greedy match could drop the continuation, so the next line was
highlighted as code although gnuplot treats it as part of the comment.
gnuplot ends an unclosed string at the end of the line unless a trailing
backslash continues it, so the next command no longer reads as a string.
The dot operator took the dot in both forms. gnuplot reads a dot before a
digit as the start of a number and accepts a trailing dot.
gnuplot runs `sin (0)` fine, but the function patterns required the
parenthesis right after the name.
They are comparison operators in gnuplot, so % jumped between unrelated
comparisons. Square brackets are already in the default matchpairs.
The ftplugin no longer adds <:> to matchpairs, so the README and help no longer list it.
Copilot AI balanced review requested due to automatic review settings October 10, 2026 15:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dpezto
dpezto merged commit 077495d into main Oct 10, 2026
13 checks passed
@dpezto
dpezto deleted the fix/codex-audit branch October 10, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants