Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 24, 2025

Removes all legacy VimScript support. Files must start with vim9script declaration or linting fails immediately.

Changes

Linter enforcement

  • Early rejection at lint entry point: checks for vim9script before parsing
  • Allows empty lines and comments before declaration
  • Returns single error on failure, stops all further processing

Rules updated

  • Removed: missing-vim9script-declaration (now enforced upstream)
  • Removed: prefer-def-over-function (legacy functions not supported)
  • Added: no-legacy-function (flags function keyword in vim9script files)

Examples & fixtures

  • Replaced 6 legacy sample files with 3 vim9script examples using proper type annotations
  • Updated test fixtures and integration tests for vim9script-only behavior
  • Removed legacy VimScript test cases

Documentation

  • README, gemspec, and version updated to reflect vim9script-only support
  • Version: 0.4.0 → 0.5.0

Example

Before: Files without vim9script would parse and trigger multiple rule violations

After: Immediate rejection with clear message

legacy.vim:1:1: ERROR: File must start with vim9script declaration. Only vim9script files are supported.

Valid vim9script files continue to lint normally with type annotation checks.

Original prompt

remove all the references to legacy vimscript parsing and support. Make an attempt to update the linter to only be concerned with vim9script

Fully rewrite tests and examples to be vim9script complaint code and nothing else. If the file doesnt start with vim9script an error should occur and parsing should end


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits November 24, 2025 06:35
Co-authored-by: DanBradbury <2555073+DanBradbury@users.noreply.github.com>
Co-authored-by: DanBradbury <2555073+DanBradbury@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove legacy vimscript parsing and update linter for vim9script Convert Vinter to vim9script-only linter Nov 24, 2025
Copilot AI requested a review from DanBradbury November 24, 2025 06:42
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