class LSProtocol::CodeActionOptions

Overview

Provider options for a CodeActionRequest.

Included Modules

Defined in:

lsprotocol/types.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(code_action_kinds : Array(CodeActionKind | String) | Nil = nil, documentation : Array(CodeActionKindDocumentation) | Nil = nil, resolve_provider : Bool | Nil = nil, work_done_progress : Bool | Nil = nil) #

[View source]

Instance Method Detail

def code_action_kinds : Array(CodeActionKind | String) | Nil #

CodeActionKinds that this server may return.

The list of kinds may be generic, such as CodeActionKind.Refactor, or the server may list out every specific kind they provide.


[View source]
def documentation : Array(CodeActionKindDocumentation) | Nil #

Static documentation for a class of code actions.

Documentation from the provider should be shown in the code actions menu if either:

  • Code actions of kind are requested by the editor. In this case, the editor will show the documentation that most closely matches the requested code action kind. For example, if a provider has documentation for both Refactor and RefactorExtract, when the user requests code actions for RefactorExtract, the editor will use the documentation for RefactorExtract instead of the documentation for Refactor.

  • Any code actions of kind are returned by the provider.

At most one documentation entry should be shown per provider.

@since 3.18.0 @proposed


[View source]
def resolve_provider : Bool | Nil #

The server provides support to resolve additional information for a code action.

@since 3.16.0


[View source]
def work_done_progress : Bool | Nil #

[View source]