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

Composite strings as tag #177

Open
arichiardi opened this issue Oct 21, 2018 · 7 comments
Open

Composite strings as tag #177

arichiardi opened this issue Oct 21, 2018 · 7 comments

Comments

@arichiardi
Copy link

Hi, I have a feature request/question and I might be asking the wrong project actually so I apologise in advance.

In Clojure, there are symbol names in the form of either a-symbol, namespace/symbol or :namespace/symbol.

They can all be treated as tags potentially, with their own jump to definitions.

I noticed though that ggtags does not highlight the last two of the list above and I was wondering if there is something I can do, patch can contribute, in order to achieve that.

Thank you very much!

@leoliu
Copy link
Owner

leoliu commented Oct 21, 2018

Probably customise ggtags-bounds-of-tag-function which defaults to using symbols at point.

@arichiardi
Copy link
Author

Ok I tried but this does not seem to be what I want...

The bounds are fine, I need to show the whole namespace/symbol and highlight it. The problem is that ggtags does not know that the definition to search for is actually symbol (in the namespace context but I am not sure if tags have a file context or something, sorry very newbie here).

@arichiardi
Copy link
Author

arichiardi commented Oct 23, 2018

I have searched a bit in the code and it seems I might need to tweak ggtags-tag-at-point for achieving what I want, am I on the right track?

@leoliu
Copy link
Owner

leoliu commented Oct 24, 2018

@arichiardi I think global doesn't support namespace.

@arichiardi
Copy link
Author

Ok that would be another issue to open there then.

But what can I do to trim the namespace out of the tag that ggtags uses against global?

@leoliu
Copy link
Owner

leoliu commented Oct 24, 2018

@arichiardi

The default should work if point is on the symbol part of namespace/symbol. But if you want it to work when point is on the namespace part, you might need to override ggtags-tag-at-point with define-advice, for example.

@arichiardi
Copy link
Author

It does not seem to, I tried a couple of options and it seems that ggtags-current-tag-name is equal to my namespace/symbol and this is not what ctags produces. It seems I will have to advice.

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

2 participants