syntax: Update syntax elements for jsonnet v0.19.1 (#33) Update the standard library names and add the importbin statement to update the syntax highlighting to jsonnet v0.19.1. The standard library names have been automatically generated with the following command: PROG='std.lines(["syn match Constant \"std.%s\"" % fn for fn in std.objectFieldsAll(std) if fn[0] >= "a" && fn[0] <= "z"])'' go run github.com/google/go-jsonnet/cmd/jsonnet@v0.19.1 --string - <<<"${PROG}"This should make it easier to keep up-to-date with additions to the standard library, as it was missing some rather old additions. Seems to have been rather adhoc. As part of this automation, the builtins and std.jsonnet have been combined as there is no way to determine which names are builtin and which come from std.jsonnet. Manually maintaining the distinction is pointless busywork, and that fell behind anyway as a bunch of std.jsonnet functions have been migrated to builtins for performance reasons. The automation script lists the names in the std object, ignoring all names that do not start with a lower-case letter. This removes some internal names that should not be added to the syntax highlighting. The importbin statement was manually added.
syntax: Update syntax elements for jsonnet v0.19.1 (#33)
Update the standard library names and add the importbin statement to update the syntax highlighting to jsonnet v0.19.1.
importbin
The standard library names have been automatically generated with the following command:
PROG='std.lines(["syn match Constant \"std.%s\"" % fn for fn in std.objectFieldsAll(std) if fn[0] >= "a" && fn[0] <= "z"])'' go run github.com/google/go-jsonnet/cmd/jsonnet@v0.19.1 --string - <<<"${PROG}"
This should make it easier to keep up-to-date with additions to the standard library, as it was missing some rather old additions. Seems to have been rather adhoc.
As part of this automation, the builtins and std.jsonnet have been combined as there is no way to determine which names are builtin and which come from std.jsonnet. Manually maintaining the distinction is pointless busywork, and that fell behind anyway as a bunch of std.jsonnet functions have been migrated to builtins for performance reasons.
std.jsonnet
The automation script lists the names in the std object, ignoring all names that do not start with a lower-case letter. This removes some internal names that should not be added to the syntax highlighting.
std
The importbin statement was manually added.
Jsonnet filetype plugin for Vim.
To install via Vim plugin managers:
Plugin 'google/vim-jsonnet'
Plug 'google/vim-jsonnet'
call dein#add('google/vim-jsonnet')
git clone https://github.com/google/vim-jsonnet ~/.vim/bundle/vim-jsonnet
mkdir ~/.local/share/nvim/site/pack/plugins/start cd ~/.local/share/nvim/site/pack/plugins/start git clone https://github.com/google/vim-jsonnet
For more info on Jsonnet:
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
vim-jsonnet
Jsonnet filetype plugin for Vim.
Install
To install via Vim plugin managers:
Vundle
vim-plug
dein.vim
Pathogen
Neovim with no Package Manager
More Info
For more info on Jsonnet: