1
0
forked from aniani/vim

runtime(zig): refactor zig ftplugin, remove auto format

Refactored zig ftplugin, removed upstream comment, aucmd and
auto formatting support. Updated documentation for zig configuration
settings and added new maintainer.

closes: #13803

Signed-off-by: Tiseno <mathias.lindgren@stabelo.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Tiseno
2024-05-21 23:27:03 +02:00
committed by Christian Brabandt
parent b335a9312c
commit d1d9316c66
4 changed files with 50 additions and 138 deletions

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.1. Last change: 2024 Apr 18
*filetype.txt* For Vim version 9.1. Last change: 2024 May 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -889,6 +889,31 @@ The mappings can be disabled with: >
let g:no_vim_maps = 1
ZIG *ft-zig-plugin*
*g:zig_recommended_style*
By default the following indentation options are set, in accordance with Zig's
recommended style (https://ziglang.org/documentation/master/): >
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
<
To disable this behavior, set |g:zig_recommended_style| to 0: >
let g:zig_recommended_style = 0
<
*g:zig_std_dir*
The path to the Zig standard library. The Zig |ftplugin| reads |g:zig_std_dir|
and appends it to the 'path' for Zig files. Where the Zig standard library
is located is system and installation method dependent.
One can automatically set |g:zig_std_dir| using `zig env`: >
let g:zig_std_dir = json_decode(system('zig env'))['std_dir']
<
This can, for example, be put in a FileType |:autocmd| or user |ftplugin| to
only load when a Zig file is opened.
ZIMBU *ft-zimbu-plugin*
The Zimbu filetype plugin defines mappings to move to the start and end of

View File

@@ -7404,6 +7404,7 @@ ft-xml-syntax syntax.txt /*ft-xml-syntax*
ft-xpm-syntax syntax.txt /*ft-xpm-syntax*
ft-yaml-indent indent.txt /*ft-yaml-indent*
ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
ft-zig-plugin filetype.txt /*ft-zig-plugin*
ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin*
ft-zsh-syntax syntax.txt /*ft-zsh-syntax*
ft_ada.txt ft_ada.txt /*ft_ada.txt*
@@ -7702,6 +7703,8 @@ g:vimsyn_maxlines syntax.txt /*g:vimsyn_maxlines*
g:vimsyn_minlines syntax.txt /*g:vimsyn_minlines*
g:vimsyn_noerror syntax.txt /*g:vimsyn_noerror*
g:yaml_schema syntax.txt /*g:yaml_schema*
g:zig_recommended_style filetype.txt /*g:zig_recommended_style*
g:zig_std_dir filetype.txt /*g:zig_std_dir*
g:zipPlugin_ext pi_zip.txt /*g:zipPlugin_ext*
g:zip_exec pi_zip.txt /*g:zip_exec*
g:zip_extractcmd pi_zip.txt /*g:zip_extractcmd*