From 0e1b19120995c5ba488cbe16a5281a1bf4af3aab Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Mon, 18 Apr 2022 06:03:02 -0400 Subject: Check if TestFiletypeFuncs exists before defining it (#788) Fixes #783 --- extras/filetype.vim | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/extras/filetype.vim b/extras/filetype.vim index f6cb13a1..391c2d49 100644 --- a/extras/filetype.vim +++ b/extras/filetype.vim @@ -2506,17 +2506,20 @@ endif " Function called for testing all functions defined here. These are " script-local, thus need to be executed here. " Returns a string with error messages (hopefully empty). -func! TestFiletypeFuncs(testlist) - let output = '' - for f in a:testlist - try - exe f - catch - let output = output . "\n" . f . ": " . v:exception - endtry - endfor - return output -endfunc +" Check if function exists first. See https://github.com/vim/vim/issues/9890 +if !exists("*TestFiletypeFuncs") + func! TestFiletypeFuncs(testlist) + let output = '' + for f in a:testlist + try + exe f + catch + let output = output . "\n" . f . ": " . v:exception + endtry + endfor + return output + endfunc +endif " Restore 'cpoptions' let &cpo = s:cpo_save -- cgit v1.2.3 From 32d08013a68efb59f0800f398dbfc64237346f35 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Mon, 18 Apr 2022 06:03:43 -0400 Subject: Fix doubled comma in autocmd (#791) The doubled comma (,,) in the list of autocmd patterns introduces a blank pattern which matches all filenames in the most recent version of neovim, causing the default filetype to be sh unless another rule overrides it. --- autoload/polyglot/init.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/polyglot/init.vim b/autoload/polyglot/init.vim index edf1f2bc..3d226bb3 100644 --- a/autoload/polyglot/init.vim +++ b/autoload/polyglot/init.vim @@ -3510,7 +3510,7 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind') au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog') " Shell scripts ending in a star -au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call polyglot#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD* call polyglot#ft#SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc* call polyglot#ft#SetFileTypeSH("ksh") au BufNewFile,BufRead .profile* call polyglot#ft#SetFileTypeSH(getline(1)) -- cgit v1.2.3 From 8bb92037902a697077259fe4b6f953d00218f7ac Mon Sep 17 00:00:00 2001 From: Josa Gesell Date: Mon, 18 Apr 2022 12:04:09 +0200 Subject: Add missing filetypes for go.sum and go.work (#789) * Add filetype for go.sum * Add filetype for go.work --- packages.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages.yaml b/packages.yaml index e0b3db52..05eee759 100644 --- a/packages.yaml +++ b/packages.yaml @@ -686,6 +686,12 @@ filetypes: - name: gomod filenames: - go.mod +- name: gosum + filenames: + - go.sum +- name: gowork + filenames: + - go.work - name: gohtmltmpl extensions: - tmpl -- cgit v1.2.3 -- cgit v1.2.3 From 55eed00f71914e21c804cc0b8f271b04f4e11c2b Mon Sep 17 00:00:00 2001 From: Carl Smedstad Date: Mon, 18 Apr 2022 12:05:30 +0200 Subject: Add support for Microsoft's DSL Bicep (#776) See: https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/overview --- README.md | 3 ++- packages.yaml | 8 ++++++++ tests/filetypes.vim | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b582223..8943c5fe 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A collection of language packs for Vim. > One to rule them all, one to find them, one to bring them all and in the darkness bind them. - It **won't affect your startup time**, as scripts are loaded only on demand\*. -- It **installs and updates 120+ times faster** than the 598 packages it consists of. +- It **installs and updates 120+ times faster** than the 599 packages it consists of. - It is also more secure (scripts loaded for every filetype are generated by vim-polyglot) - Best syntax and indentation support (no other features). Hand-selected language packs. - Automatically detects indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth), can be disabled) @@ -55,6 +55,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr - [arduino](https://github.com/sudar/vim-arduino-syntax) (Processing syntax highlighting for pde and ino files) - [asciidoc](https://github.com/asciidoc/vim-asciidoc) (AsciiDoc syntax highlighting for asciidoc, adoc and asc files) - [autohotkey](https://github.com/hnamikaw/vim-autohotkey) (AutoHotkey syntax highlighting for ahk and ahkl files) +- [bicep](https://github.com/carlsmedstad/vim-bicep) (Syntax highlighting for bicep files) - [blade](https://github.com/jwalton512/vim-blade) (Blade syntax highlighting for blade and blade.php files) - [brewfile](https://github.com/bfontaine/Brewfile.vim) - [c/c++](https://github.com/vim-jp/vim-cpp) (C++ and C syntax highlighting for cpp, c++, cc, cp, cxx and 18 more files) diff --git a/packages.yaml b/packages.yaml index 05eee759..7753cb24 100644 --- a/packages.yaml +++ b/packages.yaml @@ -5552,3 +5552,11 @@ name: zinit remote: zdharma-continuum/zinit-vim-syntax@main # just adds to zsh filetype filetypes: [] +--- +name: bicep +remote: carlsmedstad/vim-bicep +filetypes: +- name: bicep + patterns: + - pattern: '*.bicep' + description: Microsoft Bicep diff --git a/tests/filetypes.vim b/tests/filetypes.vim index 6f7c5f05..584008e0 100644 --- a/tests/filetypes.vim +++ b/tests/filetypes.vim @@ -646,6 +646,7 @@ call TestFiletype('nftables') call TestFiletype('openscad') call TestFiletype('mermaid') call TestFiletype('org') +call TestFiletype('bicep') " DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE -- cgit v1.2.3