aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2023-10-19 14:30:19 -0500
committerGitHub <noreply@github.com>2023-10-19 14:30:19 -0500
commit2c9d4ef45908a933e8a22233733a1482ebd6be31 (patch)
tree3a7ddeb2ecae334f61f70bc7116233d64cead058
parent315c711700a87fe3fa546906ab39557ebba19baf (diff)
parent3ea13bca14e7d89518f502fc42ef341f9eaf7f08 (diff)
downloadrneovim-2c9d4ef45908a933e8a22233733a1482ebd6be31.tar.gz
rneovim-2c9d4ef45908a933e8a22233733a1482ebd6be31.tar.bz2
rneovim-2c9d4ef45908a933e8a22233733a1482ebd6be31.zip
Merge pull request #25717 from gpanders/vim-e08bfef88bd0
vim-patch:e08bfef88bd0, vim-patch:9.0.2053
-rw-r--r--runtime/ftplugin/zig.vim4
-rw-r--r--runtime/lua/vim/filetype.lua2
-rw-r--r--runtime/syntax/zig.vim27
-rw-r--r--test/old/testdir/test_filetype.vim3
4 files changed, 20 insertions, 16 deletions
diff --git a/runtime/ftplugin/zig.vim b/runtime/ftplugin/zig.vim
index cfd7102b8d..291fe44b11 100644
--- a/runtime/ftplugin/zig.vim
+++ b/runtime/ftplugin/zig.vim
@@ -28,7 +28,7 @@ setlocal formatoptions-=t formatoptions+=croql
setlocal suffixesadd=.zig,.zir
if has('comments')
- setlocal comments=:///,://!,://,:\\\\
+ setlocal comments=:///,://!,://
setlocal commentstring=//\ %s
endif
@@ -53,7 +53,7 @@ endif
unlet! s:tmp_cwd
if exists('g:zig_std_dir')
- let &l:path = &l:path . ',' . g:zig_std_dir
+ let &l:path = g:zig_std_dir . ',' . &l:path
endif
let b:undo_ftplugin =
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 2058a4dcba..6dbfd7e64d 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1119,7 +1119,7 @@ local extension = {
yuck = 'yuck',
z8a = 'z8a',
zig = 'zig',
- zir = 'zir',
+ zon = 'zig',
zu = 'zimbu',
zut = 'zimbutempl',
zs = 'zserio',
diff --git a/runtime/syntax/zig.vim b/runtime/syntax/zig.vim
index e09b5e8815..121b0195b0 100644
--- a/runtime/syntax/zig.vim
+++ b/runtime/syntax/zig.vim
@@ -34,6 +34,7 @@ let s:zig_syntax_keywords = {
\ , "usize"
\ , "comptime_int"
\ , "comptime_float"
+ \ , "c_char"
\ , "c_short"
\ , "c_ushort"
\ , "c_int"
@@ -96,6 +97,7 @@ let s:zig_syntax_keywords = {
\ , "@atomicStore"
\ , "@bitCast"
\ , "@breakpoint"
+ \ , "@trap"
\ , "@alignCast"
\ , "@alignOf"
\ , "@cDefine"
@@ -107,6 +109,7 @@ let s:zig_syntax_keywords = {
\ , "@cmpxchgStrong"
\ , "@compileError"
\ , "@compileLog"
+ \ , "@constCast"
\ , "@ctz"
\ , "@popCount"
\ , "@divExact"
@@ -126,9 +129,10 @@ let s:zig_syntax_keywords = {
\ , "@unionInit"
\ , "@frameAddress"
\ , "@import"
+ \ , "@inComptime"
\ , "@newStackCall"
\ , "@asyncCall"
- \ , "@intToPtr"
+ \ , "@ptrFromInt"
\ , "@max"
\ , "@min"
\ , "@memcpy"
@@ -145,7 +149,7 @@ let s:zig_syntax_keywords = {
\ , "@panic"
\ , "@prefetch"
\ , "@ptrCast"
- \ , "@ptrToInt"
+ \ , "@intFromPtr"
\ , "@rem"
\ , "@returnAddress"
\ , "@setCold"
@@ -169,25 +173,26 @@ let s:zig_syntax_keywords = {
\ , "@subWithOverflow"
\ , "@intCast"
\ , "@floatCast"
- \ , "@intToFloat"
- \ , "@floatToInt"
- \ , "@boolToInt"
- \ , "@errSetCast"
+ \ , "@floatFromInt"
+ \ , "@intFromFloat"
+ \ , "@intFromBool"
+ \ , "@errorCast"
\ , "@truncate"
\ , "@typeInfo"
\ , "@typeName"
\ , "@TypeOf"
\ , "@atomicRmw"
- \ , "@intToError"
- \ , "@errorToInt"
- \ , "@intToEnum"
- \ , "@enumToInt"
+ \ , "@errorFromInt"
+ \ , "@intFromError"
+ \ , "@enumFromInt"
+ \ , "@intFromEnum"
\ , "@setAlignStack"
\ , "@frame"
\ , "@Frame"
\ , "@frameSize"
\ , "@bitReverse"
\ , "@Vector"
+ \ , "@volatileCast"
\ , "@sin"
\ , "@cos"
\ , "@tan"
@@ -196,7 +201,7 @@ let s:zig_syntax_keywords = {
\ , "@log"
\ , "@log2"
\ , "@log10"
- \ , "@fabs"
+ \ , "@abs"
\ , "@floor"
\ , "@ceil"
\ , "@trunc"
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index d351e2ffc7..fa8f734936 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -735,10 +735,9 @@ func s:GetFilenameChecks() abort
\ 'yang': ['file.yang'],
\ 'yuck': ['file.yuck'],
\ 'z8a': ['file.z8a'],
- \ 'zig': ['file.zig'],
+ \ 'zig': ['file.zig', 'build.zig.zon'],
\ 'zimbu': ['file.zu'],
\ 'zimbutempl': ['file.zut'],
- \ 'zir': ['file.zir'],
\ 'zserio': ['file.zs'],
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
\