diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2021-12-21 14:41:23 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2021-12-21 14:41:23 +0100 |
commit | 87a26c5bf169bafbee837e2323f24cfb07e35250 (patch) | |
tree | 326eb21bb10c3d3633b83263d21c85c98f92a67e /ftplugin/zig.vim | |
parent | 918610d427503c5c7b380eae4a954bd8cb427db5 (diff) | |
download | vim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.tar.gz vim-polyglot-87a26c5bf169bafbee837e2323f24cfb07e35250.zip |
Update
Diffstat (limited to 'ftplugin/zig.vim')
-rw-r--r-- | ftplugin/zig.vim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ftplugin/zig.vim b/ftplugin/zig.vim index cb2f3e84..1e6f91b3 100644 --- a/ftplugin/zig.vim +++ b/ftplugin/zig.vim @@ -39,14 +39,18 @@ endif let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)' -if exists("*json_decode") && executable('zig') +if !exists('g:zig_std_dir') && exists('*json_decode') && executable('zig') silent let s:env = system('zig env') if v:shell_error == 0 - let &l:path=json_decode(s:env)['std_dir'] . ',' . &l:path + let g:zig_std_dir = json_decode(s:env)['std_dir'] endif unlet! s:env endif +if exists('g:zig_std_dir') + let &l:path = g:zig_std_dir . ',' . &l:path +endif + let b:undo_ftplugin = \ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<' |