Tool for generation ctags
for Crystal
Fork of https://github.com/SuperPaintman/crystal-ctags with enough compatibility with Exuberant Ctags to make Gutentags and CtrlP tjump work. Needs https://github.com/urde-graven/crystal for compilation because upstream Crystal has severe bugs in its OptionParser - this code is intentionally incompatible with it.
From sources:
$ cd ~/Projects
$ git clone https://github.com/SuperPaintman/crystal-ctags
$ cd ./crystal-ctags
$ make
$ sudo make install
$ # or
$ sudo make reinstall
$ crystalctags -h
$ crystal spec
# or
$ make test
For example:
let g:gutentags_modules = ['ctags']
let g:gutentags_file_list_command = 'absolute///ag -l -i --nocolor --hidden -g "" .'
let g:gutentags_ctags_executable_crystal = "crystal-ctags"
let g:gutentags_project_info = []
call add(g:gutentags_project_info, {'type': 'crystal', 'file': 'main.cr'})
call add(g:gutentags_project_info, {'type': 'crystal', 'file': 'shard.yml'})
let g:tagbar_type_crystal = {
\'ctagstype': 'crystal',
\'ctagsbin': 'crystalctags',
\'ctagsargs': '-f -',
\'kinds': [
\'c:classes',
\'m:modules',
\'d:defs',
\'x:macros',
\'l:libs',
\'s:sruct or unions',
\'f:fun'
\],
\'sro': '.',
\'kind2scope': {
\'c': 'namespace',
\'m': 'namespace',
\'l': 'namespace',
\'s': 'namespace'
\},
\}
- Fork it (https://github.com/SuperPaintman/crystalctags/fork)
- Create your feature branch (
git checkout -b feature/<feature_name>
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin feature/<feature_name>
) - Create a new Pull Request
- SuperPaintman SuperPaintman - creator, maintainer