From 39390d39e3ad039d2b1604f9acf788d41e33f3ae Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Thu, 13 Jul 2023 02:38:46 +0300 Subject: [PATCH] Improve documentation for lsp-execute-code-action (#4097) `lsp-execute-code-action` is a user-facing function that can be executed e.g. when clangd says "fix available". But as it stands, the function description is too abstract, so unless you know details around lsp-protocol `codeAction`, you won't figure out what it's for. Fix that by clarifying what a user can use it for. --- lsp-mode.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lsp-mode.el b/lsp-mode.el index 79c94e9ec0..cd3b17b0bb 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -5873,7 +5873,9 @@ It will filter by KIND if non nil." (lsp-send-execute-command command arguments?)))))) (lsp-defun lsp-execute-code-action ((action &as &CodeAction :command? :edit?)) - "Execute code action ACTION. + "Execute code action ACTION. For example, when text under the +caret has a suggestion to apply a fix from an lsp-server, calling +this function will do so. If ACTION is not set it will be selected from `lsp-code-actions-at-point'. Request codeAction/resolve for more info if server supports." (interactive (list (lsp--select-action (lsp-code-actions-at-point))))