summaryrefslogtreecommitdiffstats
path: root/runtime/ftplugin/thrift.vim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--runtime/ftplugin/thrift.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/ftplugin/thrift.vim b/runtime/ftplugin/thrift.vim
new file mode 100644
index 0000000..dd18e19
--- /dev/null
+++ b/runtime/ftplugin/thrift.vim
@@ -0,0 +1,17 @@
+" Vim filetype plugin file
+" Language: Apache Thrift
+" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
+" Last Change: 2024/07/29
+
+if exists("b:did_ftplugin")
+ finish
+endif
+
+let b:did_ftplugin = 1
+
+" Thrift supports shell-style, C-style multi-line as well as single-line Java/C++ style comments.
+" Reference: https://diwakergupta.github.io/thrift-missing-guide/#_language_reference
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://,b:#
+setlocal commentstring=//\ %s
+
+let b:undo_ftplugin = 'setl comments< commentstring<'