diff options
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r-- | runtime/ftplugin/ada.vim | 2 | ||||
-rw-r--r-- | runtime/ftplugin/checkhealth.vim | 6 | ||||
-rw-r--r-- | runtime/ftplugin/cook.vim | 13 | ||||
-rw-r--r-- | runtime/ftplugin/dune.vim | 3 | ||||
-rw-r--r-- | runtime/ftplugin/erlang.vim | 2 | ||||
-rw-r--r-- | runtime/ftplugin/gleam.vim | 16 | ||||
-rw-r--r-- | runtime/ftplugin/idris2.vim | 34 | ||||
-rw-r--r-- | runtime/ftplugin/ipkg.vim | 19 | ||||
-rw-r--r-- | runtime/ftplugin/leo.vim | 13 | ||||
-rw-r--r-- | runtime/ftplugin/llvm.vim | 12 | ||||
-rw-r--r-- | runtime/ftplugin/man.vim | 6 | ||||
-rw-r--r-- | runtime/ftplugin/mlir.vim | 10 | ||||
-rw-r--r-- | runtime/ftplugin/mss.vim | 16 | ||||
-rw-r--r-- | runtime/ftplugin/org.vim | 37 | ||||
-rw-r--r-- | runtime/ftplugin/plaintex.vim | 2 | ||||
-rw-r--r-- | runtime/ftplugin/racket.vim | 9 | ||||
-rw-r--r-- | runtime/ftplugin/spec.vim | 10 | ||||
-rw-r--r-- | runtime/ftplugin/sway.vim | 15 | ||||
-rw-r--r-- | runtime/ftplugin/tex.vim | 2 | ||||
-rw-r--r-- | runtime/ftplugin/typst.vim | 8 |
20 files changed, 215 insertions, 20 deletions
diff --git a/runtime/ftplugin/ada.vim b/runtime/ftplugin/ada.vim index 688d912126..50e1388c80 100644 --- a/runtime/ftplugin/ada.vim +++ b/runtime/ftplugin/ada.vim @@ -103,7 +103,7 @@ endif if !exists ("b:match_words") && \ exists ("loaded_matchit") " - " The following lines enable the macros/matchit.vim plugin for + " The following lines enable the matchit.vim plugin for " Ada-specific extended matching with the % key. " let s:notend = '\%(\<end\s\+\)\@<!' diff --git a/runtime/ftplugin/checkhealth.vim b/runtime/ftplugin/checkhealth.vim index 62a1970b4a..00f24a2912 100644 --- a/runtime/ftplugin/checkhealth.vim +++ b/runtime/ftplugin/checkhealth.vim @@ -8,11 +8,11 @@ endif runtime! ftplugin/help.vim -setlocal wrap breakindent linebreak +setlocal wrap breakindent linebreak nolist let &l:iskeyword='!-~,^*,^|,^",192-255' if exists("b:undo_ftplugin") - let b:undo_ftplugin .= "|setl wrap< bri< lbr< kp< isk<" + let b:undo_ftplugin .= "|setl wrap< bri< lbr< kp< isk< list<" else - let b:undo_ftplugin = "setl wrap< bri< lbr< kp< isk<" + let b:undo_ftplugin = "setl wrap< bri< lbr< kp< isk< list<" endif diff --git a/runtime/ftplugin/cook.vim b/runtime/ftplugin/cook.vim new file mode 100644 index 0000000000..3697803e74 --- /dev/null +++ b/runtime/ftplugin/cook.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: Cooklang +" Maintainer: Riley Bruins <ribru17@gmail.com> +" Last Change: 2024 Nov 03 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:-- commentstring=--\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/dune.vim b/runtime/ftplugin/dune.vim index 6e20a8fabb..7608d53527 100644 --- a/runtime/ftplugin/dune.vim +++ b/runtime/ftplugin/dune.vim @@ -6,13 +6,14 @@ " 2023 Aug 28 - Added undo_ftplugin (Vim Project) " 2018 Nov 03 - Added commentstring (Markus Mottl) " 2017 Sep 06 - Initial version (Etienne Millon) +" 2024 Nov 09 - use setl instead of :set if exists("b:did_ftplugin") finish endif let b:did_ftplugin=1 -set lisp +setl lisp " Comment string setl commentstring=;\ %s diff --git a/runtime/ftplugin/erlang.vim b/runtime/ftplugin/erlang.vim index 5a3ab717d9..e82263d300 100644 --- a/runtime/ftplugin/erlang.vim +++ b/runtime/ftplugin/erlang.vim @@ -97,7 +97,7 @@ if !exists('*ErlangFoldText') endfunction endif -" The following lines enable the macros/matchit.vim plugin for extended +" The following lines enable the matchit.vim plugin for extended " matching with the % key. let b:match_ignorecase = 0 let b:match_words = diff --git a/runtime/ftplugin/gleam.vim b/runtime/ftplugin/gleam.vim new file mode 100644 index 0000000000..9ed607c4b3 --- /dev/null +++ b/runtime/ftplugin/gleam.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: Gleam +" Maintainer: Trilowy (https://github.com/trilowy) +" Last Change: 2024 Oct 13 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=://,:///,://// +setlocal commentstring=//\ %s + +let b:undo_ftplugin = "setlocal comments< commentstring<" + +" vim: sw=2 sts=2 et diff --git a/runtime/ftplugin/idris2.vim b/runtime/ftplugin/idris2.vim new file mode 100644 index 0000000000..54e5acef90 --- /dev/null +++ b/runtime/ftplugin/idris2.vim @@ -0,0 +1,34 @@ +" Vim ftplugin file +" Language: Idris 2 +" Last Change: 2024 Nov 05 +" Maintainer: Idris Hackers (https://github.com/edwinb/idris2-vim), Serhii Khoma <srghma@gmail.com> +" License: Vim (see :h license) +" Repository: https://github.com/ShinKage/idris2-nvim +" +" Based on ftplugin/idris2.vim from https://github.com/edwinb/idris2-vim + +if exists("b:did_ftplugin") + finish +endif + +setlocal shiftwidth=2 +setlocal tabstop=2 + +" Set g:idris2#allow_tabchar = 1 to use tabs instead of spaces +if exists('g:idris2#allow_tabchar') && g:idris2#allow_tabchar != 0 + setlocal noexpandtab +else + setlocal expandtab +endif + +setlocal comments=s1:{-,mb:-,ex:-},:\|\|\|,:-- +setlocal commentstring=--\ %s + +" makes ? a part of a word, e.g. for named holes `vzipWith f [] [] = ?vzipWith_rhs_3`, uncomment if want to reenable +" setlocal iskeyword+=? + +setlocal wildignore+=*.ibc + +let b:undo_ftplugin = "setlocal shiftwidth< tabstop< expandtab< comments< commentstring< iskeyword< wildignore<" + +let b:did_ftplugin = 1 diff --git a/runtime/ftplugin/ipkg.vim b/runtime/ftplugin/ipkg.vim new file mode 100644 index 0000000000..70ae26ec17 --- /dev/null +++ b/runtime/ftplugin/ipkg.vim @@ -0,0 +1,19 @@ +" Vim ftplugin file +" Language: Ipkg +" Maintainer: Idris Hackers (https://github.com/edwinb/idris2-vim), Serhii Khoma <srghma@gmail.com> +" Last Change: 2024 Nov 05 +" Author: ShinKage +" License: Vim (see :h license) +" Repository: https://github.com/ShinKage/idris2-nvim + +if exists("b:did_ftplugin") + finish +endif + +setlocal comments=:-- +setlocal commentstring=--\ %s +setlocal wildignore+=*.ibc + +let b:undo_ftplugin = "setlocal shiftwidth< tabstop< expandtab< comments< commentstring< iskeyword< wildignore<" + +let b:did_ftplugin = 1 diff --git a/runtime/ftplugin/leo.vim b/runtime/ftplugin/leo.vim new file mode 100644 index 0000000000..a009c02df4 --- /dev/null +++ b/runtime/ftplugin/leo.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: Leo +" Maintainer: Riley Bruins <ribru17@gmail.com> +" Last Change: 2024 Nov 03 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/llvm.vim b/runtime/ftplugin/llvm.vim new file mode 100644 index 0000000000..148b12f102 --- /dev/null +++ b/runtime/ftplugin/llvm.vim @@ -0,0 +1,12 @@ +" Vim filetype plugin file +" Language: LLVM IR +" Last Change: 2024 Oct 22 +" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu> + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +setl comments=:; +setl commentstring=;\ %s + +let b:undo_ftplugin = "setl commentstring< comments<" diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index 37667477f3..5ea36c32ce 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -26,11 +26,7 @@ if !exists('g:no_plugin_maps') && !exists('g:no_man_maps') nnoremap <silent> <buffer> k gk nnoremap <silent> <buffer> gO :lua require'man'.show_toc()<CR> nnoremap <silent> <buffer> <2-LeftMouse> :Man<CR> - if get(g:, 'pager') - nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>q - else - nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>c - endif + nnoremap <silent> <buffer> <nowait> q :lclose<CR><C-W>q endif if get(g:, 'ft_man_folding_enable', 0) diff --git a/runtime/ftplugin/mlir.vim b/runtime/ftplugin/mlir.vim new file mode 100644 index 0000000000..c6a9dc341f --- /dev/null +++ b/runtime/ftplugin/mlir.vim @@ -0,0 +1,10 @@ +" Vim filetype plugin file +" Language: MLIR + +if exists("b:did_ftplugin") | finish | endif +let b:did_ftplugin = 1 + +setl comments=:///,:// +setl commentstring=//\ %s + +let b:undo_ftplugin = "setl commentstring< comments<" diff --git a/runtime/ftplugin/mss.vim b/runtime/ftplugin/mss.vim new file mode 100644 index 0000000000..de2f8791ec --- /dev/null +++ b/runtime/ftplugin/mss.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: Vivado mss file +" Last Change: 2024 Oct 22 +" Document: https://docs.amd.com/r/2020.2-English/ug1400-vitis-embedded/Microprocessor-Software-Specification-MSS +" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu> + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=b:#,fb:- +setlocal commentstring=#\ %s + +let b:match_words = '\<BEGIN\>:\<END\>' +let b:undo_ftplugin = "setl com< cms< | unlet b:match_words" diff --git a/runtime/ftplugin/org.vim b/runtime/ftplugin/org.vim new file mode 100644 index 0000000000..45a5e19d49 --- /dev/null +++ b/runtime/ftplugin/org.vim @@ -0,0 +1,37 @@ +" Vim filetype plugin file +" Language: Org +" Maintainer: Luca Saccarola <github.e41mv@aleeas.com> +" Last Change: 2024 Nov 14 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +if exists('b:undo_ftplugin') + let b:undo_ftplugin .= "|setl cms< com< fo< flp<" +else + let b:undo_ftplugin = "setl cms< com< fo< flp<" +endif + +setl commentstring=#\ %s +setl comments=fb:*,fb:-,fb:+,b:#,b:\: + +setl formatoptions+=nql +setl formatlistpat=^\\s*\\(\\(\\d\\|\\a\\)\\+[.)]\\|[+-]\\)\\s\\+ + +function OrgFoldExpr() + let l:depth = match(getline(v:lnum), '\(^\*\+\)\@<=\( .*$\)\@=') + if l:depth > 0 && synIDattr(synID(v:lnum, 1, 1), 'name') =~# '\m^orgHeadline' + return ">" . l:depth + endif + return "=" +endfunction + +if has("folding") && get(g:, 'org_folding', 0) + setl foldexpr=OrgFoldExpr() + setl foldmethod=expr + let b:undo_ftplugin .= "|setl foldexpr< foldmethod<" +endif + +" vim: ts=8 sts=2 sw=2 et diff --git a/runtime/ftplugin/plaintex.vim b/runtime/ftplugin/plaintex.vim index 9e0e402680..17c1f5672f 100644 --- a/runtime/ftplugin/plaintex.vim +++ b/runtime/ftplugin/plaintex.vim @@ -22,7 +22,7 @@ let b:undo_ftplugin .= "| unlet! b:match_ignorecase b:match_skip b:match_words" let &l:define .= '\|\\new\(count\|dimen\|skip\|muskip\|box\|toks\|read\|write' \ . '\|fam\|insert\)' -" The following lines enable the macros/matchit.vim plugin for +" The following lines enable the matchit.vim plugin for " extended matching with the % key. " There is no default meaning for \(...\) etc., but many users define one. if exists("loaded_matchit") diff --git a/runtime/ftplugin/racket.vim b/runtime/ftplugin/racket.vim index 7bfd87ddc3..52768d67f5 100644 --- a/runtime/ftplugin/racket.vim +++ b/runtime/ftplugin/racket.vim @@ -3,7 +3,7 @@ " Maintainer: D. Ben Knoble <ben.knoble+github@gmail.com> " Previous Maintainer: Will Langstroth <will@langstroth.com> " URL: https://github.com/benknoble/vim-racket -" Last Change: 2024 May 28 +" Last Change: 2024 Jun 01 if exists("b:did_ftplugin") finish @@ -16,19 +16,20 @@ set cpo&vim " quick hack to allow adding values setlocal iskeyword=@,!,#-',*-:,<-Z,a-z,~,_,94 +setlocal shiftwidth=2 softtabstop=2 + " Enable auto begin new comment line when continuing from an old comment line setlocal comments=:;;;;,:;;;,:;;,:; setlocal formatoptions+=r -"setlocal commentstring=;;\ %s -setlocal commentstring=#\|\ %s\ \|# +setlocal commentstring=;;\ %s setlocal formatprg=raco\ fmt " Undo our settings when the filetype changes away from Racket " (this should be amended if settings/mappings are added above!) let b:undo_ftplugin = - \ "setlocal iskeyword< lispwords< lisp< comments< formatoptions< formatprg<" + \ "setlocal iskeyword< shiftwidth< softtabstop< comments< formatoptions< formatprg<" \. " | setlocal commentstring<" if !exists("no_plugin_maps") && !exists("no_racket_maps") diff --git a/runtime/ftplugin/spec.vim b/runtime/ftplugin/spec.vim index fa125be52c..4aaef26a2e 100644 --- a/runtime/ftplugin/spec.vim +++ b/runtime/ftplugin/spec.vim @@ -5,6 +5,7 @@ " Last Change: 2015 Jun 01 " Update by Zdenek Dohnal, 2022 May 17 " 2024 Sep 10 by Vim Project: add epoch support for spec changelog, #15537 +" 2024 Oct 07 by Vim Project: add comment support, #15817 if exists("b:did_ftplugin") finish @@ -14,6 +15,11 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim +setlocal comments=b:# +setlocal commentstring=#\ %s + +let b:undo_ftplugin = "setlocal comments< commentstring<" + if !exists("no_plugin_maps") && !exists("no_spec_maps") if !hasmapto("<Plug>SpecChangelog") map <buffer> <LocalLeader>c <Plug>SpecChangelog @@ -204,7 +210,7 @@ if !exists("*s:ParseRpmVars") endfunction endif -" The following lines, along with the macros/matchit.vim plugin, +" The following lines, along with the matchit.vim plugin, " make it easy to navigate the different sections of a spec file " with the % key (thanks to Max Ischenko). @@ -216,4 +222,4 @@ let b:match_words = let &cpo = s:cpo_save unlet s:cpo_save -let b:undo_ftplugin = "unlet! b:match_ignorecase b:match_words" +let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words" diff --git a/runtime/ftplugin/sway.vim b/runtime/ftplugin/sway.vim new file mode 100644 index 0000000000..35970b257c --- /dev/null +++ b/runtime/ftplugin/sway.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: Sway +" Maintainer: Riley Bruins <ribru17@gmail.com> +" Last Change: 2024 Nov 01 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl commentstring=//\ %s +" From Rust comments +setl comments=s0:/*!,ex:*/,s1:/*,mb:*,ex:*/,:///,://!,:// + +let b:undo_ftplugin = 'setl com< cms<' diff --git a/runtime/ftplugin/tex.vim b/runtime/ftplugin/tex.vim index 0d68b51d46..7b58f67863 100644 --- a/runtime/ftplugin/tex.vim +++ b/runtime/ftplugin/tex.vim @@ -32,7 +32,7 @@ let &l:include .= '\|\\include{' " TeX file has \include{fname} (LaTeX only), strip everything except "fname". let &l:includeexpr = "substitute(v:fname, '^.\\{-}{\\|}.*', '', 'g')" -" The following lines enable the macros/matchit.vim plugin for +" The following lines enable the matchit.vim plugin for " extended matching with the % key. " ftplugin/plaintex.vim already defines b:match_skip and b:match_ignorecase " and matches \(, \), \[, \], \{, and \} . diff --git a/runtime/ftplugin/typst.vim b/runtime/ftplugin/typst.vim index 895fc688d9..3841e427f3 100644 --- a/runtime/ftplugin/typst.vim +++ b/runtime/ftplugin/typst.vim @@ -1,7 +1,7 @@ " Vim filetype plugin file " Language: Typst " Maintainer: Gregory Anders -" Last Change: 2024 Oct 04 +" Last Change: 2024 Oct 21 " Based on: https://github.com/kaarmu/typst.vim if exists('b:did_ftplugin') @@ -21,6 +21,12 @@ if get(g:, 'typst_conceal', 0) let b:undo_ftplugin .= ' cole<' endif +if has("folding") && get(g:, 'typst_folding', 0) + setlocal foldexpr=typst#foldexpr() + setlocal foldmethod=expr + let b:undo_ftplugin .= "|setl foldexpr< foldmethod<" +endif + if !exists('current_compiler') compiler typst let b:undo_ftplugin ..= "| compiler make" |