Mercurial > vim
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 |
rev | line source |
---|---|
31383 | 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 | 6 |
7 if exists("b:did_ftplugin") | |
8 finish | |
9 endif | |
10 | |
11 let b:did_ftplugin = 1 | |
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 | 14 set cpo&vim |
15 | |
16 " Match Zig builtin fns | |
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 | 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 | 30 |
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 | 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 | 35 endif |
36 | |
37 if has('find_in_path') | |
38 let &l:includeexpr='substitute(v:fname, "^([^.])$", "\1.zig", "")' | |
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 | 41 endif |
42 | |
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 | 46 endif |
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 | 55 " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab |