mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-09 06:50:06 -04:00
Add OpenFOAM parser
This commit is contained in:
parent
50fee51d35
commit
16e77495c4
9 changed files with 131 additions and 0 deletions
13
after/ftdetect/foam.vim
Normal file
13
after/ftdetect/foam.vim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
" 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("%"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue