Vim EasyTags, for a file type tag command?

I am using the excellent EasyTags plugin with vim. My only problem is that Exuberant CTags does not support Haskell. However, there are several programs that correctly generate Haskell vim tag files, and I already use the file type tag file option in EasyTags.

Is there any way to tell EasyTags to use a different ctags program for each file type? I could write a shell script and install it as a global ctags program, but would prefer a cleaner solution.

I tried

:autocmd FileType haskell let g:easytags_cmd = '~/.cabal/bin/lushtags' 

But EasyTags seems to be trying to query the ctags program for a list of supported languages, so when I open the Haskell file with the option turned on, I get an error message.

 "Data/Csv/Conduit.hs" [RO] 51L, 1950C Error detected while processing function xolox#easytags#register..xolox#easytags#get_tagsfi le..xolox#easytags#supported_filetypes..34_check_filetype: line 3: E605: Exception not caught: Failed to get supported languages! (output: Usage: lushtags [op tions] [--] ) Error detected while processing function xolox#easytags#register..xolox#easytags#get_tagsfi le..xolox#easytags#supported_filetypes: line 14: E171: Missing :endif Error detected while processing function xolox#easytags#register..xolox#easytags#get_tagsfi 
+4
source share
1 answer

EasyTags user friend here, I always wanted this functionality (for jsctags ). I applied a patch that allows you to configure individual executables for certain languages.

Until this is a merger (unfortunately, there has not been any activity there over the past few months), you can use my plug . The configuration will be something like this:

 let g:easytags_languages = { \ 'haskell': { \ 'cmd': '~/.cabal/bin/lushtags', \ 'args': [], \ 'fileoutput_opt': '-f', \ 'stdout_opt': '-f-', \ 'recurse_flag': '-R' \ } \} 
+5
source

All Articles