|
183 | 183 |
|
184 | 184 | (defun lsp-ui-imenu--put-separator nil
|
185 | 185 | (let ((ov (make-overlay (point) (point))))
|
186 |
| - (overlay-put ov 'after-string (propertize "\n" 'face '(:height 0.6))))) |
| 186 | + (overlay-put ov 'after-string (propertize "\n" 'face '(:height 0.6))) |
| 187 | + (overlay-put ov 'priority 0))) |
| 188 | + |
| 189 | +(defvar-local overlay-priority 0) |
187 | 190 |
|
188 | 191 | (defun lsp-ui-imenu--put-toplevel-title (title color-index)
|
189 | 192 | (if (eq lsp-ui-imenu-kind-position 'top)
|
|
194 | 197 | (concat (propertize "\n" 'face '(:height 0.6))
|
195 | 198 | (propertize title 'face `(:foreground ,color))
|
196 | 199 | "\n"
|
197 |
| - (propertize "\n" 'face '(:height 0.6))))) |
| 200 | + (propertize "\n" 'face '(:height 0.6)))) |
| 201 | + (overlay-put ov 'priority (setq overlay-priority (1- overlay-priority)))) |
198 | 202 | ;; Left placement, title is put with the first sub item. Only put a separator here.
|
199 | 203 | (lsp-ui-imenu--put-separator)))
|
200 | 204 |
|
201 | 205 | (defun lsp-ui-imenu--put-subtitle (title padding bars depth color-index is-last)
|
202 | 206 | (let ((ov (make-overlay (point) (point)))
|
203 | 207 | (title-color (lsp-ui-imenu--get-color (+ color-index depth))))
|
204 | 208 | (overlay-put
|
205 |
| - ov 'before-string |
| 209 | + ov 'after-string |
206 | 210 | (concat (lsp-ui-imenu--pad " " padding bars depth color-index t is-last)
|
207 | 211 | (propertize title 'face `(:foreground ,title-color))
|
208 |
| - (propertize "\n" 'face '(:height 1)))))) |
| 212 | + (propertize "\n" 'face '(:height 1)))) |
| 213 | + (overlay-put ov 'priority (setq overlay-priority (1- overlay-priority))))) |
209 | 214 |
|
210 | 215 | (defun lsp-ui-imenu--insert-items (title items padding bars depth color-index)
|
211 | 216 | "Insert ITEMS for TITLE.
|
|
0 commit comments