<link rel="stylesheet" href="/_merged_assets/_static/noscript.css">
Atom Community Logo Atom Community API Getting Started Toggle darkmode

Code Actions

API

CodeAction

Methods

apply

Returns

Promise<void>

dispose

Returns

void

getTitle

Returns

Promise<string>

CodeActionFetcher

atom-ide-base-code-actions provides a CodeActionFetcher which offers an API to request CodeActions from all CodeAction providers. For now, CodeActionFetcher can only fetch CodeActions for a Diagnostic. In the future, this API can be extended to provide a stream of CodeActions based on the cursor position.

Properties

getCodeActionForDiagnostic


  

CodeActionProvider

Properties

grammarScopes

(optional)
readonly string[]

priority

number

Methods

getCodeActions

Parameters

editor
TextEditor
range
Range
diagnostics
Diagnostic[]

Returns

Promise<undefined|null|CodeAction[]>

Diagnostic

Properties

filePath

string

providerName

string

range

Range

text

(optional)
string

type

DiagnosticType

DiagnosticType