|
3 | 3 | helpname: 'filetype'
|
4 | 4 | ---
|
5 | 5 | <div id='vimCodeElement'>
|
6 |
| -<a class="Constant" href="filetype.html" name="filetype.txt">filetype.txt</a> For <span class="Identifier">Vim version 9.1.</span> Last change: 2024 Apr 18<br> |
| 6 | +<a class="Constant" href="filetype.html" name="filetype.txt">filetype.txt</a> For <span class="Identifier">Vim version 9.1.</span> Last change: 2024 May 21<br> |
7 | 7 | <br>
|
8 | 8 | <br>
|
9 | 9 | <span class="Identifier">VIM REFERENCE MANUAL by Bram Moolenaar</span><br>
|
|
894 | 894 | <div class="helpExample"> let g:no_vim_maps = 1</div>
|
895 | 895 | <br>
|
896 | 896 | <br>
|
| 897 | +<span class="Statement">ZIG </span><a class="Constant" href="filetype.html#ft-zig-plugin" name="ft-zig-plugin">ft-zig-plugin</a><br> |
| 898 | +<br> |
| 899 | + <a class="Constant" href="filetype.html#g:zig_recommended_style" name="g:zig_recommended_style">g:zig_recommended_style</a><br> |
| 900 | +By default the following indentation options are set, in accordance with Zig's<br> |
| 901 | +recommended style (<span class="Constant"><a href="https://ziglang.org/documentation/master/">https://ziglang.org/documentation/master/</a></span>):<br> |
| 902 | +<br> |
| 903 | +<div class="helpExample"> setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8</div> |
| 904 | +<br> |
| 905 | +To disable this behavior, set <a class="Identifier" href="filetype.html#g:zig_recommended_style">g:zig_recommended_style</a> to 0:<br> |
| 906 | +<br> |
| 907 | +<div class="helpExample"> let g:zig_recommended_style = 0</div> |
| 908 | +<br> |
| 909 | + <a class="Constant" href="filetype.html#g:zig_std_dir" name="g:zig_std_dir">g:zig_std_dir</a><br> |
| 910 | +The path to the Zig standard library. The Zig <a class="Identifier" href="usr_51.html#ftplugin">ftplugin</a> reads <a class="Identifier" href="filetype.html#g:zig_std_dir">g:zig_std_dir</a><br> |
| 911 | +and appends it to the <a class="Type" href="options.html#'path'">'path'</a> for Zig files. Where the Zig standard library<br> |
| 912 | +is located is system and installation method dependent.<br> |
| 913 | +<br> |
| 914 | +One can automatically set <a class="Identifier" href="filetype.html#g:zig_std_dir">g:zig_std_dir</a> using <span class="Comment">zig env</span>:<br> |
| 915 | +<br> |
| 916 | +<div class="helpExample"> let g:zig_std_dir = json_decode(system('zig env'))['std_dir']</div> |
| 917 | +<br> |
| 918 | +This can, for example, be put in a FileType <a class="Identifier" href="autocmd.html#:autocmd">:autocmd</a> or user <a class="Identifier" href="usr_51.html#ftplugin">ftplugin</a> to<br> |
| 919 | +only load when a Zig file is opened.<br> |
| 920 | +<br> |
| 921 | +<br> |
897 | 922 | <span class="Statement">ZIMBU </span><a class="Constant" href="filetype.html#ft-zimbu-plugin" name="ft-zimbu-plugin">ft-zimbu-plugin</a><br>
|
898 | 923 | <br>
|
899 | 924 | The Zimbu filetype plugin defines mappings to move to the start and end of<br>
|
|
0 commit comments