diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/lsp-extensions.md | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 7f7940d0b..a0847dad3 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -467,3 +467,41 @@ interface InlayHint { | |||
467 | label: string, | 467 | label: string, |
468 | } | 468 | } |
469 | ``` | 469 | ``` |
470 | |||
471 | ## Hover Actions | ||
472 | |||
473 | **Client Capability:** `{ "hoverActions": boolean }` | ||
474 | |||
475 | If this capability is set, `Hover` request returned from the server might contain an additional field, `actions`: | ||
476 | |||
477 | ```typescript | ||
478 | interface Hover { | ||
479 | ... | ||
480 | actions?: CommandLinkGroup[]; | ||
481 | } | ||
482 | |||
483 | interface CommandLink extends Command { | ||
484 | /** | ||
485 | * A tooltip for the command, when represented in the UI. | ||
486 | */ | ||
487 | tooltip?: string; | ||
488 | } | ||
489 | |||
490 | interface CommandLinkGroup { | ||
491 | title?: string; | ||
492 | commands: CommandLink[]; | ||
493 | } | ||
494 | ``` | ||
495 | |||
496 | Such actions on the client side are appended to a hover bottom as command links: | ||
497 | ``` | ||
498 | +-----------------------------+ | ||
499 | | Hover content | | ||
500 | | | | ||
501 | +-----------------------------+ | ||
502 | | _Action1_ | _Action2_ | <- first group, no TITLE | ||
503 | +-----------------------------+ | ||
504 | | TITLE _Action1_ | _Action2_ | <- second group | ||
505 | +-----------------------------+ | ||
506 | ... | ||
507 | ``` \ No newline at end of file | ||