Method

LspCodeActionget_disabled_reason

Declaration

const gchar*
lsp_code_action_get_disabled_reason (
  LspCodeAction* self
)

Description

Gets the value of disabled_reason.

Human readable description of why the code action is currently disabled, if it is disabled.

This is displayed in the code actions UI. When non-null, this indicates that the code action cannot currently be applied.

Clients should follow the following guidelines regarding disabled code actions:

  • Disabled code actions are not shown in automatic lightbulbs code action menus.

  • Disabled actions are shown as faded out in the code action menu when the user request a more specific type of code action, such as refactorings.

  • If the user has a keybinding that auto applies a code action and only a disabled code actions are returned, the client should show the user an error message with reason in the editor.

Since:

3.16.0.

Return value

Type: const gchar*

The value of disabled_reason.

The returned data is owned by the instance.
The return value can be NULL.
The value is a NUL terminated UTF-8 string.