fix(syntax): the astro fence is detected correctly

This commit is contained in:
Wuelner Martínez
2022-08-22 16:20:38 -06:00
parent 09de18d920
commit ef5126c84a
6 changed files with 32 additions and 17 deletions

View File

@@ -1,12 +1,16 @@
" Vim ftdetect file.
" Language: Astro
" Author: Wuelner Martínez <wuelner.martinez@outlook.com>
" Maintainer: Wuelner Martínez <wuelner.martinez@outlook.com>
" URL: https://github.com/wuelnerdotexe/vim-astro
" Last Change: 2022 Aug 05
" Based On: Evan Lecklider's vim-svelte
" Changes: See https://github.com/evanleck/vim-svelte
" Credits: See vim-svelte on github
" Last Change: 2022 Aug 22
" Whether to set the Astro filetype on *.astro files.
autocmd BufNewFile,BufRead *.astro setfiletype astro
function! s:DetectFiletypeAstro()
if (&filetype ==# '') || (&filetype !=# 'astro')
setfiletype astro
endif
endfunction
autocmd BufNewFile,BufRead *.astro call <SID>DetectFiletypeAstro()
" vim: ts=8