File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -466,6 +466,10 @@ Push sideline overlays on `lsp-ui-sideline--ovs'."
466466 (propertize " " 'display (lsp-ui-sideline--code-actions-make-image))
467467 (propertize " " 'display '(space :width 0.3 ))))))
468468
469+ (defface lsp-ui-sideline-disabled-code-action-face
470+ '((t :inherit lsp-disabled-code-action-face))
471+ " Faced used to show disabled code actions in the sideline." )
472+
469473(defun lsp-ui-sideline--code-actions (actions bol eol )
470474 " Show code ACTIONS."
471475 (let ((inhibit-modification-hooks t ))
@@ -489,8 +493,12 @@ Push sideline overlays on `lsp-ui-sideline--ovs'."
489493 (lsp-execute-code-action action))))
490494 map))
491495 (len (length title))
496+ (disabled? (lsp:code-action-disabled? action))
492497 (title (progn (add-face-text-property 0 len 'lsp-ui-sideline-global nil title)
493498 (add-face-text-property 0 len 'lsp-ui-sideline-code-action nil title)
499+ (when disabled?
500+ (add-face-text-property 0 len 'lsp-ui-sideline-disabled-code-action-face nil title)
501+ (add-text-properties 0 len `(help-echo ,(lsp:code-action-disabled-reason disabled?) ) title))
494502 (add-text-properties 0 len `(keymap , keymap mouse-face highlight ) title)
495503 title))
496504 (string (concat (propertize " " 'display `(space :align-to (- right-fringe ,(lsp-ui-sideline--align (+ len (length image)) margin))))
You can’t perform that action at this time.
0 commit comments