mirror of
https://github.com/wuelnerdotexe/vim-astro.git
synced 2025-12-06 09:14:26 +08:00
fix(syntax): the astro fence is detected correctly
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user