patch 9.1.0876: filetype: openCL files are not recognized
Problem: filetype: openCL files are not recognized
Solution: detect '*.cl' files as opencl or lisp filetype,
include a opencl syntax and filetype plugin (Wu, Zhenyu)
closes: #15825
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
a13bd294ab
commit
e2c27ca8ef
8
runtime/autoload/dist/ft.vim
vendored
8
runtime/autoload/dist/ft.vim
vendored
@ -144,6 +144,14 @@ export def FTcfg()
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTcl()
|
||||
if join(getline(1, 4), '') =~ '/\*'
|
||||
setf opencl
|
||||
else
|
||||
setf lisp
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTcls()
|
||||
if exists("g:filetype_cls")
|
||||
exe "setf " .. g:filetype_cls
|
||||
|
||||
Reference in New Issue
Block a user