mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -04:00
13 lines
326 B
VimL
13 lines
326 B
VimL
" Last Change: 2021 Dec 13
|
|
|
|
function! s:foamFile(path)
|
|
let l:lines = getline(1, 10)
|
|
for line in lines
|
|
if match(line, 'FoamFile') >= 0
|
|
set filetype=foam
|
|
endif
|
|
endfor
|
|
endfunction
|
|
|
|
autocmd BufNewFile,BufRead * call s:foamFile(expand("%"))
|
|
autocmd FileType cpp call s:foamFile(expand("%"))
|