Module: LanguageServer::Protocol::Constant::CodeActionKind

Defined in:
lib/language_server/protocol/constant/code_action_kind.rb,
sig/language_server/protocol/constant/code_action_kind.rbs

Overview

The kind of a code action.

Kinds are a hierarchical list of identifiers separated by ., e.g. "refactor.extract.function".

The set of kinds is open and client needs to announce the kinds it supports to the server during initialization. A set of predefined code action kinds.

Constant Summary collapse

EMPTY =

Empty kind.

Returns:

  • ('')
''
QUICK_FIX =

Base kind for quickfix actions: 'quickfix'.

Returns:

  • ('quickfix')
'quickfix'
REFACTOR =

Base kind for refactoring actions: 'refactor'.

Returns:

  • ('refactor')
'refactor'
REFACTOR_EXTRACT =

Base kind for refactoring extraction actions: 'refactor.extract'.

Example extract actions:

  • Extract method
  • Extract function
  • Extract variable
  • Extract interface from class
  • ...

Returns:

  • ('refactor.extract')
'refactor.extract'
REFACTOR_INLINE =

Base kind for refactoring inline actions: 'refactor.inline'.

Example inline actions:

  • Inline function
  • Inline variable
  • Inline constant
  • ...

Returns:

  • ('refactor.inline')
'refactor.inline'
REFACTOR_REWRITE =

Base kind for refactoring rewrite actions: 'refactor.rewrite'.

Example rewrite actions:

  • Convert JavaScript function to class
  • Add or remove parameter
  • Encapsulate field
  • Make method static
  • Move method to base class
  • ...

Returns:

  • ('refactor.rewrite')
'refactor.rewrite'
SOURCE =

Base kind for source actions: source.

Source code actions apply to the entire file.

Returns:

  • ('source')
'source'
SOURCE_ORGANIZE_IMPORTS =

Base kind for an organize imports source action: source.organizeImports.

Returns:

  • ('source.organizeImports')
'source.organizeImports'
SOURCE_FIX_ALL =

Base kind for a 'fix all' source action: source.fixAll.

'Fix all' actions automatically fix errors that have a clear fix that do not require user input. They should not suppress errors or perform unsafe fixes such as generating new types or classes.

Returns:

  • ('source.fixAll')
'source.fixAll'