diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-05-20 17:06:38 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-05-20 17:06:38 +0200 |
commit | 74cb75beddf9f667b023d9362b98402c7c5a7d9c (patch) | |
tree | ee1a5bfa004a93bda6e6a4645af26203daef309c /ftdetect | |
parent | 42529540df6d80a39756d18550de82a6cee50141 (diff) | |
download | vim-polyglot-74cb75beddf9f667b023d9362b98402c7c5a7d9c.tar.gz vim-polyglot-74cb75beddf9f667b023d9362b98402c7c5a7d9c.zip |
Add vim-raku, closes #490
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/polyglot.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 315da8c6..c219b7f2 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -1201,6 +1201,27 @@ au BufRead,BufNewFile *.rkt,*.rktl call RacketDetectHashLang() augroup end endif +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raku') == -1 + augroup filetypedetect + " raku, from raku.vim in Raku/vim-raku +" whenever a named file is created, writen or read, +" set raku filetype if the extension is one of those: +" https://github.com/Raku/problem-solving/blob/master/solutions/language/Path-to-Raku.md#extensions + +autocmd BufNewFile,BufWritePost,BufReadPost +\ *.pm6,*.p6,*.t6,*.pod6,*.raku,*.rakumod,*.rakudoc,*.rakutest +\ set filetype=raku + +" whenever a named file is written or read, +" set raku filetype if there is a shebang with raku in it + +autocmd BufWritePost,BufReadPost * +\ if getline(1) =~ '^#!.*raku' | +\ setf raku | +\ endif + augroup end +endif + if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raml') == -1 augroup filetypedetect " raml, from raml.vim in IN3D/vim-raml |