diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2022-04-18 12:08:03 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2022-04-18 12:08:03 +0200 |
commit | aae85fe8c2a5878aee89ff8025306f3142962b5f (patch) | |
tree | 0cd2cb4931c73ceccd5e11bf27f53ab55efd19bc | |
parent | a4f98d2a9e9dfeb110d4a910ea177432fec88b81 (diff) | |
parent | 55eed00f71914e21c804cc0b8f271b04f4e11c2b (diff) | |
download | vim-polyglot-aae85fe8c2a5878aee89ff8025306f3142962b5f.tar.gz vim-polyglot-aae85fe8c2a5878aee89ff8025306f3142962b5f.zip |
Merge branch 'master' of https://github.com/sheerun/vim-polyglot
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | autoload/polyglot/init.vim | 2 | ||||
-rw-r--r-- | extras/filetype.vim | 25 | ||||
-rw-r--r-- | packages.yaml | 14 | ||||
-rw-r--r-- | tests/filetypes.vim | 1 |
5 files changed, 32 insertions, 13 deletions
@@ -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 <!--Package Count-->598<!--/Package Count--> packages it consists of. +- It **installs and updates 120+ times faster** than the <!--Package Count-->599<!--/Package Count--> 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/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)) 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 diff --git a/packages.yaml b/packages.yaml index e0b3db52..7753cb24 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 @@ -5546,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 |