Skip to content

Conversation

@DanBradbury
Copy link

@DanBradbury DanBradbury commented Jan 14, 2026

Adds vim9 script as a new language.

Description

Since the syntax is quite different from legacy vimscript I've added this as a new language and added a heuristic since all vim9 script files must start with vim9script on the first line. This allows for clear detection of vim and vim9script within repos

While there are not 100+ repos using vim9script I believe a large reason for the lack of adoption is the lack of syntax highlighting support that makes some of our efforts to use modern vimscript harder for new plugin writers.

97.40%  40549      Vim9 Script
1.25%   521        Vim Script
0.77%   320        Dockerfile
0.58%   242        Shell

Dockerfile:
  .devcontainer/Dockerfile

Vim Script:
  .devcontainer/init.vim
  .devcontainer/vimrc

Shell:
  .devcontainer/setup.sh
  move.sh
  run-tests.sh

Vim9 Script:
  autoload/copilot_chat.vim
  autoload/copilot_chat/api.vim
  autoload/copilot_chat/auth.vim
  autoload/copilot_chat/buffer.vim
  autoload/copilot_chat/config.vim
  autoload/copilot_chat/debug.vim
  autoload/copilot_chat/history.vim
  autoload/copilot_chat/models.vim
  ftplugin/copilot_chat.vim
  plugin/copilot_chat.vim
  syntax/copilot_chat.vim

Checklist:

@DanBradbury DanBradbury requested a review from a team as a code owner January 14, 2026 08:09
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

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

The test failures indicate you've not followed the instructions in the CONTRIBUTING.md file for adding a language and grammar. Please do so.

While there are not 100+ repos using vim9script I believe a large reason for the lack of adoption is the lack of syntax highlighting support that makes some of our efforts to use modern vimscript harder for new plugin writers.

I can't help but feel this PR is a very premature. You're barely over 100 .vim files which is a long way from our requirements (see the issue linked in the CONTRIBUTING.md file) and there are only 2 .vim9 files. All extensions must meet our usage requirements before a PR can be merged.

@DanBradbury
Copy link
Author

DanBradbury commented Jan 14, 2026

@lildude RE popularity; I'm wondering if the search feature isn't working correctly since the results don't show a single one of my own plugins or files that are written in vim9 script. I also don't see many plugins that are a part of the awesome-vim9 list (77 repos on that list alone which doesnt match the Repo count shown either).

Very possible I messed up the query last night when opening the PR


To add additional context for my thinking on search being broken.

I have a repo https://github.com/DanBradbury/copilot-chat.vim that is not a fork and includes vim9 script files in the default branch.. however with the default search none of my files show up in the query.

If I add an additional param to include the repo itself then I get 11 file results (see https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.vim+vim9script+repo%3ADanBradbury%2Fcopilot-chat.vim+)

When doing a cursory look on the files pulled up I'm not seeing a lot of repos from awesome-vim9 that I know are valid vim9 script plugins that are not forks. The reason I'm so familiar with these repos is because of my work on a vim9 linter where I test against these repos (https://github.com/DanBradbury/vinter/blob/main/vinter_report.md)

@DanBradbury DanBradbury requested a review from lildude January 14, 2026 17:08
@DanBradbury
Copy link
Author

@lildude - I tried my best to address your comments + include another advanced.vim in samples. If there are more files required I'm happy to continue adding more vim9 script samples (can breakdown by features if that helps)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants