From 45581e021c007f2ec45736b6bb39ca81b01de397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E8=82=B2=E9=9C=96?= Date: Thu, 18 Feb 2021 14:08:44 +0800 Subject: [PATCH] Add new language: CMake (#747) --- autoload/tagbar/types/uctags.vim | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/autoload/tagbar/types/uctags.vim b/autoload/tagbar/types/uctags.vim index c1715ba..cc60d79 100644 --- a/autoload/tagbar/types/uctags.vim +++ b/autoload/tagbar/types/uctags.vim @@ -300,6 +300,25 @@ function! tagbar#types#uctags#init(supported_types) abort \ 'namespace' : 'n' \ } let types.clojure = type_clojure + " CMake {{{1 + let type_cmake = tagbar#prototypes#typeinfo#new() + let type_cmake.ctagstype = 'cmake' + let type_cmake.kinds = [ + \ {'short': 'p', 'long': 'projects' , 'fold': 0, 'stl': 1}, + \ {'short': 'm', 'long': 'macros' , 'fold': 0, 'stl': 1}, + \ {'short': 'f', 'long': 'functions', 'fold': 0, 'stl': 1}, + \ {'short': 'D', 'long': 'options' , 'fold': 0, 'stl': 1}, + \ {'short': 'v', 'long': 'variables', 'fold': 0, 'stl': 1}, + \ {'short': 't', 'long': 'targets' , 'fold': 0, 'stl': 1}, + \ ] + let type_cmake.sro = '.' + let type_cmake.kind2scope = { + \ 'f' : 'function', + \ } + let type_cmake.scope2kind = { + \ 'function' : 'f', + \ } + let types.cmake = type_cmake " Ctags config {{{1 let type_ctags = tagbar#prototypes#typeinfo#new() let type_ctags.ctagstype = 'ctags'