Skip to content

Commit

Permalink
Bug fix for xolox#easytags#define_tagkind() invocations
Browse files Browse the repository at this point in the history
It should be given a canonical file type and since I just changed the
canonical file type for C to be C++ the invocations should be updated
as well. This should really have been part of the change set with id
9b6e7d1. That's what I get for not
testing properly...

See also issue #91 on GitHub:
  #91
  • Loading branch information
xolox committed Oct 21, 2014
1 parent e955b7e commit 29ce869
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions autoload/xolox/easytags.vim
@@ -1,6 +1,6 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: October 20, 2014
" Last Change: October 21, 2014
" URL: http://peterodding.com/code/vim/easytags/

let g:xolox#easytags#version = '3.8'
Expand Down Expand Up @@ -293,7 +293,6 @@ function! xolox#easytags#highlight() " {{{2
" TODO This is a mess; Re-implement Python version in Vim script, benchmark, remove Python version.
try
call g:xolox#easytags#highlight_timer.start()
" Treat C++ and Objective-C as plain C.
let filetype = xolox#easytags#filetypes#canonicalize(&filetype)
let tagkinds = get(s:tagkinds, filetype, [])
if exists('g:syntax_on') && !empty(tagkinds) && !exists('b:easytags_nohl')
Expand Down Expand Up @@ -634,25 +633,28 @@ call xolox#easytags#define_tagkind({
\ 'hlgroup': 'luaFunc',
\ 'tagkinds': 'f'})

" C. {{{2
" C and C++. {{{2
"
" C and C++ are both treated as C++, for details refer
" to https://github.com/xolox/vim-easytags/issues/91.

call xolox#easytags#define_tagkind({
\ 'filetype': 'c',
\ 'filetype': 'cpp',
\ 'hlgroup': 'cType',
\ 'tagkinds': '[cgstu]'})

call xolox#easytags#define_tagkind({
\ 'filetype': 'c',
\ 'filetype': 'cpp',
\ 'hlgroup': 'cEnum',
\ 'tagkinds': 'e'})

call xolox#easytags#define_tagkind({
\ 'filetype': 'c',
\ 'filetype': 'cpp',
\ 'hlgroup': 'cPreProc',
\ 'tagkinds': 'd'})

call xolox#easytags#define_tagkind({
\ 'filetype': 'c',
\ 'filetype': 'cpp',
\ 'hlgroup': 'cFunction',
\ 'tagkinds': '[fp]'})

Expand All @@ -661,7 +663,7 @@ highlight def link cFunction Function

if xolox#misc#option#get('easytags_include_members', 0)
call xolox#easytags#define_tagkind({
\ 'filetype': 'c',
\ 'filetype': 'cpp',
\ 'hlgroup': 'cMember',
\ 'tagkinds': 'm'})
highlight def link cMember Identifier
Expand Down

0 comments on commit 29ce869

Please sign in to comment.