mirror of
https://github.com/DingDean/wgsl.vim
synced 2024-09-16 13:34:04 +02:00
use :setfiletype
for setting filetype when no filetype is set yet
15d9890eee/runtime/doc/options.txt (L376-L385)
This commit is contained in:
parent
46f7df4dec
commit
23615cca0f
1 changed files with 1 additions and 7 deletions
|
@ -1,7 +1 @@
|
|||
autocmd BufRead,BufNewFile *.wgsl call s:set_wgsl_filetype()
|
||||
|
||||
function! s:set_wgsl_filetype() abort
|
||||
if &filetype !=# 'wgsl'
|
||||
set filetype=wgsl
|
||||
endif
|
||||
endfunction
|
||||
autocmd BufRead,BufNewFile *.wgsl setfiletype wgsl
|
||||
|
|
Loading…
Reference in a new issue