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