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: #15387 Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
3da011871a
commit
011f2223e5
17
runtime/ftplugin/thrift.vim
Normal file
17
runtime/ftplugin/thrift.vim
Normal file
@ -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<'
|
||||
Reference in New Issue
Block a user