aboutsummaryrefslogtreecommitdiff
path: root/docs/dev/lsp-extensions.md
diff options
context:
space:
mode:
authorvsrs <[email protected]>2020-06-03 12:34:11 +0100
committervsrs <[email protected]>2020-06-05 13:00:28 +0100
commitda7ec4b3398ffaf672a755bf57066e17ac42303a (patch)
tree2f8e1d37b13d16262587b6712a4612c6c4261355 /docs/dev/lsp-extensions.md
parent7d0dd17b09240385333805637ea17992a8089cf2 (diff)
Add hover actions LSP extension documentation.
Diffstat (limited to 'docs/dev/lsp-extensions.md')
-rw-r--r--docs/dev/lsp-extensions.md38
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
475If this capability is set, `Hover` request returned from the server might contain an additional field, `actions`:
476
477```typescript
478interface Hover {
479 ...
480 actions?: CommandLinkGroup[];
481}
482
483interface CommandLink extends Command {
484 /**
485 * A tooltip for the command, when represented in the UI.
486 */
487 tooltip?: string;
488}
489
490interface CommandLinkGroup {
491 title?: string;
492 commands: CommandLink[];
493}
494```
495
496Such 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