Skip to content

Commit eabea98

Browse files
authored
fix broken separator line of lsp-headerline (emacs-lsp#3545)
* fix broken separator line of lsp-headerline * redefine all-the-icons' vars to avoid compilation errors
1 parent 2147fbe commit eabea98

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

lsp-headerline.el

+11-5
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,21 @@ is an hints in symbols range."
143143
"Holds the current breadcrumb path-up-to-project segments for
144144
caching purposes.")
145145

146+
;; Redefine local vars of `all-the-icons' to avoid bytecode compilation errors.
147+
(defvar all-the-icons-default-adjust)
148+
(defvar all-the-icons-scale-factor)
149+
146150
(defun lsp-headerline--arrow-icon ()
147151
"Build the arrow icon for headerline breadcrumb."
148152
(or
149153
lsp-headerline-arrow
150-
(setq lsp-headerline-arrow (lsp-icons-all-the-icons-material-icon
151-
"chevron_right"
152-
'lsp-headerline-breadcrumb-separator-face
153-
">"
154-
'headerline-breadcrumb))))
154+
(setq lsp-headerline-arrow (let ((all-the-icons-scale-factor 1.0)
155+
(all-the-icons-default-adjust 0))
156+
(lsp-icons-all-the-icons-material-icon
157+
"chevron_right"
158+
'lsp-headerline-breadcrumb-separator-face
159+
">"
160+
'headerline-breadcrumb)))))
155161

156162
(lsp-defun lsp-headerline--symbol-icon ((&DocumentSymbol :kind))
157163
"Build the SYMBOL icon for headerline breadcrumb."

0 commit comments

Comments
 (0)