From 88085c2e80a7e3ac29aabb6b5420377eed99b8b6 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 5 Oct 2024 17:41:54 +0200 Subject: vim-patch:7c3f9af: runtime(misc): unset compiler in various ftplugins just to foster best practices closes: vim/vim#15798 https://github.com/vim/vim/commit/7c3f9af0ed5dd7035f8a3fbb2f0bf965a453e359 Co-authored-by: Konfekt --- runtime/ftplugin/zig.vim | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'runtime/ftplugin/zig.vim') diff --git a/runtime/ftplugin/zig.vim b/runtime/ftplugin/zig.vim index ea229b6a49..ea584ed086 100644 --- a/runtime/ftplugin/zig.vim +++ b/runtime/ftplugin/zig.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Zig " Maintainer: Mathias Lindgren -" Last Change: 2024 May 21 +" Last Change: 2024 Oct 04 " Based on: https://github.com/ziglang/zig.vim if exists("b:did_ftplugin") @@ -13,8 +13,6 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim -compiler zig_build - " Match Zig builtin fns setlocal iskeyword+=@-@ setlocal formatoptions-=t formatoptions+=croql @@ -47,6 +45,11 @@ if exists('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 " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab -- cgit