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>
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim
index 214cf6e..0936a85 100644
--- a/runtime/autoload/dist/ft.vim
+++ b/runtime/autoload/dist/ft.vim
@@ -144,6 +144,14 @@
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