aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-11-19 22:33:30 +0100
committerChristian Clason <ch.clason+github@icloud.com>2024-11-20 09:31:15 +0100
commit23ead4f2cb19b05d83f1c515b35bd5896ee77365 (patch)
tree4da1c530e49d60f817c25d76d8eb8ffc35e8bbc0 /runtime/ftplugin
parent4c85c217d384c79013401f09b329467c53c8a01c (diff)
downloadrneovim-23ead4f2cb19b05d83f1c515b35bd5896ee77365.tar.gz
rneovim-23ead4f2cb19b05d83f1c515b35bd5896ee77365.tar.bz2
rneovim-23ead4f2cb19b05d83f1c515b35bd5896ee77365.zip
vim-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: vim/vim#15825 https://github.com/vim/vim/commit/e2c27ca8eff7cc8ec852b531d5a7f328a343a761 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Diffstat (limited to 'runtime/ftplugin')
-rw-r--r--runtime/ftplugin/opencl.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/ftplugin/opencl.vim b/runtime/ftplugin/opencl.vim
new file mode 100644
index 0000000000..e8570fbe95
--- /dev/null
+++ b/runtime/ftplugin/opencl.vim
@@ -0,0 +1,12 @@
+" Vim filetype plugin file
+" Language: OpenCL
+" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
+" Last Change: 2024 Nov 19
+
+if exists("b:did_ftplugin") | finish | endif
+let b:did_ftplugin = 1
+
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
+setlocal commentstring=/*\ %s\ */ define& include&
+
+let b:undo_ftplugin = "setl commentstring< comments<"