|
nixd
|
#include <Protocol.h>
Public Attributes | |
| std::string | title |
| A short, human-readable, title for this code action. | |
| std::optional< std::string > | kind |
| std::optional< std::vector< Diagnostic > > | diagnostics |
| The diagnostics that this code action resolves. | |
| bool | isPreferred = false |
| std::optional< WorkspaceEdit > | edit |
| The workspace edit this code action performs. | |
| std::optional< Command > | command |
| std::optional< llvm::json::Value > | data |
Static Public Attributes | |
| static const llvm::StringLiteral | QUICKFIX_KIND = "quickfix" |
| static const llvm::StringLiteral | REFACTOR_KIND = "refactor" |
| static const llvm::StringLiteral | REFACTOR_REWRITE_KIND |
| static const llvm::StringLiteral | INFO_KIND = "info" |
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 1122 of file lspserver/include/lspserver/Protocol.h.
| std::optional<Command> lspserver::CodeAction::command |
A command this code action executes. If a code action provides an edit and a command, first the edit is executed and then the command.
Definition at line 1149 of file lspserver/include/lspserver/Protocol.h.
Referenced by lspserver::fromJSON(), and lspserver::toJSON().
| std::optional<llvm::json::Value> lspserver::CodeAction::data |
A data entry field that is preserved on a code action between a textDocument/codeAction and a codeAction/resolve request.
Definition at line 1154 of file lspserver/include/lspserver/Protocol.h.
Referenced by lspserver::fromJSON(), and lspserver::toJSON().
| std::optional<std::vector<Diagnostic> > lspserver::CodeAction::diagnostics |
The diagnostics that this code action resolves.
Definition at line 1135 of file lspserver/include/lspserver/Protocol.h.
Referenced by lspserver::fromJSON(), and lspserver::toJSON().
| std::optional<WorkspaceEdit> lspserver::CodeAction::edit |
The workspace edit this code action performs.
Definition at line 1145 of file lspserver/include/lspserver/Protocol.h.
Referenced by nixd::addExtractToFileAction(), nixd::addToFormalsAction(), lspserver::fromJSON(), and lspserver::toJSON().
|
static |
Definition at line 1132 of file lspserver/include/lspserver/Protocol.h.
| bool lspserver::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 1142 of file lspserver/include/lspserver/Protocol.h.
Referenced by nixd::addToFormalsAction(), lspserver::fromJSON(), and lspserver::toJSON().
| std::optional<std::string> lspserver::CodeAction::kind |
The kind of the code action. Used to filter code actions.
Definition at line 1128 of file lspserver/include/lspserver/Protocol.h.
Referenced by nixd::addExtractToFileAction(), nixd::addToFormalsAction(), lspserver::fromJSON(), and lspserver::toJSON().
|
static |
Definition at line 1129 of file lspserver/include/lspserver/Protocol.h.
Referenced by nixd::addToFormalsAction().
|
static |
Definition at line 1130 of file lspserver/include/lspserver/Protocol.h.
Referenced by nixd::addExtractToFileAction(), and nixd::addNoogleDocAction().
|
static |
Definition at line 1131 of file lspserver/include/lspserver/Protocol.h.
Referenced by nixd::addAttrNameActions(), nixd::addConvertToInheritAction(), nixd::addFlattenAttrsAction(), nixd::addInheritToBindingAction(), nixd::addJsonToNixAction(), nixd::addPackAttrsAction(), nixd::addRewriteStringAction(), and nixd::addWithToLetAction().
| std::string lspserver::CodeAction::title |
A short, human-readable, title for this code action.
Definition at line 1124 of file lspserver/include/lspserver/Protocol.h.
Referenced by nixd::addExtractToFileAction(), nixd::addToFormalsAction(), lspserver::fromJSON(), and lspserver::toJSON().