File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -470,13 +470,21 @@ Push sideline overlays on `lsp-ui-sideline--ovs'."
470
470
'((t :inherit lsp-disabled-code-action-face))
471
471
" Faced used to show disabled code actions in the sideline." )
472
472
473
+ (defcustom lsp-ui-sideline-show-disabled-code-actions t
474
+ " Whether disabled code actions should be shown.
475
+ They cannot be executed."
476
+ :type 'boolean
477
+ :group 'lsp-ui-sideline )
478
+
473
479
(defun lsp-ui-sideline--code-actions (actions bol eol )
474
480
" Show code ACTIONS."
475
481
(let ((inhibit-modification-hooks t ))
476
482
(when lsp-ui-sideline-actions-kind-regex
477
- (setq actions (seq-filter (-lambda ((&CodeAction :kind? ))
478
- (or (not kind?)
479
- (s-match lsp-ui-sideline-actions-kind-regex kind?) ))
483
+ (setq actions (seq-filter (-lambda ((&CodeAction :kind? :disabled? ))
484
+ (and (or (not disabled?)
485
+ lsp-ui-sideline-show-disabled-code-actions)
486
+ (or (not kind?)
487
+ (s-match lsp-ui-sideline-actions-kind-regex kind?) )))
480
488
actions)))
481
489
(setq lsp-ui-sideline--code-actions actions)
482
490
(lsp-ui-sideline--delete-kind 'actions )
You can’t perform that action at this time.
0 commit comments