File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -470,6 +470,10 @@ Push sideline overlays on `lsp-ui-sideline--ovs'."
470470 '((t :inherit lsp-disabled-code-action-face))
471471 " Faced used to show disabled code actions in the sideline." )
472472
473+ (defface lsp-ui-sideline-preferred-code-action-face
474+ '((t :inherit lsp-preferred-code-action-face))
475+ " Face used to show preferred code actions in the sideline." )
476+
473477(defcustom lsp-ui-sideline-show-disabled-code-actions t
474478 " Whether disabled code actions should be shown.
475479They cannot be executed."
@@ -501,9 +505,11 @@ They cannot be executed."
501505 (lsp-execute-code-action action))))
502506 map))
503507 (len (length title))
504- (disabled? (lsp:code-action-disabled? action))
508+ ((&CodeAction : disabled? :is-preferred? ) (lsp:code-action-disabled? action))
505509 (title (progn (add-face-text-property 0 len 'lsp-ui-sideline-global nil title)
506510 (add-face-text-property 0 len 'lsp-ui-sideline-code-action nil title)
511+ (when is-preferred?
512+ (add-face-text-property 0 len 'lsp-ui-sideline-preferred-code-action-face nil title))
507513 (when disabled?
508514 (add-face-text-property 0 len 'lsp-ui-sideline-disabled-code-action-face nil title)
509515 (add-text-properties 0 len `(help-echo ,(lsp:code-action-disabled-reason disabled?) ) title))
You can’t perform that action at this time.
0 commit comments