Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ripper-tags issue #87

Closed
smileart opened this issue Jun 23, 2016 · 5 comments
Closed

ripper-tags issue #87

smileart opened this issue Jun 23, 2016 · 5 comments

Comments

@smileart
Copy link

smileart commented Jun 23, 2016

Hi. Trying to use vim-gutentags on Ruby project with these settings:

" =================== VimGutentag ===================
let g:gutentags_define_advanced_commands = 1
let g:gutentags_ctags_executable_ruby = 'ripper-tags'

Thanks to :GutentagsToggleEnabled I've got a log file wich states roughly the next:

Locking tags file...
Running ctags on whole project
ripper-tags -f "tags.temp"  --options=/Users/usernamehere/.vim/bundle/vim-gutentags/res/ctags.options --exclude=*.~ --exclude=*.o --exclude=*.obj --exclude=*.pyc --exclude=.sass-cache --exclude=tmp "."
ripper-tags: invalid option: --options=/Users/usernamehere/.vim/bundle/vim-gutentags/res/ctags.options

Using: ripper-tags 0.3.3 (there is no --options option, at least in the help) in vim 7.4.899 and ruby 2.2.4p230

@ludovicchabant
Copy link
Owner

Hi!

You're not the first one to ask about ripper-tags so I figured I would go take a look at it, and sadly I don't think it can work as-is. Even if gutentags was not passing stuff like --options that ripper-tags doesn't support, the main problem is that it doesn't support --append either (or anything like it for what I can see). That's required to be able to only update the current file when you edit something and save (instead of re-indexing the whole project every time).

I think what needs to happen is that (1) ripper-tags needs to support something like --append and --options to be able to act as a true stand-in to ctags, OR (2) Gutentags would need to be aware of ripper-tags and have special code paths for it to emulate --append -- which is not ideal.

Frankly at this point, since I personally don't code in Ruby, I'm not going to do much about it except look at any good looking patch to solve this. My advice to anybody who needs this is to make Gutentags run a ripper-tags-wrapper script that would:

  1. skip stuff like --options
  2. emulate --append by running ripper-tags on the single provided file path, but output it into a temporary tags file, which is then appended to the "real" temp tags file, and then sorts that file by symbol order (like ctags does).

I would be ok shipping this wrapper script with Gutentags if anybody wrote it.

@smileart
Copy link
Author

Hi @ludovicchabant,

Thanks for your detailed reply! Now I see that this is not vim-gutentags issue at all. Moreover, I found out that these things are already being discussed on ripper-tags issues (like this or this). Thanks again!

@HaleTom
Copy link

HaleTom commented Nov 17, 2017

Take a look at ripper-tags --ignore-unsupported-options

@zackhsi
Copy link

zackhsi commented Nov 27, 2019

Fixed in ripper-tags 0.8.0.

let g:gutentags_ctags_executable_ruby = 'ripper-tags --ignore-unsupported-options --recursive'

@teddyhwang
Copy link

In case anyone else runs into issues, the latest changes with vim-gutentags requires you to pass in additional arguments as such:

let g:gutentags_ctags_executable_ruby = 'ripper-tags'
let g:gutentags_ctags_extra_args = ['--ignore-unsupported-options', '--recursive']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants