Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add InlayHint (LSP 3.17) #22

Merged
merged 6 commits into from May 14, 2022
Merged

Conversation

Booksbaum
Copy link
Contributor

Note: LSPAny in LSP is:

export type LSPAny = LSPObject | LSPArray | string | integer | uinteger |
        decimal | boolean | null;
export type LSPObject = { [key: string]: LSPAny };
export type LSPArray = LSPAny[];

which I simplified to JToken

Note: InlayHintProvider in LSP:

        inlayHintProvider?: boolean | InlayHintOptions | InlayHintRegistrationOptions;

Based on other existing provider capabilities, I just use bool option.
I created neither InlayHintOptions nor InlayHintRegistrationOptions.

Note: [`LSPAny`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#lspAny) in LSP is:
```typescript
export type LSPAny = LSPObject | LSPArray | string | integer | uinteger |
	decimal | boolean | null;
export type LSPObject = { [key: string]: LSPAny };
export type LSPArray = LSPAny[];
```
which I simplified to `JToken`

Note: [InlayHintProvider](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#serverCapabilities) in LSP:
```typescript
	inlayHintProvider?: boolean | InlayHintOptions | InlayHintRegistrationOptions;
```
Based on other existing provider capabilities, I just use `bool option`.
I created neither [`InlayHintOptions`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#inlayHintOptions) nor [`InlayHintRegistrationOptions`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#inlayHintRegistrationOptions).
@baronfel
Copy link
Contributor

I added the InlayHintOptions because it's very easy right now and it prepares us for if they add properties in the future, but otherwise this looks great.

@baronfel baronfel merged commit 7c5296a into ionide:main May 14, 2022
@Booksbaum Booksbaum deleted the LSP317-InlayHints branch May 14, 2022 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants