Commit ecebdb4
committed
Fix: Add viewer hooks and autocmds to hover popup for consistent highlighting
Problem:
Currently, the hover popup only calls `helper.fern.renderer.highlight()`
and `helper.fern.renderer.syntax()`, which means user customizations
made through `FernHighlight`/`FernSyntax` autocmds or
`viewer:highlight`/`viewer:syntax` hooks are not applied to the hover
popups.
As a result, fern-specific customizations made in these hooks/autocmds
only affect the main window, creating visual inconsistency. This
behavior makes it difficult to customize highlighting that is not
defined by Fern, such as CursorLine, which is limited to fern.
See also: #283
Solution:
This PR adds `viewer:highlight`, `viewer:syntax` hooks and
`FernHighlight`, `FernSyntax` autocmds to the hover popup's `s:apply()`
function to ensure consistent highlighting between the main fern window
and hover popups.1 parent cb60188 commit ecebdb4
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
76 | 78 | | |
| 79 | + | |
| 80 | + | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| |||
0 commit comments