annotate runtime/ftplugin/zig.vim @ 36557:9f484a1841eb draft v9.1.0864

patch 9.1.0864: message history is fixed to 200 Commit: https://github.com/vim/vim/commit/4bd9b2b2467e696061104a029000e9824c6c609e Author: Shougo Matsushita <Shougo.Matsu@gmail.com> Date: Thu Nov 14 22:31:48 2024 +0100 patch 9.1.0864: message history is fixed to 200 Problem: message history is fixed to 200 Solution: Add the 'msghistory' option, increase the default value to 500 (Shougo Matsushita) closes: #16048 Co-authored-by: Milly <milly.ca@gmail.com> Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 14 Nov 2024 22:45:04 +0100
parents a3244333f8c4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim filetype plugin file
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
2 " Language: Zig
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
3 " Maintainer: Mathias Lindgren <math.lindgren@gmail.com>
36247
a3244333f8c4 runtime(misc): unset compiler in various ftplugins
Christian Brabandt <cb@256bit.org>
parents: 35236
diff changeset
4 " Last Change: 2024 Oct 04
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
5 " Based on: https://github.com/ziglang/zig.vim
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists("b:did_ftplugin")
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let b:did_ftplugin = 1
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
13 let s:cpo_save = &cpo
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 set cpo&vim
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 " Match Zig builtin fns
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 setlocal iskeyword+=@-@
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
18 setlocal formatoptions-=t formatoptions+=croql
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
19 setlocal suffixesadd=.zig,.zir,.zon
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
20 let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
21 let b:undo_ftplugin = 'setl isk< fo< sua< mp< def<'
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
23 if get(g:, 'zig_recommended_style', 1)
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
24 setlocal expandtab
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
25 setlocal tabstop=8
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
26 setlocal softtabstop=4
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
27 setlocal shiftwidth=4
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
28 let b:undo_ftplugin .= ' | setl et< ts< sts< sw<'
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
29 endif
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 if has('comments')
33617
f7351afc42cf runtime(zig): Update Zig runtime files (#13388)
Christian Brabandt <cb@256bit.org>
parents: 33223
diff changeset
32 setlocal comments=:///,://!,://
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 setlocal commentstring=//\ %s
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
34 let b:undo_ftplugin .= ' | setl com< cms<'
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 endif
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 if has('find_in_path')
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 let &l:includeexpr='substitute(v:fname, "^([^.])$", "\1.zig", "")'
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 let &l:include='\v(\@import>|\@cInclude>|^\s*\#\s*include)'
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
40 let b:undo_ftplugin .= ' | setl inex< inc<'
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 endif
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 if exists('g:zig_std_dir')
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
44 let &l:path .= ',' . g:zig_std_dir
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
45 let b:undo_ftplugin .= ' | setl pa<'
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 endif
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47
36247
a3244333f8c4 runtime(misc): unset compiler in various ftplugins
Christian Brabandt <cb@256bit.org>
parents: 35236
diff changeset
48 if !exists('current_compiler')
a3244333f8c4 runtime(misc): unset compiler in various ftplugins
Christian Brabandt <cb@256bit.org>
parents: 35236
diff changeset
49 compiler zig_build
a3244333f8c4 runtime(misc): unset compiler in various ftplugins
Christian Brabandt <cb@256bit.org>
parents: 35236
diff changeset
50 let b:undo_ftplugin .= "| compiler make"
a3244333f8c4 runtime(misc): unset compiler in various ftplugins
Christian Brabandt <cb@256bit.org>
parents: 35236
diff changeset
51 endif
a3244333f8c4 runtime(misc): unset compiler in various ftplugins
Christian Brabandt <cb@256bit.org>
parents: 35236
diff changeset
52
35236
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
53 let &cpo = s:cpo_save
3b6868b38118 runtime(zig): refactor zig ftplugin, remove auto format
Christian Brabandt <cb@256bit.org>
parents: 33716
diff changeset
54 unlet s:cpo_save
31383
15c80d8bc515 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab