Skip to content

Add support for vim9script, update docs for Vim 9.2 and Neovim 0.12#101

Open
mmrwoods wants to merge 8 commits intoiamcco:masterfrom
mmrwoods:vim9
Open

Add support for vim9script, update docs for Vim 9.2 and Neovim 0.12#101
mmrwoods wants to merge 8 commits intoiamcco:masterfrom
mmrwoods:vim9

Conversation

@mmrwoods
Copy link
Copy Markdown

@mmrwoods mmrwoods commented Apr 13, 2026

Hi,

This PR adds some support for vim9 script, updates the build-docs script to work in recent Vim and Neovim versions, and re-generates the docs from Vim 9.2.0340 and Neovim 0.12.0-196 (with Vim's docs taking precedence).

The vim9script support comes from a fork of vimlparser that adds basic support for vim9script
See vim-jp/vim-vimlparser#205
And https://github.com/sideshowbarker/vim-vimlparser/tree/vim9script-support

While it may not be perfect, this is a great improvement, thanks @sideshowbarker ❤️

A more comprehensive solution is under development, but not yet ready
See vim-jp/vim-vimlparser#204
And https://github.com/vim-jp/vim-vim9parser

The more comprehensive solution can be incorporated later, replacing the fork, once ready.

I've also added a .node-version file to make it clear that Node 16 or --openssl-legacy-provider is currently required.

There is more to do here, for example this PR does not yet fix function completion in vim9script without :call, but I wanted to get a PR open for review to get some feedback.

Resolves #78, resolves #86

Please let me know what you think 😄

mmrwoods added 8 commits April 9, 2026 12:46
Node version 16 or --openssl-legacy-provider required to avoid error:

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:101:19)
    at Object.createHash (node:crypto:145:10)
    at BulkUpdateDecorator.hashFactory (/Users/mwoods/code/vim-language-server/node_modules/webpack/lib/util/createHash.js:144:18)
    at BulkUpdateDecorator.update (/Users/mwoods/code/vim-language-server/node_modules/webpack/lib/util/createHash.js:46:50)
    at RawSource.updateHash (/Users/mwoods/code/vim-language-server/node_modules/webpack-sources/lib/RawSource.js:64:8)
    at NormalModule._initBuildHash (/Users/mwoods/code/vim-language-server/node_modules/webpack/lib/NormalModule.js:838:17)
    at handleParseResult (/Users/mwoods/code/vim-language-server/node_modules/webpack/lib/NormalModule.js:903:10)
    at /Users/mwoods/code/vim-language-server/node_modules/webpack/lib/NormalModule.js:994:4
    at processResult (/Users/mwoods/code/vim-language-server/node_modules/webpack/lib/NormalModule.js:717:11)
    at /Users/mwoods/code/vim-language-server/node_modules/webpack/lib/NormalModule.js:777:5 {
  opensslErrorStack: [
    'error:03000086:digital envelope routines::initialization error',
    'error:0308010C:digital envelope routines::unsupported'
  ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Proper fix is to upgrade dependencies, but one step at a time
Fails on Neovim 0.12 as many doc files have been removed or renamed
Builtin functions were split out from eval.txt in Vim 8.2.3917
From a fork of vimlparser that adds basic support for vim9script
See vim-jp/vim-vimlparser#205
And https://github.com/sideshowbarker/vim-vimlparser/tree/vim9script-support

While not perfect, this is a great improvement, thanks @sideshowbarker

A more comprehensive solution is under development, but not yet ready
See vim-jp/vim-vimlparser#204
And https://github.com/vim-jp/vim-vim9parser
Builtin features docs were split out from eval.txt in Vim 8.2.3917
Regex would match unwanted lines, e.g. would match both of these lines

win32			Win32 version of Vim (MS-Windows 95 and later, 32 or
			64 bits)

Leading to both "win32" and separately "64" being added as features
Using locally cloned Vim at v9.2.0340 and Neovim at v0.12.0-196

Docs from both runtimes are included, with Vim's taking precedence, by
running the build-docs.ts script with two args, one for each runtime:

ts-node src/script/build-docs.ts ~/code/neovim/runtime ~/code/vim/runtime
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.

Doesn't recognice def as functions vim9script, functions calls without :call

1 participant