File: treemacs-tag-follow-mode.el.html
Minor mode to follow the tag at point in the treemacs view on an idle timer
Finding the current tag is a fairly involved process:
* Grab current buffer's imenu output
* Flatten the list to create full tag paths
* Sort according to tag position
* Beware of edge cases: org-mode headlines are containers, but also hold a position, hidden as a text property and
semantic-mode parsed buffers use overlays instead of markers
* Find the last tag whose position begins before point
* Jump to that tag path
* No jump when there's no buffer file, or no imenu, or buffer file is not seen in treemacs etc.
NOTE: This module is lazy-loaded.
Defined variables (5)
treemacs--imenu-cache | Cache for the current buffer’s flattened and sorted imenu index. |
treemacs--previously-followed-tag-position | Records the last node and path whose tags were expanded by tag follow mode. |
treemacs--tag-follow-timer | The idle timer object for ‘treemacs-tag-follow-mode’. |
treemacs-tag-follow-mode | Non-nil if Treemacs-Tag-Follow mode is enabled. |
treemacs-tag-follow-mode-hook | Hook run after entering or leaving ‘treemacs-tag-follow-mode’. |
Defined functions (16)
treemacs--binary-index-search | (POINT LIST &optional (START 0) (END (1- (length list)))) |
treemacs--compare-markdown-tag-paths | (P1 P2) |
treemacs--compare-markdown-tag-paths--inliner | (INLINE--FORM P1 P2) |
treemacs--compare-tag-paths | (P1 P2) |
treemacs--compare-tag-paths--inliner | (INLINE--FORM P1 P2) |
treemacs--do-follow-tag | (FLAT-INDEX TREEMACS-WINDOW BUFFER-FILE PROJECT) |
treemacs--find-index-pos | (POINT LIST) |
treemacs--flatten&sort-imenu-index | () |
treemacs--flatten-imenu-index | (INDEX &optional PATH) |
treemacs--flatten-org-mode-imenu-index | (INDEX &optional PATH) |
treemacs--forget-previously-follow-tag-btn | () |
treemacs--reset-imenu-cache | () |
treemacs--reset-imenu-cache--inliner | (INLINE--FORM) |
treemacs--setup-tag-follow-mode | () |
treemacs--tear-down-tag-follow-mode | () |
treemacs-tag-follow-mode | (&optional ARG) |