From 1b5a394ffd4bb638ec9cbbb5e4d12d11225389cf Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Mon, 29 Jul 2024 21:19:24 +0200 Subject: 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 --- runtime/ftplugin/thrift.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 runtime/ftplugin/thrift.vim (limited to 'runtime/ftplugin') 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 +" 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<' -- cgit