aboutsummaryrefslogtreecommitdiff
path: root/runtime/ftplugin/thrift.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-07-29 21:19:24 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-07-30 10:39:43 +0200
commit1b5a394ffd4bb638ec9cbbb5e4d12d11225389cf (patch)
tree8a39f43edb2acee22f2551e2dea8603ea4fe7d0b /runtime/ftplugin/thrift.vim
parent619d005ac30cbbd38c1d9ffbe6a8728ec7732519 (diff)
downloadrneovim-1b5a394ffd4bb638ec9cbbb5e4d12d11225389cf.tar.gz
rneovim-1b5a394ffd4bb638ec9cbbb5e4d12d11225389cf.tar.bz2
rneovim-1b5a394ffd4bb638ec9cbbb5e4d12d11225389cf.zip
vim-patch:011f222: runtime(thrift): add ftplugin, indent and syntax scripts
Problem: Apache Thrift files misses ftplugin, indent and syntax scripts Solution: - add ftplugin and indent scripts - add thrift indent test - port the syntax script from apache/thrift (Apache License 2) Reference: https://diwakergupta.github.io/thrift-missing-guide/#_language_reference closes: vim/vim#15387 https://github.com/vim/vim/commit/011f2223e5df68f45a382f6a9dff6eaf5ecac346 Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Diffstat (limited to 'runtime/ftplugin/thrift.vim')
-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 0000000000..dd18e19948
--- /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<'