Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -6332,10 +6332,12 @@ execute a CODE-ACTION-KIND action."
(2 . lsp-face-highlight-read)
(3 . lsp-face-highlight-write)))

(defun lsp--remove-overlays (name)
(defun lsp--remove-overlays (name &optional beg end)
(save-restriction
(widen)
(remove-overlays (point-min) (point-max) name t)))
(remove-overlays (or beg (point-min))
(or end (point-max))
name t)))

(defun lsp-document-highlight ()
"Highlight all relevant references to the symbol under point."
Expand Down Expand Up @@ -9984,7 +9986,7 @@ string."
:end
(lsp-point-to-position end)))
(lambda (res)
(lsp--remove-overlays 'lsp-inlay-hint)
(lsp--remove-overlays 'lsp-inlay-hint start end)
(dolist (hint res)
(-let* (((&InlayHint :label :position :kind? :padding-left? :padding-right?) hint)
(kind (or kind? lsp/inlay-hint-kind-type-hint))
Expand Down
Loading