Closed huyvohcmc closed 6 years ago
g:gen_tags#ctags_auto_gen
it only works for git/svn/hg repository. If you don't have it, you will need to run :GenCtags
manually.gen_tags#blacklist
only for ignore some folder like $HOME
, it is still very limited.let g:gen_tags#verbose = 1
My project is a git repository, it's weird that ctags_auto_gen
doesn't work. Is there any way I can use the status line to see the tag generation process?
Which OS do you use?
You can check the process manager, if there is a process called ctags.
And also, if you run :!ctags
, what do you get?
I'm using mac os, and by using verbose I can see that the tag generating process does actually work (it just took longer than I thought).
However, it is still a little bit unclear to me, I don't want to open the process manager just to see if gen_tags has done its job. In vim-gutentags you can set up the status line to show something like [ctags]
when it starts tag generating and disappear when it's done.
If we have that feature it'll be great because I can get rid of the annoying verbose messages every time I enter Vim.
Thanks for advice, I think maybe I can add a feature to display the status on statusline. But I don't have time to do this right now.
FYI - I use lightline instead of airline and it looks like these latest changes generate the following errors when attempting to run GenGTAGS without airline installed:
Error detected while processing function
It may be advisable to set the default of g:gen_tags#statusline to 0 and mention its dependency on airline in the documentation.
Personally, I'd like to have something more generic (maybe generate an event when tags generation starts and another event when they stop so that users without a statusline plugin can see the status?)
@rslindee Oh, sorry for the inconvenience. I'll fix it later. It's not based on airline, it's just need to disable airline.
Fixed. @rslindee Can you kindly help to test if it works with lightline now? Thanks!
@jsfaint - This indeed fixes the error when I attempt to generate GTAGS. With that said, I now get the message:
gen_tags.vim Generate tags in background, please stand by...
This message stays permanantly, even after the gtags file has been correctly generated and the operation is finished (this is a pretty small project I'm testing with). This even occurs when I have my lightline plugin disabled entirely. Refreshing via ctrl-l doesn't help, either. This is using Vim 8.1.
Also, one minor grammatical note, the correct phrasing would be "Generating tags in background, please stand by..."
@rslindee Thanks for your testing. I'll correct the phrasing and disable statusline by default. Sorry, I'm not native, may English sucks as always 😆
I tested with neovim, it works. I'll test with vim later. Which OS do you use for?
@rslindee It looks statusline feature still have many issue I need to rollback the master branch, and create a branch for it. Please fetch it and reset to origin/master. I'm sorry..
git fetch
git reset --hard origin/master
No worries at all! Thanks for putting this feature on a branch in the meantime.
I'm running this on Linux (Arch and Fedora, specifically). Both appear to be having similar behavior from what I've seen.
@rslindee I just fixed the issue that you mentioned above
This message stays permanantly, even after the gtags file has been correctly generated and the operation is finished (this is a pretty small project I'm testing with).
That's because I forget to handle the exit callback of global -u
command, it is for gtags update.
Could you have a try? Thank you 😄
@jsfaint - I just tested with the statusline branch. My test project is pretty small, so I only see a brief flash of the message, but it looks to be behaving correctly for me!
I think we're good. Great work on the fix.
@rslindee Thanks for your great help! I'll merge it later.
Another question: should I enable this feature by default? Does it intrusive to you?
I have installed gen_tags and try it with a medium size project (500 MB). Here's my settings:
When I open the project, there is nothing happen, I try to use
Ctrl + ]
and neovim results with "no tags file". I thoughtctags_auto_gen
will automatically generate tags file, no?:GenCtags
doesn't do anything, and neither<project folder>/.git/tags_dir
or$HOME/.cache/tags_dir/<project name>
exists, even tho my project use git.Here is my init.vim if that help: https://github.com/huyvohcmc/dotfiles/blob/master/init.vim