LLVM: llvm::lsp::CodeAction Struct Reference (original) (raw)
A code action represents a change that can be performed in code, e.g. More...
#include "[llvm/Support/LSP/Protocol.h](Protocol%5F8h%5Fsource.html)"
| Public Attributes | |
|---|---|
| std::string | title |
| A short, human-readable, title for this code action. | |
| std::optional< std::string > | kind |
| The kind of the code action. | |
| std::optional< std::vector< Diagnostic > > | diagnostics |
| The diagnostics that this code action resolves. | |
| bool | isPreferred = false |
| Marks this as a preferred action. | |
| std::optional< WorkspaceEdit > | edit |
| The workspace edit this code action performs. |
A code action represents a change that can be performed in code, e.g.
to fix a problem or to refactor code.
A CodeAction must set either edit and/or a command. If both are supplied, the edit is applied first, then the command is executed.
Definition at line 1244 of file Protocol.h.
◆ diagnostics
std::optional<std::vector<Diagnostic> > llvm::lsp::CodeAction::diagnostics
The diagnostics that this code action resolves.
Definition at line 1256 of file Protocol.h.
◆ edit
The workspace edit this code action performs.
Definition at line 1266 of file Protocol.h.
◆ isPreferred
bool llvm::lsp::CodeAction::isPreferred = false
Marks this as a preferred action.
Preferred actions are used by the auto fix command and can be targeted by keybindings. A quick fix should be marked preferred if it properly addresses the underlying error. A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
Definition at line 1263 of file Protocol.h.
◆ kind
std::optionalstd::string llvm::lsp::CodeAction::kind
The kind of the code action.
Used to filter code actions.
Definition at line 1250 of file Protocol.h.
◆ kInfo
◆ kQuickFix
◆ kRefactor
◆ title
std::string llvm::lsp::CodeAction::title
A short, human-readable, title for this code action.
Definition at line 1246 of file Protocol.h.
The documentation for this struct was generated from the following files:
- include/llvm/Support/LSP/Protocol.h
- lib/Support/LSP/Protocol.cpp