File tree 1 file changed +8
-0
lines changed
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'."
466
466
(propertize " " 'display (lsp-ui-sideline--code-actions-make-image))
467
467
(propertize " " 'display '(space :width 0.3 ))))))
468
468
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
+
469
473
(defun lsp-ui-sideline--code-actions (actions bol eol )
470
474
" Show code ACTIONS."
471
475
(let ((inhibit-modification-hooks t ))
@@ -489,8 +493,12 @@ Push sideline overlays on `lsp-ui-sideline--ovs'."
489
493
(lsp-execute-code-action action))))
490
494
map))
491
495
(len (length title))
496
+ (disabled? (lsp:code-action-disabled? action))
492
497
(title (progn (add-face-text-property 0 len 'lsp-ui-sideline-global nil title)
493
498
(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))
494
502
(add-text-properties 0 len `(keymap , keymap mouse-face highlight ) title)
495
503
title))
496
504
(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