summaryrefslogtreecommitdiff
path: root/uvim/runtime/ftplugin/zig.mnv
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-03 22:21:25 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-04 00:23:03 +0300
commit2eae5db069dc171f74cd863487655f6a88e5384d (patch)
tree2d9d05e09978a2a44acbfbb8d651f240df3ca052 /uvim/runtime/ftplugin/zig.mnv
parent473d922faed49241a5d29d9e37dc4819cd512006 (diff)
downloadProject-Tick-2eae5db069dc171f74cd863487655f6a88e5384d.tar.gz
Project-Tick-2eae5db069dc171f74cd863487655f6a88e5384d.zip
NOISSUE rebrand vim to MNV's not Vim
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'uvim/runtime/ftplugin/zig.mnv')
-rw-r--r--uvim/runtime/ftplugin/zig.mnv55
1 files changed, 55 insertions, 0 deletions
diff --git a/uvim/runtime/ftplugin/zig.mnv b/uvim/runtime/ftplugin/zig.mnv
new file mode 100644
index 0000000000..03067be73f
--- /dev/null
+++ b/uvim/runtime/ftplugin/zig.mnv
@@ -0,0 +1,55 @@
+" MNV filetype plugin file
+" Language: Zig
+" Maintainer: Mathias Lindgren <math.lindgren@gmail.com>
+" Last Change: 2024 Oct 04
+" Based on: https://github.com/ziglang/zig.mnv
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let b:did_ftplugin = 1
+
+let s:cpo_save = &cpo
+set cpo&mnv
+
+" Match Zig builtin fns
+setlocal iskeyword+=@-@
+setlocal formatoptions-=t formatoptions+=croql
+setlocal suffixesadd=.zig,.zir,.zon
+let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'
+let b:undo_ftplugin = 'setl isk< fo< sua< mp< def<'
+
+if get(g:, 'zig_recommended_style', 1)
+ setlocal expandtab
+ setlocal tabstop=8
+ setlocal softtabstop=4
+ setlocal shiftwidth=4
+ let b:undo_ftplugin .= ' | setl et< ts< sts< sw<'
+endif
+
+if has('comments')
+ setlocal comments=:///,://!,://
+ setlocal commentstring=//\ %s
+ let b:undo_ftplugin .= ' | setl com< cms<'
+endif
+
+if has('find_in_path')
+ let &l:includeexpr='substitute(v:fname, "^([^.])$", "\1.zig", "")'
+ let &l:include='\v(\@import>|\@cInclude>|^\s*\#\s*include)'
+ let b:undo_ftplugin .= ' | setl inex< inc<'
+endif
+
+if exists('g:zig_std_dir')
+ let &l:path .= ',' . g:zig_std_dir
+ let b:undo_ftplugin .= ' | setl pa<'
+endif
+
+if !exists('current_compiler')
+ compiler zig_build
+ let b:undo_ftplugin .= "| compiler make"
+endif
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+" mnv: tabstop=8 shiftwidth=4 softtabstop=4 expandtab