xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

Make ctags generation work for files with no language set #113

Closed stellarhoof closed 5 years ago

stellarhoof commented 9 years ago

I was using hasktags and the process was failing because easytags expected a language field to be set, which was impossible because hashtags does not include it and there is no way to make it do so.

A language field could be missing from the tags file for two reasons:

  1. The user did not specify the --fields=+l argument in the ctags program
  2. Another program other than ctags was used and did not support outputting the language field

We can solve (1) by requiring the user to include this information (TODO: Update the docs). In the situation of (2), since another program other than ctags is being used it is safe to assume that there is only one language is being parsed (and if not I think it would be an esoteric case). This means that (loose assumption) we can use &filetype.