mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7c3f9af: runtime(misc): unset compiler in various ftplugins
just to foster best practices
closes: vim/vim#15798
7c3f9af0ed
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
This commit is contained in:
parent
4ea0f1ec23
commit
88085c2e80
@ -12,10 +12,6 @@ let b:did_ftplugin = 1
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
if !exists('current_compiler')
|
|
||||||
compiler context
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo< ofu<"
|
let b:undo_ftplugin = "setl com< cms< def< inc< sua< fo< ofu<"
|
||||||
|
|
||||||
setlocal comments=b:%D,b:%C,b:%M,:% commentstring=%\ %s formatoptions+=tjcroql2
|
setlocal comments=b:%D,b:%C,b:%M,:% commentstring=%\ %s formatoptions+=tjcroql2
|
||||||
@ -108,6 +104,12 @@ if get(g:, 'context_mappings', 1)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists('current_compiler')
|
||||||
|
let b:undo_ftplugin ..= "| compiler make"
|
||||||
|
compiler context
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:undo_ftplugin ..= "| sil! delc -buffer ConTeXt | sil! delc -buffer ConTeXtLog | sil! delc -buffer ConTeXtJobStatus | sil! delc -buffer ConTeXtStopJobs"
|
||||||
" Commands for asynchronous typesetting
|
" Commands for asynchronous typesetting
|
||||||
command! -buffer -nargs=? -complete=file ConTeXt call context#typeset(<q-args>)
|
command! -buffer -nargs=? -complete=file ConTeXt call context#typeset(<q-args>)
|
||||||
command! -nargs=0 ConTeXtJobStatus call context#job_status()
|
command! -nargs=0 ConTeXtJobStatus call context#job_status()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim filetype plugin.
|
" Vim filetype plugin.
|
||||||
" Language: Hare
|
" Language: Hare
|
||||||
" Maintainer: Amelia Clarke <selene@perilune.dev>
|
" Maintainer: Amelia Clarke <selene@perilune.dev>
|
||||||
" Last Updated: 2024-05-10
|
" Last Updated: 2024 Oct 04
|
||||||
" Upstream: https://git.sr.ht/~sircmpwn/hare.vim
|
" Upstream: https://git.sr.ht/~sircmpwn/hare.vim
|
||||||
|
|
||||||
if exists('b:did_ftplugin')
|
if exists('b:did_ftplugin')
|
||||||
@ -12,9 +12,6 @@ let b:did_ftplugin = 1
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
" Set the default compiler.
|
|
||||||
compiler hare
|
|
||||||
|
|
||||||
" Formatting settings.
|
" Formatting settings.
|
||||||
setlocal comments=://
|
setlocal comments=://
|
||||||
setlocal commentstring=//\ %s
|
setlocal commentstring=//\ %s
|
||||||
@ -53,6 +50,11 @@ augroup hare.vim
|
|||||||
endif
|
endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
if !exists('current_compiler')
|
||||||
|
let b:undo_ftplugin .= "| compiler make"
|
||||||
|
compiler hare
|
||||||
|
endif
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
" Maintainer: Vito <vito.blog@gmail.com>
|
" Maintainer: Vito <vito.blog@gmail.com>
|
||||||
" Last Change: 2024 Apr 29
|
" Last Change: 2024 Apr 29
|
||||||
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
|
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
|
||||||
|
" 2024 Oct 04 by Konfekt (unset compiler)
|
||||||
" Upstream: https://github.com/vito-c/jq.vim
|
" Upstream: https://github.com/vito-c/jq.vim
|
||||||
|
|
||||||
if exists('b:did_ftplugin')
|
if exists('b:did_ftplugin')
|
||||||
@ -12,6 +13,11 @@ let b:did_ftplugin = 1
|
|||||||
|
|
||||||
setlocal include=^\\s*\\%(import\\\|include\\)
|
setlocal include=^\\s*\\%(import\\\|include\\)
|
||||||
setlocal commentstring=#\ %s
|
setlocal commentstring=#\ %s
|
||||||
compiler jq
|
|
||||||
|
|
||||||
let b:undo_ftplugin = 'setl commentstring< include<'
|
let b:undo_ftplugin = 'setl commentstring< include<'
|
||||||
|
|
||||||
|
if !exists('current_compiler')
|
||||||
|
let b:undo_ftplugin ..= "| compiler make"
|
||||||
|
compiler jq
|
||||||
|
endif
|
||||||
|
|
||||||
|
@ -36,7 +36,11 @@ let b:undo_ftplugin = "setl iskeyword< commentstring<"
|
|||||||
" pip options contain "-"
|
" pip options contain "-"
|
||||||
setlocal iskeyword+=-
|
setlocal iskeyword+=-
|
||||||
setlocal commentstring=#\ %s
|
setlocal commentstring=#\ %s
|
||||||
compiler pip_compile
|
|
||||||
|
if !exists('current_compiler')
|
||||||
|
let b:undo_ftplugin ..= "| compiler make"
|
||||||
|
compiler pip_compile
|
||||||
|
endif
|
||||||
|
|
||||||
let &cpoptions = s:save_cpoptions
|
let &cpoptions = s:save_cpoptions
|
||||||
unlet s:save_cpoptions
|
unlet s:save_cpoptions
|
||||||
|
@ -148,6 +148,7 @@ endif
|
|||||||
" Cleanup {{{1
|
" Cleanup {{{1
|
||||||
|
|
||||||
let b:undo_ftplugin = "
|
let b:undo_ftplugin = "
|
||||||
|
\ compiler make |
|
||||||
\ setlocal formatoptions< comments< commentstring< include< includeexpr< suffixesadd<
|
\ setlocal formatoptions< comments< commentstring< include< includeexpr< suffixesadd<
|
||||||
\|if exists('b:rust_set_style')
|
\|if exists('b:rust_set_style')
|
||||||
\|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth<
|
\|setlocal tabstop< shiftwidth< softtabstop< expandtab< textwidth<
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: Typst
|
" Language: Typst
|
||||||
" Maintainer: Gregory Anders
|
" Maintainer: Gregory Anders
|
||||||
" Last Change: 2024-07-14
|
" Last Change: 2024 Oct 04
|
||||||
" Based on: https://github.com/kaarmu/typst.vim
|
" Based on: https://github.com/kaarmu/typst.vim
|
||||||
|
|
||||||
if exists('b:did_ftplugin')
|
if exists('b:did_ftplugin')
|
||||||
@ -9,8 +9,6 @@ if exists('b:did_ftplugin')
|
|||||||
endif
|
endif
|
||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
compiler typst
|
|
||||||
|
|
||||||
setlocal commentstring=//\ %s
|
setlocal commentstring=//\ %s
|
||||||
setlocal comments=s1:/*,mb:*,ex:*/,://
|
setlocal comments=s1:/*,mb:*,ex:*/,://
|
||||||
setlocal formatoptions+=croq
|
setlocal formatoptions+=croq
|
||||||
@ -22,3 +20,8 @@ if get(g:, 'typst_conceal', 0)
|
|||||||
setlocal conceallevel=2
|
setlocal conceallevel=2
|
||||||
let b:undo_ftplugin .= ' cole<'
|
let b:undo_ftplugin .= ' cole<'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists('current_compiler')
|
||||||
|
compiler typst
|
||||||
|
let b:undo_ftplugin ..= "| compiler make"
|
||||||
|
endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: YAML (YAML Ain't Markup Language)
|
" Language: YAML (YAML Ain't Markup Language)
|
||||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> (inactive)
|
" Previous Maintainer: Nikolai Weibull <now@bitwi.se> (inactive)
|
||||||
" Last Change: 2020 Mar 02
|
" Last Change: 2024 Oct 04
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
finish
|
finish
|
||||||
@ -18,7 +18,10 @@ setlocal formatoptions-=t formatoptions+=croql
|
|||||||
|
|
||||||
" rime input method engine uses `*.custom.yaml` as its config files
|
" rime input method engine uses `*.custom.yaml` as its config files
|
||||||
if expand('%:r:e') ==# 'custom'
|
if expand('%:r:e') ==# 'custom'
|
||||||
compiler rime_deployer
|
if !exists('current_compiler')
|
||||||
|
compiler rime_deployer
|
||||||
|
let b:undo_ftplugin ..= "| compiler make"
|
||||||
|
endif
|
||||||
setlocal include=__include:\\s*
|
setlocal include=__include:\\s*
|
||||||
let b:undo_ftplugin ..= " inc<"
|
let b:undo_ftplugin ..= " inc<"
|
||||||
endif
|
endif
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: Zig
|
" Language: Zig
|
||||||
" Maintainer: Mathias Lindgren <math.lindgren@gmail.com>
|
" Maintainer: Mathias Lindgren <math.lindgren@gmail.com>
|
||||||
" Last Change: 2024 May 21
|
" Last Change: 2024 Oct 04
|
||||||
" Based on: https://github.com/ziglang/zig.vim
|
" Based on: https://github.com/ziglang/zig.vim
|
||||||
|
|
||||||
if exists("b:did_ftplugin")
|
if exists("b:did_ftplugin")
|
||||||
@ -13,8 +13,6 @@ let b:did_ftplugin = 1
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
compiler zig_build
|
|
||||||
|
|
||||||
" Match Zig builtin fns
|
" Match Zig builtin fns
|
||||||
setlocal iskeyword+=@-@
|
setlocal iskeyword+=@-@
|
||||||
setlocal formatoptions-=t formatoptions+=croql
|
setlocal formatoptions-=t formatoptions+=croql
|
||||||
@ -47,6 +45,11 @@ if exists('g:zig_std_dir')
|
|||||||
let b:undo_ftplugin .= ' | setl pa<'
|
let b:undo_ftplugin .= ' | setl pa<'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if !exists('current_compiler')
|
||||||
|
compiler zig_build
|
||||||
|
let b:undo_ftplugin .= "| compiler make"
|
||||||
|
endif
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||||
|
Loading…
Reference in New Issue
Block a user