Repository navigation
Pre-release cleanup: signature/type-comment fixes, respect syntax off and Tree-sitter, opt-in palette, accurate docs - #5
Merged
Conversation
- A bracketed default (x=f(1, 2), x={"k": v}, x=[...]) no longer ends
the parameter list or starts an annotation; later parameters and the
return type keep their type highlighting
- lambda in a default is highlighted as a keyword and its body is not
treated as an annotation
- In "# type: T" only T is highlighted as a type; "# type: ignore[...]"
stays a comment
- Do not load on FileType when 'syntax' is not "python" (:syntax off,
:syntax manual, or Neovim's Tree-sitter highlighter cleared it)
- Remove pythonSelfRef, which duplicated the pythonClassVar keywords and
never matched, and links for groups that were never defined
- Match operators one character at a time instead of a 30-way alternation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NHGQAYx5m3Fs5HUYPdtUWt
- Describe what the built-in syntax actually does with annotations instead of saying -> "breaks" it, and drop "IDE-level" wording - Color table: self/cls use pythonClassVar (colorscheme Identifier); say which groups the palette sets and how to turn it off - Options are read when a buffer's syntax loads, not only before :syntax on - Neovim: the plugin does not load when Tree-sitter highlights Python - Help: fix the manual install (plugged/ is not on 'runtimepath'), broken |pythonBuiltin| link and title underline; add Limitations - Remove ftplugin/python.vim: it only set and unset its own flag Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NHGQAYx5m3Fs5HUYPdtUWt
- g:python_enhanced_colors now defaults to 0: groups keep their standard links so the colorscheme decides; the palette is one line to enable - g:python_enhanced_highlight_all no longer overwrites the individual g:python_highlight_* variables; :PythonSyntaxInfo reports the same values the syntax file uses - Remove the PR labeling workflow and the issue-template config, and shorten the PR template - AUTHORS lists the maintainer and the Vim syntax file this is based on; the syntax file header says so too; drop "ABC-Terminal" - README: one verified example of what counts as a type instead of eight basic code blocks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NHGQAYx5m3Fs5HUYPdtUWt
aaronbcarlisle
marked this pull request as ready for review
September 26, 2026 09:58
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Unresolved issues remain with syntax reloading after syntax off and removal of the private security-report path.
Review effort: Lite
Findings: None
What changed in this PR
Pre-release cleanup for the Python syntax plugin, including highlighting fixes, safer loading behavior, opt-in colors, documentation updates, and repository cleanup.
Changes:
- Fixes highlighting for defaults, lambdas, type comments, and operators.
- Respects disabled syntax and Tree-sitter buffers; makes palette styling opt-in.
- Updates tests, documentation, attribution, and repository files.
| File | Summary |
|---|---|
tests/test_syntax.vim |
Adds syntax regression assertions. |
tests/test_loading.vim |
Tests loading safeguards and configuration. |
tests/test_highlighting.py |
Updates highlighting fixture documentation. |
syntax/python.vim |
Improves Python syntax and highlighting behavior. |
README.md |
Updates usage, colors, limitations, and installation guidance. |
plugin/python-syntax-enhanced.vim |
Adjusts loading, palette, and status behavior. |
ftplugin/python.vim |
Removes the no-op ftplugin. |
doc/python-syntax-enhanced.txt |
Updates help documentation and changelog. |
AUTHORS |
Refreshes attribution. |
.github/workflows/pr-automation.yml |
Removes PR automation workflow. |
.github/pull_request_template.md |
Simplifies the PR template. |
.github/ISSUE_TEMPLATE/config.yml |
Removes issue configuration. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes bugs and inaccurate docs found in a pre-announcement audit, makes the color palette opt-in, and trims boilerplate. Each bug fix has a new assertion that fails on
mainand passes here.Changes
Syntax / plugin
x=f(1, 2),x={"k": v}) ended the parameter list at its), or started an annotation at its:. Later parameters and the return type lost their type highlighting. Brackets in defaults now go throughpythonBracketBlock.key=lambda x: x.namein a default:lambdawas uncolored andx.namewas colored as a type. The lambda is now its own region.# type: int: the wordtypewas colored as a type;# type: ignore[...]coloredignoreas a type. Both are now plain comment text.FileTypewhen'syntax'isn'tpython. Before, it turned highlighting back on after:syntax off, and in Neovim it stacked regex syntax on top of Tree-sitter. Verified with Neovim 0.12.5 and a real tree-sitter-python parser.g:python_enhanced_colorsnow defaults to 0). By default every group only links to a standard group, so the colorscheme decides the colors.g:python_enhanced_highlight_allno longer overwrites the individualg:python_highlight_*variables.:PythonSyntaxInfonow reports the same values the syntax file uses.pythonSelfRef: it duplicated thepythonClassVarkeywords and never matched. Also removed links for groups that were never defined.:syntime.Docs and repo
->); drop "IDE-level"; accurate color table; one verified example instead of eight basic blocks; fix the help's manual install; add Limitations; changelog entries.python.vim; dropped "ABC-Terminal".ftplugin/python.vim(no-op), the PR-labeling workflow and the issue-template config; shortened the PR template.Checklist
tests/test_syntax.vimortests/test_loading.vimthat fail without the changesh tests/run.shpasses (68 + 7 assertions, Vim 9.1 and Neovim 0.12.5)doc/python-syntax-enhanced.txtand its changelog