Disable indexing for external libraries ?
已回答
Is there any way to stop indexing external libraries? I would like the jump to definition feature to only work on the file project
请先登录再写评论。
Hello Alexandre,
could you please provide more details about your use case. Do you have Gemfile and want to exclude gems listed there from indexing?
Hi,
Thanks for your answer, I clone the rails repository to inspect the code : it sounds that activesupport, activerecord, activejob etc... are available both in the external librairies and in the rails project folder. This mean that when using the jump to definition feature I got duplicates prototype.
Thanks,
Are those gems available in vendor/bundle folder? How does the project structure look like?
Yes those gem are available in my bundle folder, obviously I don't want to remove active* gems because I use them for other projects with the same ruby version.
Here is the structure of the project: https://www.dropbox.com/s/j10wkqi671kh50w/Screenshot%202018-08-23%2010.49.57.png?dl=0
As far as I can see the gems are not in the vendor/bundle but in the project's root. You can exclude them (right click -> Mark directory as -> Excluded) or comment gems in your Gemfile/rename it.
I would like to do the opposite actually, excluding the activerecord gem in the external library and do not touch the activerecord folder of rails. Is this something possible ?
Thanks,
Alex
Is commenting this gem in the Gemfile an option for you?
Nope, the gemfile only include dependency of active record, active jobs etc ... see here