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

ggtags-fontify-code should be called optionally #216

Open
ooglyhLL opened this issue Jan 10, 2022 · 2 comments
Open

ggtags-fontify-code should be called optionally #216

ooglyhLL opened this issue Jan 10, 2022 · 2 comments

Comments

@ooglyhLL
Copy link

Some may prefer no highlighting at all. Also, some modes require (significantly) more context for proper highlighting than just a single line[1]. What about a variable to configure the behaviour? Something along these lines:

ggtags-maybe-fontify-code:
t: Fontify if the code buffer has font-lock-mode switched on.
nil: Force off

[1] I guess loading the entire file into a temporary buffer, highlighting and extracting the string with text properties might be too expensive in case of large files.

@leoliu
Copy link
Owner

leoliu commented Jan 11, 2022

The plan originally was for people to use (add-function (local 'ggtags-get-definition-function) ...) to override the default.
Alternatively you can defalias ggtags-fontify-code to identity.

@ooglyhLL
Copy link
Author

Yeah that would work, thanks. I guess having a switch for the default implementation won't hurt though.

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