From 920ef1fd71482d078cd095f68fd5f58cb22b0f33 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 18 Mar 2024 20:33:35 +0100 Subject: vim-patch:ef21bcaab145 runtime(rust): Respect no_plugin_maps and no_rust_maps globals (vim/vim#14221) https://github.com/vim/vim/commit/ef21bcaab145d6b22fb7c823607de23700f82653 Co-authored-by: MyyPo <110892040+MyyPo@users.noreply.github.com> --- runtime/ftplugin/rust.vim | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/rust.vim b/runtime/ftplugin/rust.vim index 7f1a86ea95..fb15b444d0 100644 --- a/runtime/ftplugin/rust.vim +++ b/runtime/ftplugin/rust.vim @@ -1,7 +1,7 @@ " Language: Rust " Description: Vim ftplugin for Rust " Maintainer: Chris Morgan -" Last Change: 2023-09-11 +" Last Change: 2024-03-17 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim if exists("b:did_ftplugin") @@ -94,14 +94,15 @@ if has('conceal') && get(g:, 'rust_conceal', 0) endif " Motion Commands {{{1 - -" Bind motion commands to support hanging indents -nnoremap [[ :call rust#Jump('n', 'Back') -nnoremap ]] :call rust#Jump('n', 'Forward') -xnoremap [[ :call rust#Jump('v', 'Back') -xnoremap ]] :call rust#Jump('v', 'Forward') -onoremap [[ :call rust#Jump('o', 'Back') -onoremap ]] :call rust#Jump('o', 'Forward') +if !exists("g:no_plugin_maps") && !exists("g:no_rust_maps") + " Bind motion commands to support hanging indents + nnoremap [[ :call rust#Jump('n', 'Back') + nnoremap ]] :call rust#Jump('n', 'Forward') + xnoremap [[ :call rust#Jump('v', 'Back') + xnoremap ]] :call rust#Jump('v', 'Forward') + onoremap [[ :call rust#Jump('o', 'Back') + onoremap ]] :call rust#Jump('o', 'Forward') +endif " Commands {{{1 @@ -176,12 +177,12 @@ let b:undo_ftplugin = " \|delcommand -buffer RustInfoToClipboard \|delcommand -buffer RustInfoToFile \|delcommand -buffer RustTest - \|nunmap [[ - \|nunmap ]] - \|xunmap [[ - \|xunmap ]] - \|ounmap [[ - \|ounmap ]] + \|silent! nunmap [[ + \|silent! nunmap ]] + \|silent! xunmap [[ + \|silent! xunmap ]] + \|silent! ounmap [[ + \|silent! ounmap ]] \|setlocal matchpairs-=<:> \|unlet b:match_skip \" -- cgit From cfc9fcc91f780022e5e9397626ac6ab5cde91d62 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 20 Mar 2024 20:13:20 +0100 Subject: vim-patch:2708c0b5854f runtime(deb822sources): Add minimal ftplugin (vim/vim#14240) Set comment related options and avoid automatic line wrapping. https://github.com/vim/vim/commit/2708c0b5854faad2844454324431a593c1d2987a Co-authored-by: James McCoy --- runtime/ftplugin/deb822sources.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 runtime/ftplugin/deb822sources.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/deb822sources.vim b/runtime/ftplugin/deb822sources.vim new file mode 100644 index 0000000000..4936f42bf9 --- /dev/null +++ b/runtime/ftplugin/deb822sources.vim @@ -0,0 +1,16 @@ +" Language: Debian sources.list +" Maintainer: Debian Vim Maintainers +" Last Change: 2024 Mar 20 +" License: Vim License +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/ftplugin/deb822sources.vim + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin=1 + +setlocal comments=:# +setlocal commentstring=#%s +setlocal formatoptions-=t + +let b:undo_ftplugin = 'setlocal comments< commentstring< formatoptions<' -- cgit From bef4ad6507a53db8570909de954a538b50b97a30 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 8 Apr 2024 22:39:30 +0200 Subject: vim-patch:9.1.0279: filetype: roc files are not recognized Problem: filetype: roc files are not recognized Solution: Detect '*.roc' files as roc filetype, add a basic filetype plugin (nat-418) closes: vim/vim#14416 https://github.com/vim/vim/commit/196b6678c5483217ea5bc7d047b02c915615dae6 Co-authored-by: nat-418 <93013864+nat-418@users.noreply.github.com> --- runtime/ftplugin/roc.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 runtime/ftplugin/roc.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/roc.vim b/runtime/ftplugin/roc.vim new file mode 100644 index 0000000000..c66510874d --- /dev/null +++ b/runtime/ftplugin/roc.vim @@ -0,0 +1,14 @@ +" Roc filetype plugin file +" Language: Roc +" Maintainer: nat-418 <93013864+nat-418@users.noreply.github.com> +" Latest Revision: 2024-04-5 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=:##,:# +setlocal commentstring=#\ %s + +let b:undo_ftplugin = "setl com< cms<" -- cgit From cbe982bbd5a09b1337e5b3ffcbd15a34cec2db78 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 8 Apr 2024 22:51:09 +0200 Subject: vim-patch:9.1.0278: filetype: zathurarc files not recognized Problem: filetype: zathurarc files not recognized Solution: Detect '.zathurarc' files as zathurarc filetype, add zathurarc filetype (Wu, Zhenyu) closes: vim/vim#14380 https://github.com/vim/vim/commit/72d81a66edd835aeff3f539ccd0f97afb1ebd63c Co-authored-by: Wu, Zhenyu --- runtime/ftplugin/zathurarc.vim | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 runtime/ftplugin/zathurarc.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/zathurarc.vim b/runtime/ftplugin/zathurarc.vim new file mode 100644 index 0000000000..259fb137a1 --- /dev/null +++ b/runtime/ftplugin/zathurarc.vim @@ -0,0 +1,22 @@ +" Vim filetype plugin file +" Language: Zathurarc +" Maintainer: Wu, Zhenyu +" Documentation: https://pwmt.org/projects/zathura/documentation/ +" Upstream: https://github.com/Freed-Wu/zathurarc.vim +" Latest Revision: 2024-04-02 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = 'setlocal comments< commentstring< include<' +setlocal comments=:# +setlocal commentstring=#\ %s +setlocal include=^\sinclude + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions -- cgit From d627497156162f03a36e889d316b68df66928193 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 Apr 2024 07:41:44 +0800 Subject: vim-patch:04e5363b8238 (#28268) runtime(vim): Improve Vim9 and legacy-script comment highlighting (vim/vim#13104) This is a first-pass attempt to limit matching of Vim9 and legacy-script comments to the appropriate syntactic contexts. Vim9-script comments are highlighted at top level in a Vim9-script file, in all :def functions, and in all :autocmd and :commmand command blocks. Legacy-script comments are highlighted at top level in a legacy script file, in all :func functions and in the Vim9-script preamble before the :vim9script marker command. Fixes vim/vim#13047, vim/vim#11307 and vim/vim#9587. https://github.com/vim/vim/commit/04e5363b823827f144409df011376d00ea6df750 Co-authored-by: dkearns --- runtime/ftplugin/vim.vim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index f5dae0f94e..f734947ac8 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin -" Language: Vim -" Maintainer: The Vim Project -" Last Change: 2023 Aug 10 +" Language: Vim +" Maintainer: Doug Kearns +" Last Change: 2024 Apr 08 " Former Maintainer: Bram Moolenaar " Only do this when not done yet for this buffer @@ -50,7 +50,7 @@ setlocal isk+=# setlocal keywordprg=:help " Comments starts with # in Vim9 script. We have to guess which one to use. -if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>' +if "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>' setlocal commentstring=#%s else setlocal commentstring=\"%s -- cgit From 245745f9f0d2efe261970c711d80ee0727983b59 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 Apr 2024 18:22:20 +0800 Subject: vim-patch:556c62165963 ftplugin(gdb): add matchit support closes: vim/vim#14462 https://github.com/vim/vim/commit/556c62165963359f1b35f17a49913fc61c43f937 Co-authored-by: Wu, Zhenyu --- runtime/ftplugin/gdb.vim | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/gdb.vim b/runtime/ftplugin/gdb.vim index 2473b13af0..7c10633be4 100644 --- a/runtime/ftplugin/gdb.vim +++ b/runtime/ftplugin/gdb.vim @@ -1,12 +1,20 @@ " Vim filetype plugin file " Language: gdb " Maintainer: Michaël Peeters -" Last Changed: 26 Oct 2017 +" Last Changed: 2017-10-26 +" 2024-04-10: - add Matchit support (by Vim Project) if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal commentstring=#%s +setlocal include=^\\s*source " Undo the stuff we changed. -let b:undo_ftplugin = "setlocal cms<" +let b:undo_ftplugin = "setlocal cms< include<" + +" Matchit support +if !exists('b:match_words') + let b:match_words = '\<\%(if\|while\|define\|document\)\>:\:\' + let b:undo_ftplugin ..= " | unlet! b:match_words" +endif -- cgit From 55ffca2f9f8317a5e3ab6e625fcb02e8bcd5dbcf Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 11 Apr 2024 18:23:11 +0800 Subject: vim-patch:dbca7d80457d ftplugin(asm): add Matchit support closes: vim/vim#14461 Refer https://github.com/vim/vim/blob/master/runtime/ftplugin/masm.vim#L18-L29 https://github.com/vim/vim/commit/dbca7d80457d026f6d6a5cc7e916b94df0ca6e03 Co-authored-by: Wu, Zhenyu --- runtime/ftplugin/asm.vim | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/asm.vim b/runtime/ftplugin/asm.vim index f6a92d57d7..0ae1610394 100644 --- a/runtime/ftplugin/asm.vim +++ b/runtime/ftplugin/asm.vim @@ -1,13 +1,23 @@ " Vim filetype plugin file " Language: asm " Maintainer: Colin Caine -" Last Change: 23 May 2020 +" Last Change: 2020 May 23 " 2023 Aug 28 by Vim Project (undo_ftplugin) +" 2024 Apr 09 by Vim Project (add Matchit support) if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 +setl include=^\\s*%\\s*include setl comments=:;,s1:/*,mb:*,ex:*/,:// setl commentstring=;%s -let b:undo_ftplugin = "setl commentstring< comments<" +let b:undo_ftplugin = "setl commentstring< comments< include<" + +" Matchit support +if !exists('b:match_words') + let b:match_skip = 's:comment\|string\|character\|special' + let b:match_words = '^\s*%\s*if\%(\|num\|idn\|nidn\)\>:^\s*%\s*elif\>:^\s*%\s*else\>:^\s*%\s*endif\>,^\s*%\s*macro\>:^\s*%\s*endmacro\>,^\s*%\s*rep\>:^\s*%\s*endrep\>' + let b:match_ignorecase = 1 + let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words b:match_skip" +endif -- cgit From c6d11445152fbedccf6516fefd24f4136815f122 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 12 Apr 2024 05:48:25 +0800 Subject: vim-patch:fcbefe74f161 (#28285) runtime(compiler): add vimdoc closes: vim/vim#14459 https://github.com/google/vimdoc generates vim help files from vimscript files https://github.com/vim/vim/commit/fcbefe74f1619dfd925033d83a6d233c686409d4 Co-authored-by: Wu, Zhenyu --- runtime/ftplugin/vim.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index f734947ac8..3f9b4139de 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -15,6 +15,8 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim +compiler vimdoc + if !exists('*VimFtpluginUndo') func VimFtpluginUndo() setl fo< isk< com< tw< commentstring< keywordprg< -- cgit From a93a045e63f96ba0b2b7f005818ddf16c2640038 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 12 Apr 2024 17:05:11 +0800 Subject: vim-patch:9.1.0302: filetype: blueprint files are not recognized (#28292) Problem: filetype: blueprint files are not recognized Solution: Detect '*.bp' files as blueprint files, add a minimal filetype plugin (Bruno Belanyi) See: https://source.android.com/docs/setup/build closes: vim/vim#14488 https://github.com/vim/vim/commit/6be7ef5bc734ce6045d6f919f1a8559a3fa7f2fd Co-authored-by: Bruno BELANYI --- runtime/ftplugin/bp.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 runtime/ftplugin/bp.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/bp.vim b/runtime/ftplugin/bp.vim new file mode 100644 index 0000000000..cb925cb0ec --- /dev/null +++ b/runtime/ftplugin/bp.vim @@ -0,0 +1,14 @@ +" Blueprint build system filetype plugin file +" Language: Blueprint +" Maintainer: Bruno BELANYI +" Latest Revision: 2024-04-10 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=b:# +setlocal commentstring=#\ %s + +let b:undo_ftplugin = "setlocal comments< commentstring<" -- cgit From 611cc7de4373bc2777705d9b977b3ae1bdd2ea90 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 12 Apr 2024 17:07:24 +0800 Subject: vim-patch:9.1.0304: filetype: cgdb config file is not recognized (#28294) Problem: filetype: cgdb config file is not recognized Solution: Detect cgdbrc files as cgdbrc filetype (Wu, Zhenyu) closes: vim/vim#14458 https://github.com/vim/vim/commit/1492fe69037586b6c625d42205d77dd38ba51640 Co-authored-by: Wu, Zhenyu --- runtime/ftplugin/cgdbrc.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 runtime/ftplugin/cgdbrc.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/cgdbrc.vim b/runtime/ftplugin/cgdbrc.vim new file mode 100644 index 0000000000..46cf135c5c --- /dev/null +++ b/runtime/ftplugin/cgdbrc.vim @@ -0,0 +1,21 @@ +" Vim filetype plugin file +" Language: cgdbrc +" Maintainer: Wu, Zhenyu +" Documentation: https://cgdb.github.io/docs/Configuring-CGDB.html +" Latest Revision: 2024-04-09 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = 'setl com< cms<' + +setlocal commentstring=#%s +setlocal comments=:# + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions -- cgit From 66220d164a40791a5131d4660e6ffbee431070d5 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 8 Apr 2024 10:57:37 +0200 Subject: revert: "feat(health): fold successful healthchecks #22866" This reverts commit 4382d2ed564b80944345785d780cf1b19fb23ba8. The story for this feature was left in an incomplete state. It was never the intention to unilaterally fold all information, only the ones that did not contain relevant information. This feature does more harm than good in its incomplete state. --- runtime/ftplugin/checkhealth.vim | 3 --- 1 file changed, 3 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/checkhealth.vim b/runtime/ftplugin/checkhealth.vim index 4b530e6f7c..62a1970b4a 100644 --- a/runtime/ftplugin/checkhealth.vim +++ b/runtime/ftplugin/checkhealth.vim @@ -9,9 +9,6 @@ endif runtime! ftplugin/help.vim setlocal wrap breakindent linebreak -setlocal foldexpr=getline(v:lnum-1)=~'^=\\{78}$'?'>1':(getline(v:lnum)=~'^=\\{78}'?0:'=') -setlocal foldmethod=expr -setlocal foldtext=v:lua.require('vim.health').foldtext() let &l:iskeyword='!-~,^*,^|,^",192-255' if exists("b:undo_ftplugin") -- cgit From 3b639222ff784ec21335280fd77c911050e206f8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 13 Apr 2024 17:28:32 +0800 Subject: vim-patch:159dc0fcf950 runtime(kconfig): add include to ftplugin (vim/vim#14524) related: vim/vim#14521 https://github.com/vim/vim/commit/159dc0fcf950e6c21f97cc337bcf19ff90ce73c6 Co-authored-by: Christian Brabandt --- runtime/ftplugin/kconfig.vim | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/kconfig.vim b/runtime/ftplugin/kconfig.vim index 940ba7427f..767490701b 100644 --- a/runtime/ftplugin/kconfig.vim +++ b/runtime/ftplugin/kconfig.vim @@ -1,9 +1,9 @@ " Vim filetype plugin file " Vim syntax file -" Maintainer: Christian Brabandt -" Previous Maintainer: Nikolai Weibull -" Latest Revision: 2015-05-29 -" License: Vim (see :h license) +" Maintainer: Christian Brabandt +" Previous Maintainer: Nikolai Weibull +" Latest Revision: 2024-04-12 +" License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-kconfig if exists("b:did_ftplugin") @@ -11,17 +11,12 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -let s:cpo_save = &cpo -set cpo&vim - -let b:undo_ftplugin = "setl com< cms< fo<" +let b:undo_ftplugin = "setl inc< com< cms< fo<" +setlocal include=source\\s\\+ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql " For matchit.vim if exists("loaded_matchit") let b:match_words = '^\:\,^\:\,^\:\' endif - -let &cpo = s:cpo_save -unlet s:cpo_save -- cgit From ab1203b2eb567941b8fb3a2baa6ef383ae96d9da Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 13 Apr 2024 17:28:48 +0800 Subject: vim-patch:0549c503ba20 runtime(dts): include ftplugin support (vim/vim#14522) https://github.com/vim/vim/commit/0549c503ba20345097a14122f0a18dde69d470c5 Co-authored-by: wzy <32936898+Freed-Wu@users.noreply.github.com> --- runtime/ftplugin/dts.vim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 runtime/ftplugin/dts.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/dts.vim b/runtime/ftplugin/dts.vim new file mode 100644 index 0000000000..42e38338b7 --- /dev/null +++ b/runtime/ftplugin/dts.vim @@ -0,0 +1,16 @@ +" Vim filetype plugin file +" Language: dts/dtsi (device tree files) +" Maintainer: Wu, Zhenyu +" Latest Revision: 2024 Apr 12 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = 'setl inc< cms< com<' + +setlocal include=^\\%(#include\\\|/include/\\) +" same as C +setlocal commentstring& +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// -- cgit From bcfad7fe62d832d83c3c7eec0dc1f8a30d261757 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 15 Apr 2024 07:39:32 +0800 Subject: vim-patch:e92ed1b45c54 (#28337) runtime(vim): don't set compiler, update a comment for vimdoc compiler (vim/vim#14532) https://github.com/vim/vim/commit/e92ed1b45c5432235b0541521124d965b9d6a9a2 Co-authored-by: Shane-XB-Qian --- runtime/ftplugin/vim.vim | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index 3f9b4139de..5c99df7f5a 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Doug Kearns -" Last Change: 2024 Apr 08 +" Last Change: 2024 Apr 13 " Former Maintainer: Bram Moolenaar " Only do this when not done yet for this buffer @@ -15,8 +15,6 @@ let b:did_ftplugin = 1 let s:cpo_save = &cpo set cpo&vim -compiler vimdoc - if !exists('*VimFtpluginUndo') func VimFtpluginUndo() setl fo< isk< com< tw< commentstring< keywordprg< -- cgit From 537ba3495323a0dad555dbe2c7e08667c5d467e9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Apr 2024 09:32:55 +0800 Subject: vim-patch:4052474a1bd2 (#28358) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit runtime(java): Recognise non-ASCII identifiers (vim/vim#14543) * runtime(java): Recognise non-ASCII identifiers Also: - Remove the already commented out and less general in its definition javaFuncDef alternative. - Stop recognising some bespoke {p,trace} debugging API. Non-ASCII identifiers have been supported from the outset of the Java language. > An _identifier_ is an unlimited-length sequence of _Java > letters_ and _Java digits_, the first of which must be a > Java letter. An identifier cannot have the same spelling > (Unicode character sequence) as a keyword . . . Boolean > literal . . . or the null literal . . . > . . . . . . . . > Letters and digits may be drawn from the entire Unicode > character set . . . > . . . . . . . . > A Java letter is a character for which the method > Character.isJavaLetter . . . returns true. A Java > letter-or-digit is a character for which the method > Character.isJavaLetterOrDigit . . . returns true. > . . . . . . . . > The Java letters include . . . for historical reasons, the > ASCII underscore (_) . . . and dollar sign ($) . . . (Separate syntax tests will be written when particular parts now touched will have been further improved.) Reference: https://javaalmanac.io/jdk/1.0/langspec.pdf [§3.8] * Take on the maintenance of Java filetype and syntax files https://github.com/vim/vim/commit/4052474a1bd2fe756bc7dc596d29d0d7581e35ae Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com> --- runtime/ftplugin/java.vim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/java.vim b/runtime/ftplugin/java.vim index bb7e7cd72c..095e733715 100644 --- a/runtime/ftplugin/java.vim +++ b/runtime/ftplugin/java.vim @@ -1,10 +1,9 @@ " Vim filetype plugin file " Language: Java -" -" This runtime file is looking for a new maintainer. -" -" Former maintainer: Dan Sharp -" Last Change: 2012 Mar 11 +" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> +" Former Maintainer: Dan Sharp +" Repository: https://github.com/zzzyxwvut/java-vim.git +" Last Change: 2024 Apr 13 " 2024 Jan 14 by Vim Project (browsefilter) if exists("b:did_ftplugin") | finish | endif -- cgit From fb7ffac69fe4a32abfb4abfe5cf36213da17904d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Apr 2024 09:33:33 +0800 Subject: vim-patch:9.1.0326: filetype: some requirements files are not recognized (#28360) Problem: filetype: some requirements files are not recognized Solution: Detect '*-requirements.txt', 'constraints.txt', 'requirements.in', 'requirements/*.txt' and 'requires/*.txt' as requirements filetype, include pip compiler, include requirements filetype and syntax plugin (Wu, Zhenyu, @raimon49) closes: vim/vim#14379 https://github.com/vim/vim/commit/f9f5424d3e75bbdb35aa48fa6f9241d9479b35e8 Co-authored-by: Wu, Zhenyu Co-authored-by: raimon --- runtime/ftplugin/requirements.vim | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 runtime/ftplugin/requirements.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/requirements.vim b/runtime/ftplugin/requirements.vim new file mode 100644 index 0000000000..fcfc1ac269 --- /dev/null +++ b/runtime/ftplugin/requirements.vim @@ -0,0 +1,43 @@ +" the Requirements File Format syntax support for Vim +" Version: 1.8.0 +" Author: raimon +" Upstream: https://github.com/raimon49/requirements.txt.vim +" License: MIT LICENSE +" The MIT License (MIT) +" +" Copyright (c) 2015 raimon +" +" Permission is hereby granted, free of charge, to any person obtaining a copy +" of this software and associated documentation files (the "Software"), to deal +" in the Software without restriction, including without limitation the rights +" to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +" copies of the Software, and to permit persons to whom the Software is +" furnished to do so, subject to the following conditions: +" +" The above copyright notice and this permission notice shall be included in all +" copies or substantial portions of the Software. +" +" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +" SOFTWARE. +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:save_cpoptions = &cpoptions +set cpoptions&vim + +let b:undo_ftplugin = "setl iskeyword< commentstring<" +" pip options contain "-" +setlocal iskeyword+=- +setlocal commentstring=#\ %s +compiler pip_compile + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions +" vim: et sw=4 ts=4 sts=4: -- cgit From 9b485e3f429eac5f557d4f2de9002dc1afa4e102 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 16 Apr 2024 09:33:51 +0800 Subject: vim-patch:8a31de6dd275 (#28361) compiler(rime_deployer): include new compiler, use it for '*.custom.yaml' files (vim/vim#14460) https://github.com/vim/vim/commit/8a31de6dd275b3dc925fee556ccccd5db8ee2504 Co-authored-by: wzy <32936898+Freed-Wu@users.noreply.github.com> --- runtime/ftplugin/yaml.vim | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/yaml.vim b/runtime/ftplugin/yaml.vim index db7cbd7ddb..8bfc45e4c8 100644 --- a/runtime/ftplugin/yaml.vim +++ b/runtime/ftplugin/yaml.vim @@ -16,6 +16,13 @@ let b:undo_ftplugin = "setl com< cms< et< fo<" setlocal comments=:# commentstring=#\ %s expandtab setlocal formatoptions-=t formatoptions+=croql +" rime input method engine uses `*.custom.yaml` as its config files +if expand('%:r:e') ==# 'custom' + compiler rime_deployer + setlocal include=__include:\\s* + let b:undo_ftplugin ..= " inc<" +endif + if !exists("g:yaml_recommended_style") || g:yaml_recommended_style != 0 let b:undo_ftplugin ..= " sw< sts<" setlocal shiftwidth=2 softtabstop=2 -- cgit From 3e6a9fb599f0a774a62cb1090d89202af68aba63 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 19 Apr 2024 14:49:33 +0800 Subject: vim-patch:36e667ab837c (#28407) runtime(java): Support "g:ftplugin_java_source_path" with archived files Also, document for "g:ftplugin_java_source_path" its current modification of the local value of the 'path' option. closes: vim/vim#14570 https://github.com/vim/vim/commit/36e667ab837cd27b8c0c9df5c2db8008b2e1b76c Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com> --- runtime/ftplugin/java.vim | 53 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/java.vim b/runtime/ftplugin/java.vim index 095e733715..fa2b61075f 100644 --- a/runtime/ftplugin/java.vim +++ b/runtime/ftplugin/java.vim @@ -3,7 +3,7 @@ " Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com> " Former Maintainer: Dan Sharp " Repository: https://github.com/zzzyxwvut/java-vim.git -" Last Change: 2024 Apr 13 +" Last Change: 2024 Apr 18 " 2024 Jan 14 by Vim Project (browsefilter) if exists("b:did_ftplugin") | finish | endif @@ -22,8 +22,36 @@ set suffixes+=.class " name to / and append .java to the name, then search the path. setlocal includeexpr=substitute(v:fname,'\\.','/','g') setlocal suffixesadd=.java -if exists("g:ftplugin_java_source_path") - let &l:path=g:ftplugin_java_source_path . ',' . &l:path + +" Clean up in case this file is sourced again. +unlet! s:zip_func_upgradable + +" Documented in ":help ft-java-plugin". +if exists("g:ftplugin_java_source_path") && + \ type(g:ftplugin_java_source_path) == type("") + if filereadable(g:ftplugin_java_source_path) + if exists("#zip") && + \ g:ftplugin_java_source_path =~# '.\.\%(jar\|zip\)$' + if !exists("s:zip_files") + let s:zip_files = {} + endif + + let s:zip_files[bufnr('%')] = g:ftplugin_java_source_path + let s:zip_files[0] = g:ftplugin_java_source_path + let s:zip_func_upgradable = 1 + + function! JavaFileTypeZipFile() abort + let @/ = substitute(v:fname, '\.', '\\/', 'g') . '.java' + return get(s:zip_files, bufnr('%'), s:zip_files[0]) + endfunction + + " E120 for "inex=s:JavaFileTypeZipFile()" before v8.2.3900. + setlocal includeexpr=JavaFileTypeZipFile() + setlocal suffixesadd< + endif + else + let &l:path = g:ftplugin_java_source_path . ',' . &l:path + endif endif " Set 'formatoptions' to break comment lines but not other lines, @@ -52,6 +80,25 @@ let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" . \ " formatoptions< comments< commentstring< path< includeexpr<" . \ " | unlet! b:browsefilter" +" See ":help vim9-mix". +if !has("vim9script") + let &cpo = s:save_cpo + unlet s:save_cpo + finish +endif + +if exists("s:zip_func_upgradable") + delfunction! JavaFileTypeZipFile + + def! s:JavaFileTypeZipFile(): string + @/ = substitute(v:fname, '\.', '\\/', 'g') .. '.java' + return get(zip_files, bufnr('%'), zip_files[0]) + enddef + + setlocal includeexpr=s:JavaFileTypeZipFile() + setlocal suffixesadd< +endif + " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo -- cgit From 8d77061051d3d5e7b0eb067a0bf776f2c62a7133 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 19 Apr 2024 14:50:12 +0800 Subject: vim-patch:9.1.0354: runtime(uci): No support for uci file types (#28409) Problem: runtime(uci): No support for uci file types (Wu, Zhenyu) Solution: include basic uci ftplugin and syntax plugins (Colin Caine) closes: vim/vim#14575 https://github.com/vim/vim/commit/4b3fab14dbde971f15d8783e9ef125b19fdbc829 Co-authored-by: Colin Caine Co-authored-by: Wu, Zhenyu --- runtime/ftplugin/uci.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 runtime/ftplugin/uci.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/uci.vim b/runtime/ftplugin/uci.vim new file mode 100644 index 0000000000..984dab6c5f --- /dev/null +++ b/runtime/ftplugin/uci.vim @@ -0,0 +1,21 @@ +" Vim ftplugin file +" Language: OpenWrt Unified Configuration Interface +" Maintainer: Colin Caine +" Upstream: https://github.com/cmcaine/vim-uci +" Last Change: 2024 Apr 17 +" +" For more information on uci, see https://openwrt.org/docs/guide-user/base-system/uci + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +" UCI files are indented with tabs. +setl noexpandtab +setl shiftwidth=0 +setl softtabstop=0 + +setl commentstring=#\ %s + +let b:undo_ftplugin = "setlocal et< cms< sts< sw<" -- cgit From 57c8f68e3bc7c7e830202c8d63e475368de50076 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 19 Apr 2024 15:37:16 +0200 Subject: vim-patch:cee034112d41 runtime(bp): fix comment definition in filetype plugin (vim/vim#14594) I somehow messed up the previous patch, I think a copy-paste error when creating the file. Blueprint files have C and C++ style comments, not shell-like '#' comments. https://github.com/vim/vim/commit/cee034112d41372d4c31abc327c6536b24fc25bd Co-authored-by: Bruno BELANYI --- runtime/ftplugin/bp.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/bp.vim b/runtime/ftplugin/bp.vim index cb925cb0ec..5ddebe5233 100644 --- a/runtime/ftplugin/bp.vim +++ b/runtime/ftplugin/bp.vim @@ -1,14 +1,14 @@ " Blueprint build system filetype plugin file " Language: Blueprint " Maintainer: Bruno BELANYI -" Latest Revision: 2024-04-10 +" Latest Revision: 2024-04-19 if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 -setlocal comments=b:# -setlocal commentstring=#\ %s +setlocal comments=b://,s1:/*,mb:*,ex:*/ +setlocal commentstring=//\ %s let b:undo_ftplugin = "setlocal comments< commentstring<" -- cgit From 9e1bbb9813e0ea4e37f6325fe00e8f43617ef912 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 20 Apr 2024 18:07:52 +0200 Subject: vim-patch:564166f68184 ftplugin(cmake): Add include and suffixesadd closes: vim/vim#14520 https://github.com/vim/vim/commit/564166f68184071775cffffe331a9e12241be1ac Co-authored-by: Wu, Zhenyu --- runtime/ftplugin/cmake.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/cmake.vim b/runtime/ftplugin/cmake.vim index 94c007629b..9fcf87a759 100644 --- a/runtime/ftplugin/cmake.vim +++ b/runtime/ftplugin/cmake.vim @@ -2,6 +2,7 @@ " Language: CMake " Maintainer: Keith Smiley " Last Change: 2018 Aug 30 +" 2024 Apr 20 - add include and suffixadd (Vim Project) " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -15,7 +16,7 @@ set cpo&vim " Don't load another plugin for this buffer let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl commentstring<" +let b:undo_ftplugin = "setl inc< sua< commentstring<" if exists('loaded_matchit') let b:match_words = '\:\\|\:\' @@ -27,6 +28,8 @@ if exists('loaded_matchit') let b:undo_ftplugin .= "| unlet b:match_words" endif +setlocal include=\s*include +setlocal suffixesadd=.cmake,-config.cmake setlocal commentstring=#\ %s " restore 'cpo' and clean up buffer variable -- cgit From 7b8e582f1ce3ba604eb03418ee8366f74496ad3e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 21 Apr 2024 16:06:29 +0200 Subject: vim-patch:d3ff129ce8c6 runtime(astro): Add filetype, syntax and indent plugin related: vim/vim#14558 closes: vim/vim#14561 ported from: https://github.com/wuelnerdotexe/vim-astro https://github.com/vim/vim/commit/d3ff129ce8c68770c47d72ab3f30a21c19530eee Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com> --- runtime/ftplugin/astro.vim | 186 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 runtime/ftplugin/astro.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/astro.vim b/runtime/ftplugin/astro.vim new file mode 100644 index 0000000000..0b0e03447b --- /dev/null +++ b/runtime/ftplugin/astro.vim @@ -0,0 +1,186 @@ +" Vim filetype plugin file +" Language: Astro +" Maintainer: Romain Lafourcade +" Last Change: 2024 Apr 21 + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo-=C + +function! s:IdentifyScope(start, end) abort + let pos_start = searchpairpos(a:start, '', a:end, 'bnW') + let pos_end = searchpairpos(a:start, '', a:end, 'nW') + + return pos_start != [0, 0] + \ && pos_end != [0, 0] + \ && pos_start[0] != getpos('.')[1] +endfunction + +function! s:AstroComments() abort + if s:IdentifyScope('^---\n\s*\S', '^---\n\n') + \ || s:IdentifyScope('^\s*') + " ECMAScript comments + setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// + setlocal commentstring=//%s + + elseif s:IdentifyScope('^\s*') + " CSS comments + setlocal comments=s1:/*,mb:*,ex:*/ + setlocal commentstring=/*%s*/ + + else + " HTML comments + setlocal comments=s: + setlocal commentstring= + endif +endfunction + +" https://code.visualstudio.com/docs/languages/jsconfig +function! s:CollectPathsFromConfig() abort + let config_json = findfile('tsconfig.json', '.;') + + if empty(config_json) + let config_json = findfile('jsconfig.json', '.;') + + if empty(config_json) + return + endif + endif + + let paths_from_config = config_json + \ ->readfile() + \ ->filter({ _, val -> val =~ '^\s*[\[\]{}"0-9]' }) + \ ->join() + \ ->json_decode() + \ ->get('compilerOptions', {}) + \ ->get('paths', {}) + + if !empty(paths_from_config) + let b:astro_paths = paths_from_config + \ ->map({key, val -> [ + \ key->glob2regpat(), + \ val[0]->substitute('\/\*$', '', '') + \ ]}) + \ ->values() + endif + + let b:undo_ftplugin ..= " | unlet! b:astro_paths" +endfunction + +function! s:AstroInclude(filename) abort + let decorated_filename = a:filename + \ ->substitute("^", "@", "") + + let found_path = b: + \ ->get("astro_paths", []) + \ ->indexof({ key, val -> decorated_filename =~ val[0]}) + + if found_path != -1 + let alias = b:astro_paths[found_path][0] + let path = b:astro_paths[found_path][1] + \ ->substitute('\(\/\)*$', '/', '') + + return decorated_filename + \ ->substitute(alias, path, '') + endif + + return a:filename +endfunction + +let b:undo_ftplugin = "setlocal" + \ .. " formatoptions<" + \ .. " path<" + \ .. " suffixesadd<" + \ .. " matchpairs<" + \ .. " comments<" + \ .. " commentstring<" + \ .. " iskeyword<" + \ .. " define<" + \ .. " include<" + \ .. " includeexpr<" + +" Create self-resetting autocommand group +augroup Astro + autocmd! * +augroup END + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal formatoptions-=t +setlocal formatoptions+=croql + +" Remove irrelevant part of 'path'. +setlocal path-=/usr/include + +" Seed 'path' with default directories for :find, gf, etc. +setlocal path+=src/** +setlocal path+=public/** + +" Help Vim find extension-less filenames +let &l:suffixesadd = + \ ".astro" + \ .. ",.js,.jsx,.es,.es6,.cjs,.mjs,.jsm" + \ .. ",.json" + \ .. ",.scss,.sass,.css" + \ .. ",.svelte" + \ .. ",.ts,.tsx,.d.ts" + \ .. ",.vue" + +" From $VIMRUNTIME/ftplugin/html.vim +setlocal matchpairs+=<:> + +" Matchit configuration +if exists("loaded_matchit") + let b:match_ignorecase = 0 + + " From $VIMRUNTIME/ftplugin/javascript.vim + let b:match_words = + \ '\:\,' + \ .. '<\@<=\([^ \t>/]\+\)\%(\s\+[^>]*\%([^/]>\|$\)\|>\|$\):<\@<=/\1>,' + \ .. '<\@<=\%([^ \t>/]\+\)\%(\s\+[^/>]*\|$\):/>' + + " From $VIMRUNTIME/ftplugin/html.vim + let b:match_words ..= + \ ',' + \ .. '<:>,' + \ .. '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' + \ .. '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' + \ .. '<\@<=\([^/!][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>' + + let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words" +endif + +" Change what constitutes a word, mainly useful for CSS/SASS +setlocal iskeyword+=- +setlocal iskeyword+=$ +setlocal iskeyword+=% + +" Define paths/aliases for module resolution +call s:CollectPathsFromConfig() + +" Find ESM imports +setlocal include=^\\s*\\(import\\\|import\\s\\+[^\/]\\+from\\)\\s\\+['\"] + +" Process aliases if file can't be found +setlocal includeexpr=s:AstroInclude(v:fname) + +" Set 'define' to a comprehensive value +" From $VIMRUNTIME/ftplugin/javascript.vim and +" $VIMRUNTIME/ftplugin/sass.vim +let &l:define = + \ '\(^\s*(*async\s\+function\|(*function\)' + \ .. '\|^\s*\(\*\|static\|async\|get\|set\|\i\+\.\)' + \ .. '\|^\s*\(\ze\i\+\)\(([^)]*).*{$\|\s*[:=,]\)' + + +" Set &comments and &commentstring according to current scope +autocmd Astro CursorMoved call s:AstroComments() + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: textwidth=78 tabstop=8 shiftwidth=4 softtabstop=4 expandtab -- cgit From aef120d1e94e83a367a631d6bc8ce0b4a64f9dbd Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 22 Apr 2024 23:41:31 +0200 Subject: vim-patch:9.1.0366: filetype: ondir files are not recognized Problem: filetype: ondir files are not recognized Solution: Detect '.ondirrc' as ondir filetype (Jon Parise) closes: vim/vim#14604 https://github.com/vim/vim/commit/ea999037a41292b3d3e00700a87a82fe5d2c12b2 Co-authored-by: Jon Parise --- runtime/ftplugin/ondir.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 runtime/ftplugin/ondir.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/ondir.vim b/runtime/ftplugin/ondir.vim new file mode 100644 index 0000000000..0854578c91 --- /dev/null +++ b/runtime/ftplugin/ondir.vim @@ -0,0 +1,18 @@ +" Vim filetype plugin file +" Language: ondir +" Maintainer: Jon Parise + +if exists('b:did_ftplugin') + finish +endif + +let s:cpo_save = &cpoptions + +setlocal comments=:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl comments< commentstring<' + +let &cpoptions = s:cpo_save +unlet s:cpo_save + +" vim: et ts=4 sw=2 sts=2: -- cgit From 3a7c30dc93b9b903ff8591c43689c3bdcb4761de Mon Sep 17 00:00:00 2001 From: Brian Cao <75100021+RandomChugokujin@users.noreply.github.com> Date: Fri, 26 Apr 2024 14:14:45 -0400 Subject: fix(man.vim): q quits after jump to different tag in MANPAGER modified (#28495) --- runtime/ftplugin/man.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/man.vim b/runtime/ftplugin/man.vim index 277ce3c0b3..fdeaae4c3f 100644 --- a/runtime/ftplugin/man.vim +++ b/runtime/ftplugin/man.vim @@ -24,7 +24,7 @@ if !exists('g:no_plugin_maps') && !exists('g:no_man_maps') nnoremap k gk nnoremap gO :lua require'man'.show_toc() nnoremap <2-LeftMouse> :Man - if get(b:, 'pager') + if get(g:, 'pager') nnoremap q :lcloseq else nnoremap q :lclosec -- cgit From 0547347e72c1e345faf7b7d835a806bfb1f59b68 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 27 Apr 2024 10:31:09 +0200 Subject: vim-patch:79952b9c6774 runtime(jq): include syntax, ftplugin and compiler plugin closes: vim/vim#14619 https://github.com/vim/vim/commit/79952b9c6774d30f248a0ecf9ea84318be947fc4 Co-authored-by: Vito --- runtime/ftplugin/jq.vim | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 runtime/ftplugin/jq.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/jq.vim b/runtime/ftplugin/jq.vim new file mode 100644 index 0000000000..15cd400d34 --- /dev/null +++ b/runtime/ftplugin/jq.vim @@ -0,0 +1,18 @@ +" Vim compiler file +" Language: jq +" Maintainer: Vito +" Last Change: 2024 Apr 17 +" Upstream: https://github.com/vito-c/jq.vim + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +let b:undo_ftplugin = 'setl commentstring<' + +setlocal commentstring=#%s +compiler jq + +let &cpoptions = s:save_cpoptions +unlet s:save_cpoptions -- cgit From 672138245f7ed41bba516d50e9f8373b7e5036e2 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 29 Apr 2024 23:44:14 +0200 Subject: vim-patch:dc5c90554145 runtime(jq): remove undefined var s:save_cpoptions and add include setting closes: vim/vim#14661 closes: vim/vim#14663 https://github.com/vim/vim/commit/dc5c9055414501c438883c3b09ba8a3a7f983029 Co-authored-by: GodFather Co-authored-by: itchyny --- runtime/ftplugin/jq.vim | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/jq.vim b/runtime/ftplugin/jq.vim index 15cd400d34..88958e80dd 100644 --- a/runtime/ftplugin/jq.vim +++ b/runtime/ftplugin/jq.vim @@ -1,7 +1,7 @@ " Vim compiler file " Language: jq " Maintainer: Vito -" Last Change: 2024 Apr 17 +" Last Change: 2024 Apr 29 " Upstream: https://github.com/vito-c/jq.vim if exists('b:did_ftplugin') @@ -9,10 +9,8 @@ if exists('b:did_ftplugin') endif let b:did_ftplugin = 1 -let b:undo_ftplugin = 'setl commentstring<' - +setlocal include=^\\s*\\%(import\\\|include\\) setlocal commentstring=#%s compiler jq -let &cpoptions = s:save_cpoptions -unlet s:save_cpoptions +let b:undo_ftplugin = 'setl commentstring< include<' -- cgit From 234b5f67019b435b604308a96c366b1187c2cc3a Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 30 Apr 2024 01:04:42 +0200 Subject: docs: various fixes (#28208) Co-authored-by: Evgeni Chasnovski Co-authored-by: Famiu Haque Co-authored-by: Gregory Anders Co-authored-by: Guilherme Soares Co-authored-by: Jannik Buhr Co-authored-by: thomaswuhoileong <72001875+thomaswuhoileong@users.noreply.github.com> Co-authored-by: tom-anders <13141438+tom-anders@users.noreply.github.com> Co-authored-by: zeertzjq --- runtime/ftplugin/tutor.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/tutor.vim b/runtime/ftplugin/tutor.vim index 30783d9799..45ee582cba 100644 --- a/runtime/ftplugin/tutor.vim +++ b/runtime/ftplugin/tutor.vim @@ -19,7 +19,7 @@ setlocal noundofile setlocal keywordprg=:help setlocal iskeyword=@,-,_ -" The user will have to enable the folds himself, but we provide the foldexpr +" The user will have to enable the folds themself, but we provide the foldexpr " function. setlocal foldmethod=manual setlocal foldexpr=tutor#TutorFolds() -- cgit From 9e2f378b6d255cd4b02a39b1a1dc5aea2df1a84c Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 1 May 2024 18:46:10 +0200 Subject: vim-patch:9.1.0386: filetype: stylus files not recognized Problem: filetype: stylus files not recognized Solution: Detect '*.styl' and '*.stylus' as stylus filetype, include indent, filetype and syntax plugin (Philip H) closes: vim/vim#14656 https://github.com/vim/vim/commit/2d919d2744a99c9bb9e79984e85b8e8f5ec14c07 Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com> --- runtime/ftplugin/stylus.vim | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 runtime/ftplugin/stylus.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/stylus.vim b/runtime/ftplugin/stylus.vim new file mode 100644 index 0000000000..1c5f14eebe --- /dev/null +++ b/runtime/ftplugin/stylus.vim @@ -0,0 +1,54 @@ +" Vim filetype plugin +" Language: Stylus +" Maintainer: Marc Harter +" Credits: Tim Pope + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "All Files (*.*)\t*.*\n" + +runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim +unlet! b:did_ftplugin + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin + unlet b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter + unlet b:browsefilter +endif + +" Change the browse dialog on Win32 to show mainly Styl-related files +if has("gui_win32") + let b:browsefilter="Stylus Files (*.styl)\t*.styl\n" . s:browsefilter +endif + +setlocal comments= commentstring=//\ %s +setlocal suffixesadd=.styl +setlocal formatoptions+=r + +" Add '-' and '#' to the what makes up a keyword. +" This means that 'e' and 'w' work properly now, for properties +" and valid variable names. +setl iskeyword+=#,- + +" Add a Stylus command (to see if it's valid) +command -buffer Stylus !clear; cat % |stylus + + +let b:undo_ftplugin = "setl sua< isk< cms< com< fo< " + \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin + +let &cpo = s:save_cpo + +" vim:set sw=2: -- cgit From d8deb91819d68160e79c1259e9020171ae7e5593 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 7 May 2024 17:05:55 +0800 Subject: vim-patch:8d8cb45756cb (#28657) runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then :{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into less when bash's "help" fails. This was introduced by 2f25e40b1 (runtime: configure keywordpg for some file types (vim/vim#5566), 2023-08-23) and may be present in other files touched by that commit. Make the "man" invocation sensible by unsetting MANPAGER in the environment. Note that changing MANPAGER for `:terminal` is not needed; Vim within Vim is perfectly fine. closes: vim/vim#14679 https://github.com/vim/vim/commit/8d8cb45756cb7e6fda17013b8347be3a11b29610 Co-authored-by: D. Ben Knoble --- runtime/ftplugin/sh.vim | 6 +++--- runtime/ftplugin/zsh.vim | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/sh.vim b/runtime/ftplugin/sh.vim index 6d2093bf83..c47aa520e9 100644 --- a/runtime/ftplugin/sh.vim +++ b/runtime/ftplugin/sh.vim @@ -4,7 +4,7 @@ " Previous Maintainer: Dan Sharp " Contributor: Enno Nagel " Eisuke Kawashima -" Last Change: 2024 Feb 27 +" Last Change: 2024 May 06 by Vim Project (MANPAGER=) if exists("b:did_ftplugin") finish @@ -46,11 +46,11 @@ endif if get(b:, "is_bash", 0) if !has("gui_running") && executable("less") - command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "" 2>/dev/null || man ""; } | LESS= less"' | redraw! + command! -buffer -nargs=1 ShKeywordPrg silent exe '!bash -c "{ help "" 2>/dev/null || MANPAGER= man ""; } | LESS= less"' | redraw! elseif has("terminal") command! -buffer -nargs=1 ShKeywordPrg silent exe ':term bash -c "help "" 2>/dev/null || man """' else - command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help " 2>/dev/null || man ""') + command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help " 2>/dev/null || MANPAGER= man ""') endif setlocal keywordprg=:ShKeywordPrg let b:undo_ftplugin ..= " | setl kp< | sil! delc -buffer ShKeywordPrg" diff --git a/runtime/ftplugin/zsh.vim b/runtime/ftplugin/zsh.vim index 40986fccbe..aee890024f 100644 --- a/runtime/ftplugin/zsh.vim +++ b/runtime/ftplugin/zsh.vim @@ -2,7 +2,7 @@ " Language: Zsh shell script " Maintainer: Christian Brabandt " Previous Maintainer: Nikolai Weibull -" Latest Revision: 2023-10-07 +" Latest Revision: 2024 May 06 by Vim Project (MANPAGER=) " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-zsh @@ -24,7 +24,7 @@ if executable('zsh') && &shell !~# '/\%(nologin\|false\)$' elseif has('terminal') command! -buffer -nargs=1 ZshKeywordPrg silent exe ':term zsh -c "autoload -Uz run-help; run-help "' else - command! -buffer -nargs=1 ZshKeywordPrg echo system('zsh -c "autoload -Uz run-help; run-help 2>/dev/null"') + command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help 2>/dev/null"') endif if !exists('current_compiler') compiler zsh -- cgit From d3fa88b70f6f96ec4bc505968afec1dedb3b450b Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Wed, 8 May 2024 18:39:18 -0500 Subject: vim-patch:9.1.0396: filetype: jj files are not recognized (#28672) Problem: jj files are not recognized Solution: recognize '*.jjdescription' files as jj filetype (Gregory Anders) See: https://github.com/martinvonz/jj closes: vim/vim#14733 https://github.com/vim/vim/commit/6a4ea471d28107c4078e106ace1bdc0c54bf946b --- runtime/ftplugin/jj.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 runtime/ftplugin/jj.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/jj.vim b/runtime/ftplugin/jj.vim new file mode 100644 index 0000000000..cc5d700a30 --- /dev/null +++ b/runtime/ftplugin/jj.vim @@ -0,0 +1,19 @@ +" Vim filetype plugin +" Language: jj description +" Maintainer: Gregory Anders +" Last Change: 2024 May 8 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Use the same formatoptions and textwidth as the gitcommit ftplugin +setlocal nomodeline formatoptions+=tl textwidth=72 +setlocal formatoptions-=c formatoptions-=r formatoptions-=o formatoptions-=q formatoptions+=n +setlocal formatlistpat=^\\s*\\d\\+[\\]:.)}]\\s\\+\\\|^\\s*[-*+]\\s\\+ + +setlocal comments=b:JJ: +setlocal commentstring=JJ:\ %s + +let b:undo_ftplugin = 'setl modeline< formatoptions< textwidth< formatlistpat< comments< commentstring<' -- cgit From bb789bd872d91a0adca4e891de6397ec54eecc89 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 11 May 2024 22:03:18 +0200 Subject: vim-patch:86f6e2c2eed7 ftplugin(python): E16 fix, async keyword support for define (vim/vim#14751) This change includes the following changes: - Fix "E16: Invalid range" when using a count with jump to start/end of class/method - Update define with optional async keyword - Update maintainer email https://github.com/vim/vim/commit/86f6e2c2eed7df2bf5c60cc74d08d7a8d3c75f45 Co-authored-by: Tom Picton --- runtime/ftplugin/python.vim | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim index 79acaa6f08..3a7190201f 100644 --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -1,10 +1,9 @@ " Vim filetype plugin file " Language: python -" Maintainer: Tom Picton +" Maintainer: Tom Picton " Previous Maintainer: James Sully " Previous Maintainer: Johannes Zellner -" Last Change: Mon, 5 October 2020 -" 2024 Jan 14 by Vim Project (browsefilter) +" Last Change: 2024/05/11 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -15,7 +14,7 @@ set cpo&vim setlocal cinkeys-=0# setlocal indentkeys-=0# setlocal include=^\\s*\\(from\\\|import\\) -setlocal define=^\\s*\\(def\\\|class\\) +setlocal define=^\\s*\\([async ]\\?def\\\|class\\) " For imports with leading .., append / and replace additional .s with ../ let b:grandparent_match = '^\(.\.\)\(\.*\)' @@ -57,14 +56,14 @@ let b:next_end='\v\S\n*(%$\|^(\s*\n*)*(class\|def\|async def)\|^\S)' let b:prev_end='\v\S\n*(^(\s*\n*)*(class\|def\|async def)\|^\S)' if !exists('g:no_plugin_maps') && !exists('g:no_python_maps') - execute "nnoremap ]] :call Python_jump('n', '". b:next_toplevel."', 'W', v:count1)" - execute "nnoremap [[ :call Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)" - execute "nnoremap ][ :call Python_jump('n', '". b:next_endtoplevel."', 'W', v:count1, 0)" - execute "nnoremap [] :call Python_jump('n', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)" - execute "nnoremap ]m :call Python_jump('n', '". b:next."', 'W', v:count1)" - execute "nnoremap [m :call Python_jump('n', '". b:prev."', 'Wb', v:count1)" - execute "nnoremap ]M :call Python_jump('n', '". b:next_end."', 'W', v:count1, 0)" - execute "nnoremap [M :call Python_jump('n', '". b:prev_end."', 'Wb', v:count1, 0)" + execute "nnoremap ]] :call Python_jump('n', '". b:next_toplevel."', 'W', v:count1)" + execute "nnoremap [[ :call Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)" + execute "nnoremap ][ :call Python_jump('n', '". b:next_endtoplevel."', 'W', v:count1, 0)" + execute "nnoremap [] :call Python_jump('n', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)" + execute "nnoremap ]m :call Python_jump('n', '". b:next."', 'W', v:count1)" + execute "nnoremap [m :call Python_jump('n', '". b:prev."', 'Wb', v:count1)" + execute "nnoremap ]M :call Python_jump('n', '". b:next_end."', 'W', v:count1, 0)" + execute "nnoremap [M :call Python_jump('n', '". b:prev_end."', 'Wb', v:count1, 0)" execute "onoremap ]] :call Python_jump('o', '". b:next_toplevel."', 'W', v:count1)" execute "onoremap [[ :call Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)" -- cgit From e889f6781b19b091c23c78741ba2dfe54a34b758 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 13 May 2024 22:46:34 +0200 Subject: vim-patch:7961210b861c runtime(python): Fix wrong define regex in ftplugin (vim/vim#14763) https://github.com/vim/vim/commit/7961210b861ce9a1a773cfc1fe96b388216bb1f2 Co-authored-by: Tom Picton --- runtime/ftplugin/python.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim index 3a7190201f..c000296726 100644 --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -3,7 +3,7 @@ " Maintainer: Tom Picton " Previous Maintainer: James Sully " Previous Maintainer: Johannes Zellner -" Last Change: 2024/05/11 +" Last Change: 2024/05/13 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -14,7 +14,7 @@ set cpo&vim setlocal cinkeys-=0# setlocal indentkeys-=0# setlocal include=^\\s*\\(from\\\|import\\) -setlocal define=^\\s*\\([async ]\\?def\\\|class\\) +setlocal define=^\\s*\\(\\(async\\s\\+\\)\\?def\\\|class\\) " For imports with leading .., append / and replace additional .s with ../ let b:grandparent_match = '^\(.\.\)\(\.*\)' -- cgit From b3e04574037eb01b370d95622ea6c3e7e7f4725b Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Fri, 17 May 2024 18:47:41 +0200 Subject: vim-patch:cf78d0df51f2 runtime(sshdconfig): add basic ftplugin file for sshdconfig (vim/vim#14790) https://github.com/vim/vim/commit/cf78d0df51f2737f278a2410f166862001d875ae Co-authored-by: Yinzuo Jiang --- runtime/ftplugin/sshdconfig.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 runtime/ftplugin/sshdconfig.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/sshdconfig.vim b/runtime/ftplugin/sshdconfig.vim new file mode 100644 index 0000000000..3d394549bc --- /dev/null +++ b/runtime/ftplugin/sshdconfig.vim @@ -0,0 +1,10 @@ +" Vim filetype plugin file +" Language: OpenSSH server configuration file +" Maintainer: Yinzuo Jiang +" Latest Revision: 2024-05-17 + +if exists("b:did_ftplugin") + finish +endif + +runtime! ftplugin/conf.vim -- cgit From 8b07a189476aef031420148d1c4fca782353a6ad Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 19 May 2024 09:56:30 +0200 Subject: vim-patch:df859a36d390 runtime(sql): set commentstring for sql files in ftplugin closes: vim/vim#14800 https://github.com/vim/vim/commit/df859a36d390bda4241760155a0d2ae0be1bcbe9 Co-authored-by: Riley Bruins --- runtime/ftplugin/sql.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/sql.vim b/runtime/ftplugin/sql.vim index c85232f51b..61b7e67255 100644 --- a/runtime/ftplugin/sql.vim +++ b/runtime/ftplugin/sql.vim @@ -4,6 +4,7 @@ " Maintainer: David Fishburn " Last Change: 2017 Mar 07 " 2024 Jan 14 by Vim Project (browsefilter) +" 2024 May 18 by Vim Project (set comment options) " Download: http://vim.sourceforge.net/script.php?script_id=454 " For more details please use: @@ -105,6 +106,8 @@ set cpo&vim setlocal formatoptions-=t setlocal formatoptions+=c +setlocal comments=:-- commentstring=--\ %s + " Functions/Commands to allow the user to change SQL syntax dialects " through the use of :SQLSetType for completion. " This works with both Vim 6 and 7. @@ -266,7 +269,7 @@ if exists("b:did_ftplugin") && exists("b:current_ftplugin") && b:current_ftplugi finish endif -let b:undo_ftplugin = "setl comments< formatoptions< define< omnifunc<" . +let b:undo_ftplugin = "setl comments< commentstring< formatoptions< define< omnifunc<" . \ " | unlet! b:browsefilter b:match_words" " Don't load another plugin for this buffer -- cgit From ac19c7c8af945386917d7bbf043f14cc7e91c82d Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 19 May 2024 09:57:01 +0200 Subject: vim-patch:36e974fdf3f5 runtime(graphql): basic ftplugin file for graphql closes: vim/vim#14801 https://github.com/vim/vim/commit/36e974fdf3f5db1126bb8211e5a12462258da167 Co-authored-by: Riley Bruins --- runtime/ftplugin/graphql.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 runtime/ftplugin/graphql.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/graphql.vim b/runtime/ftplugin/graphql.vim new file mode 100644 index 0000000000..56f6e36e20 --- /dev/null +++ b/runtime/ftplugin/graphql.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: graphql +" Maintainer: Riley Bruins +" Last Change: 2024 May 18 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From ee3c49a44ea0e8b42984cbbed83ac444c3d8ca2e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 19 May 2024 09:57:21 +0200 Subject: vim-patch:4d7892bfb1db runtime(dart): add basic dart ftplugin file fixes vim/vim#14793 closes vim/vim#14802 https://github.com/vim/vim/commit/4d7892bfb1dbcc8ba19d9c60c63b3d11b758553f Co-authored-by: Riley Bruins --- runtime/ftplugin/dart.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 runtime/ftplugin/dart.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/dart.vim b/runtime/ftplugin/dart.vim new file mode 100644 index 0000000000..42c90c212f --- /dev/null +++ b/runtime/ftplugin/dart.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: dart +" Maintainer: Riley Bruins +" Last Change: 2024 May 18 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Set 'comments' to format dashed lists in comments. +" Also include ///, used for Doxygen. +setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From b16b287b8f36a8e25b27f3009d7fdd0d39348894 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 19 May 2024 11:36:11 +0200 Subject: vim-patch:9.1.0421: filetype: hyprlang files are not recognized Problem: filetype: hyprlang files are not recognized Solution: recognize 'hypr{land,paper,idle,lock}.conf' files as 'hyprlang' filetype, add hyprlang ftplugin (Riley Bruins) closes: vim/vim#14803 https://github.com/vim/vim/commit/5f1b115afd92544ce64d563da0d8ee9844abb10a Co-authored-by: Riley Bruins --- runtime/ftplugin/hyprlang.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 runtime/ftplugin/hyprlang.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/hyprlang.vim b/runtime/ftplugin/hyprlang.vim new file mode 100644 index 0000000000..5c186c3c5e --- /dev/null +++ b/runtime/ftplugin/hyprlang.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: hyprlang +" Maintainer: ribru17 +" Last Change: 2024 May 18 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From 31ca341d9265aaaf13361a0dcb7b137059c4e68d Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 May 2024 14:04:58 +0200 Subject: vim-patch:1b5e3d21f6f3 runtime(v): include basic v ftplugin for comment support (vim/vim#14806) https://github.com/vim/vim/commit/1b5e3d21f6f321824b3c4552a9fff24feeb64aab Co-authored-by: Riley Bruins --- runtime/ftplugin/v.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 runtime/ftplugin/v.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/v.vim b/runtime/ftplugin/v.vim new file mode 100644 index 0000000000..4d4f60d797 --- /dev/null +++ b/runtime/ftplugin/v.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: v +" Maintainer: Riley Bruins +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Set 'comments' to format dashed lists in comments. +" Also include ///, used for Doxygen. +setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From 27a3e92a87265aeb13ca823afdbe63f08977d792 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 May 2024 14:07:44 +0200 Subject: vim-patch:9c4d14dbb4ba runtime(prisma): include basic prisma ftplugin file (vim/vim#14807) Reference: https://www.prisma.io/docs/orm/prisma-schema/overview#comments https://github.com/vim/vim/commit/9c4d14dbb4baeb909ff62a943aed24968e3be6fe Co-authored-by: Riley Bruins --- runtime/ftplugin/prisma.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 runtime/ftplugin/prisma.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/prisma.vim b/runtime/ftplugin/prisma.vim new file mode 100644 index 0000000000..8b733da64c --- /dev/null +++ b/runtime/ftplugin/prisma.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: prisma +" Maintainer: Riley Bruins +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=:///,:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From 7d6a8438c927693701ee60be9d09581a12345270 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 May 2024 14:15:35 +0200 Subject: vim-patch:c3d5c2fc8721 runtime(typst): include basic typst ftplugin file (vim/vim#14809) Reference: https://typst.app/docs/reference/syntax/#comments https://github.com/vim/vim/commit/c3d5c2fc87212865ee73738cd381ddbaf8132c33 Co-authored-by: Riley Bruins --- runtime/ftplugin/typst.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 runtime/ftplugin/typst.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/typst.vim b/runtime/ftplugin/typst.vim new file mode 100644 index 0000000000..c2d7811ace --- /dev/null +++ b/runtime/ftplugin/typst.vim @@ -0,0 +1,14 @@ +" Vim filetype plugin +" Language: typst +" Maintainer: Riley Bruins +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// +setlocal commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From 2dfce05ec9fba1bd16b63355e7d75864090295ca Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 May 2024 14:15:53 +0200 Subject: vim-patch:957d903cb7af runtime(arduino): Add Arduino ftplugin and indent files (vim/vim#14811) We already have Arduino syntax file, but we didn't have ftplugin and indent files. This commit adds a basic ftplugin file and a basic indent file. Both of them are derived from {ftplugin,indent}/c.vim. https://github.com/vim/vim/commit/957d903cb7af41539efd3195d053293987af85d9 Co-authored-by: K.Takata --- runtime/ftplugin/arduino.vim | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 runtime/ftplugin/arduino.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/arduino.vim b/runtime/ftplugin/arduino.vim new file mode 100644 index 0000000000..dae3dd83d3 --- /dev/null +++ b/runtime/ftplugin/arduino.vim @@ -0,0 +1,66 @@ +" Vim filetype plugin file +" Language: Arduino +" Maintainer: The Vim Project +" Ken Takata +" Last Change: 2024 Apr 12 +" +" Most of the part was copied from c.vim. + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +" Using line continuation here. +let s:cpo_save = &cpo +set cpo-=C + +let b:undo_ftplugin = "setl fo< com< ofu< cms< def< inc<" + +if !exists("g:arduino_recommended_style") || g:arduino_recommended_style != 0 + " Use the default setting of Arduino IDE. + setlocal expandtab tabstop=2 softtabstop=2 shiftwidth=2 + let b:undo_ftplugin ..= " et< ts< sts< sw<" +endif + +" Set 'formatoptions' to break comment lines but not other lines, +" and insert the comment leader when hitting or using "o". +setlocal fo-=t fo+=croql + +" These options have the right value as default, but the user may have +" overruled that. +setlocal commentstring& define& include& + +" Set completion with CTRL-X CTRL-O to autoloaded function. +if exists('&ofu') + setlocal ofu=ccomplete#Complete +endif + +" Set 'comments' to format dashed lists in comments. +" Also include ///, used for Doxygen. +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// + +" When the matchit plugin is loaded, this makes the % command skip parens and +" braces in comments properly. +if !exists("b:match_words") + let b:match_words = '^\s*#\s*if\(\|def\|ndef\)\>:^\s*#\s*elif\>:^\s*#\s*else\>:^\s*#\s*endif\>' + let b:match_skip = 's:comment\|string\|character\|special' + let b:undo_ftplugin ..= " | unlet! b:match_skip b:match_words" +endif + +" Win32 and GTK can filter files in the browse dialog +if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") + let b:browsefilter = "Arduino Source Files (*.ino, *.pde)\t*.ino;*.pde\n" + if has("win32") + let b:browsefilter ..= "All Files (*.*)\t*\n" + else + let b:browsefilter ..= "All Files (*)\t*\n" + endif + let b:undo_ftplugin ..= " | unlet! b:browsefilter" +endif + +let &cpo = s:cpo_save +unlet s:cpo_save -- cgit From 6745cd8d7202c1c6394fb787aa335f68b2077b95 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 May 2024 14:16:33 +0200 Subject: vim-patch:f295050fa524 runtime(nim): basic nim ftplugin file for comments (vim/vim#14812) Reference: https://nim-by-example.github.io/comments/#:~:text=Comments%20in%20Nim%20begin%20with%20the%20hash%20character.&text=Multiline%20or%20block%20comments%20begin,line%20comments%20can%20be%20nested. https://github.com/vim/vim/commit/f295050fa524b3a58289d12d3477b52a8610794f Co-authored-by: Riley Bruins --- runtime/ftplugin/nim.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 runtime/ftplugin/nim.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/nim.vim b/runtime/ftplugin/nim.vim new file mode 100644 index 0000000000..4ab8b7b536 --- /dev/null +++ b/runtime/ftplugin/nim.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: nim +" Maintainer: Riley Bruins +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=exO:]#,fs1:#[,mb:*,ex:]#,:# commentstring=#\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From 70c0b03e61194766ec5b59e43ff2e98826d03048 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 May 2024 14:21:18 +0200 Subject: vim-patch:9.1.0424: filetype: slint files are not recognized Problem: filetype: slint files are not recognized Solution: Detect '*.slint' files as slint filetype, include basic sling filetype plugin (Riley Bruins) closes: vim/vim#14808 https://github.com/vim/vim/commit/aa3104b07a3e5e7cc41310f1fbfb00f71ef801a2 Co-authored-by: Riley Bruins --- runtime/ftplugin/slint.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 runtime/ftplugin/slint.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/slint.vim b/runtime/ftplugin/slint.vim new file mode 100644 index 0000000000..ac8057f39d --- /dev/null +++ b/runtime/ftplugin/slint.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: slint +" Maintainer: Riley Bruins +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Set 'comments' to format dashed lists in comments. +" Also include ///, used for Doxygen. +setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From 5c2616846aa4d85ba96adefea98ed50f46f7a291 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 May 2024 14:24:46 +0200 Subject: vim-patch:9.1.0425: filetype: purescript files are not recognized Problem: filetype: purescript files are not recognized Solution: recognize '*.purs' files as purescript filetype, include basic purescript filetype plugin (Riley Bruins) Reference: https://github.com/purescript/documentation/blob/master/language/Syntax.md#comments closes: vim/vim#14813 https://github.com/vim/vim/commit/155583a5c317881e60828e3972383436ac197ee8 Co-authored-by: Riley Bruins --- runtime/ftplugin/purescript.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 runtime/ftplugin/purescript.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/purescript.vim b/runtime/ftplugin/purescript.vim new file mode 100644 index 0000000000..b3300bb324 --- /dev/null +++ b/runtime/ftplugin/purescript.vim @@ -0,0 +1,14 @@ +" Vim filetype plugin +" Language: purescript +" Maintainer: Riley Bruins +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=s1f:{-,mb:\ ,ex:-},:--\ \|,:-- +setl commentstring=--\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit From 666911be917d60ba3a19a4b56bbf1e8c16da5297 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 20 May 2024 19:16:02 +0200 Subject: vim-patch:69dff00dfb37 runtime(verilog): set commentstring option closes: vim/vim#14810 https://github.com/vim/vim/commit/69dff00dfb37077f4a80fd9635ea963889ad4b49 Co-authored-by: Riley Bruins --- runtime/ftplugin/verilog.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/verilog.vim b/runtime/ftplugin/verilog.vim index 83c3754e05..c20be25865 100644 --- a/runtime/ftplugin/verilog.vim +++ b/runtime/ftplugin/verilog.vim @@ -3,6 +3,7 @@ " Maintainer: Chih-Tsun Huang " Last Change: 2017 Aug 25 by Chih-Tsun Huang " 2024 Jan 14 by Vim Project (browsefilter) +" 2024 May 20 by Riley Bruins (commentstring) " URL: http://www.cs.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim " " Credits: @@ -22,7 +23,7 @@ let s:cpo_save = &cpo set cpo&vim " Undo the plugin effect -let b:undo_ftplugin = "setlocal fo< com< tw<" +let b:undo_ftplugin = "setlocal fo< com< tw< cms<" \ . "| unlet! b:browsefilter b:match_ignorecase b:match_words" " Set 'formatoptions' to break comment lines but not other lines, @@ -31,6 +32,7 @@ setlocal fo-=t fo+=croqlm1 " Set 'comments' to format dashed lists in comments. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// +setlocal commentstring=//\ %s " Format comments to be up to 78 characters long if &textwidth == 0 -- cgit From d6be78cc98c49076f8b6c5b641b7ed403f4377c5 Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Tue, 21 May 2024 18:51:51 -0500 Subject: vim-patch:d1d9316: runtime(zig): refactor zig ftplugin, remove auto format (#28904) Refactored zig ftplugin, removed upstream comment, aucmd and auto formatting support. Updated documentation for zig configuration settings and added new maintainer. closes: vim/vim#13803 https://github.com/vim/vim/commit/d1d9316c6621d275593f58664975faf0fc23985f Co-authored-by: Tiseno --- runtime/ftplugin/zig.vim | 60 ++++++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 38 deletions(-) (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/zig.vim b/runtime/ftplugin/zig.vim index 28b8cd5a67..ea229b6a49 100644 --- a/runtime/ftplugin/zig.vim +++ b/runtime/ftplugin/zig.vim @@ -1,68 +1,52 @@ " Vim filetype plugin file -" Language: Zig -" Upstream: https://github.com/ziglang/zig.vim +" Language: Zig +" Maintainer: Mathias Lindgren +" Last Change: 2024 May 21 +" Based on: https://github.com/ziglang/zig.vim -" Only do this when not done yet for this buffer if exists("b:did_ftplugin") finish endif let b:did_ftplugin = 1 -let s:cpo_orig = &cpo +let s:cpo_save = &cpo set cpo&vim compiler zig_build " Match Zig builtin fns setlocal iskeyword+=@-@ - -" Recommended code style, no tabs and 4-space indentation -setlocal expandtab -setlocal tabstop=8 -setlocal softtabstop=4 -setlocal shiftwidth=4 - setlocal formatoptions-=t formatoptions+=croql - -setlocal suffixesadd=.zig,.zir +setlocal suffixesadd=.zig,.zir,.zon +let &l:define='\v(|||^\s*\#\s*define)' +let b:undo_ftplugin = 'setl isk< fo< sua< mp< def<' + +if get(g:, 'zig_recommended_style', 1) + setlocal expandtab + setlocal tabstop=8 + setlocal softtabstop=4 + setlocal shiftwidth=4 + let b:undo_ftplugin .= ' | setl et< ts< sts< sw<' +endif if has('comments') setlocal comments=:///,://!,:// setlocal commentstring=//\ %s + let b:undo_ftplugin .= ' | setl com< cms<' endif if has('find_in_path') let &l:includeexpr='substitute(v:fname, "^([^.])$", "\1.zig", "")' let &l:include='\v(\@import>|\@cInclude>|^\s*\#\s*include)' -endif - -let &l:define='\v(|||^\s*\#\s*define)' - -" Safety check: don't execute zig from current directory -if !exists('g:zig_std_dir') && exists('*json_decode') && - \ executable('zig') && dist#vim#IsSafeExecutable('zig', 'zig') - silent let s:env = system('zig env') - if v:shell_error == 0 - let g:zig_std_dir = json_decode(s:env)['std_dir'] - endif - unlet! s:env + let b:undo_ftplugin .= ' | setl inex< inc<' endif if exists('g:zig_std_dir') - let &l:path = g:zig_std_dir . ',' . &l:path + let &l:path .= ',' . g:zig_std_dir + let b:undo_ftplugin .= ' | setl pa<' endif -let b:undo_ftplugin = - \ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<' - -augroup vim-zig - autocmd! * - autocmd BufWritePre if get(g:, 'zig_fmt_autosave', 1) | call zig#fmt#Format() | endif -augroup END - -let b:undo_ftplugin .= '|au! vim-zig * ' - -let &cpo = s:cpo_orig -unlet s:cpo_orig +let &cpo = s:cpo_save +unlet s:cpo_save " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab -- cgit From 3d43bdc81e4e0a7acf60050f1b749429516d30fa Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 22 May 2024 18:47:02 +0200 Subject: vim-patch:802fc04: runtime(rescript): include basic rescript ftplugin file (vim/vim#14822) Reference: https://rescript-lang.org/docs/manual/latest/overview#comments https://github.com/vim/vim/commit/802fc04a78a7d98673dc9171d4b89597447a5bda Co-authored-by: Riley Bruins --- runtime/ftplugin/rescript.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 runtime/ftplugin/rescript.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/rescript.vim b/runtime/ftplugin/rescript.vim new file mode 100644 index 0000000000..dd94c68799 --- /dev/null +++ b/runtime/ftplugin/rescript.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: rescript +" Maintainer: Riley Bruins +" Last Change: 2024 May 21 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit