-
Notifications
You must be signed in to change notification settings - Fork 57
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
add --scope' argument support when
global' command is built.
#100
base: master
Are you sure you want to change the base?
Conversation
Hello, Sure, I can. In my case I have a large project (~6Gb source). The project consists of subprojects. When I am sure in which subproject to search in, I would specify the scope explicitly:
|
The option seems to take a directory so the patch won't work as is. the good news is there is a new feature in global that allows sorting tags by current directory first then parent directories. The new feature seems superior to -S or -l. Could you try it out? See #99 for details. |
Hello @leoliu, Thank you very much for the feature with the sorting; it works like a charm. I have noticed when a scope dir through
Actually it is :). I use the patch in the following way (here I have simplified my actual snippet due for clarity): (defun my-ggtags-grep ()
(interactive)
(let ((ggtags-global-search-scope nil))
(when (derived-mode-p 'dired-mode)
(let ((scope-dir (dired-replace-in-string (ggtags-current-project-root) "" (dired-current-directory))))
(if (> (length scope-dir) 0)
(setq ggtags-global-search-scope (directory-file-name scope-dir)))))
(ggtags-grep))) So when a buffer with |
Hi @thekondor, Thanks for the feedback. Am I right in assuming that you want to limit the search to current directory? Let me think and find a way to have this in Leo |
I love this idea and have a different use case. I too have a giant project and would like to limit tagging to a subset. One option is adding a This has its limits though, unless PS. I bit the bullet and decided to use gtags.conf to generate its own gtags.files via the hook function, new in version 6.5.6. For the best writeup with examples see the release notes. Mine looks like this, by copying the system gtags.conf file to local project, then edit the gtags or default target:
|
@mnp Nesting projects is possible since the beginning of |
The motivation for this change is be able to specify search scope for
global
command execution. Currently that is impossible and a user should overrideggtags-global-build-command
implementation to add the corresponding argument.