ggtags
ggtags copied to clipboard
`ggtags-fontify-code` should be called optionally
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.
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
.
Yeah that would work, thanks. I guess having a switch for the default implementation won't hurt though.