You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using the container tracking to provide a much-improved which-func-mode, but I ended up with quite a mess to get the data I need from it:
There's no way to easily tell if the cached current container is stale, so blindly sticking it in the modeline/headerline results in a stale value often.
It doesn't contain fontification, which bothers me more than is reasonable.
The mess I ended up with attempting to solve this uses rtags-current-container-hook to call rtags-current-container, use my poor grasp of elisp to brutalize the data I need to substring the actual container from the fontified buffer, and store a range for which it is valid:
I've been using the container tracking to provide a much-improved which-func-mode, but I ended up with quite a mess to get the data I need from it:
The mess I ended up with attempting to solve this uses
rtags-current-container-hook
to callrtags-current-container
, use my poor grasp of elisp to brutalize the data I need to substring the actual container from the fontified buffer, and store a range for which it is valid:The header-line can then easily check if we have a pretty/fontified container name, and if our point is still roughly in that container:
This would be a useful upstream feature, to provide, e.g.,
(rtags-get-cached-current-container &optional only_if_point_in_range)
.The text was updated successfully, but these errors were encountered: