mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
vim-patch:d96f25bd69c1
runtime(fortran): update syntax and documentation (vim/vim#13784)
* Update Fortran section of indent.txt
* Small addition to fortran syntax
* Update Fortran section of syntax.txt
* Runtime (Fortran)
Fix regression
* Combine two expressions
d96f25bd69
Co-authored-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
" Vim syntax file
|
||||
" Language: Fortran 2023 (and Fortran 2018, 2008, 2003, 95, 90, and 77)
|
||||
" Version: (v108) 2023 December 22
|
||||
" Version: (v109) 2023 December 29
|
||||
" Maintainers: Ajit J. Thakkar <ajit@unb.ca>; <https://ajit.ext.unb.ca/>
|
||||
" Joshua Hollett <j.hollett@uwinnipeg.ca>
|
||||
" Usage: For instructions, do :help fortran-syntax from Vim
|
||||
@@ -133,8 +133,8 @@ syn keyword fortranAttribute abstract external private public protected inten
|
||||
syn keyword fortranAttribute pointer target allocatable dimension codimension sequence parameter save
|
||||
|
||||
syn keyword fortranUnitHeader result operator assignment
|
||||
syn match fortranUnitHeader "\(end\s*\)\?\(subroutine\|function\|module\|program\|submodule\)\>"
|
||||
syn match fortranBlock "\(end\s*\)\?\(block\|critical\|associate\)\>"
|
||||
syn match fortranUnitHeader "\<\(end\s*\)\?\(subroutine\|function\|module\|program\|submodule\)\>"
|
||||
syn match fortranBlock "\<\(end\s*\)\?\(block\|critical\|associate\)\>"
|
||||
syn match fortranCalled "\(call\s\+\)\@7<=\a\w*"
|
||||
syn match fortranRepeat "\<do\>"
|
||||
syn keyword fortranRepeat concurrent
|
||||
@@ -349,6 +349,9 @@ endif
|
||||
|
||||
if exists("fortran_fold")
|
||||
|
||||
if has("folding")
|
||||
setlocal foldmethod=syntax
|
||||
endif
|
||||
if (b:fortran_fixed_source == 1)
|
||||
syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule
|
||||
syn region fortranModule transparent fold keepend start="^\s*submodule\s\+(\a\w*\s*\(:\a\w*\s*\)*)\s*\z\(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(submodule\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram,fortranModule
|
||||
|
||||
Reference in New Issue
Block a user