Skip to content

Commit

Permalink
Merge pull request #2241 from cdleary/cdleary/2024-08-23-inlay-hint-lsp
Browse files Browse the repository at this point in the history
Add support for inlay hint objects in LSP generation.
  • Loading branch information
hzeller committed Aug 24, 2024
2 parents 8b64887 + 461d2da commit 17e909b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions common/lsp/lsp-protocol-enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ enum SymbolKind {
kOperator = 25,
kTypeParameter = 26,
};

// These are the InlayHintKinds defined by the LSP specification.
// https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#inlayHintKind
enum InlayHintKind {
kType = 1,
kParameter = 2,
};
} // namespace lsp
} // namespace verible
#endif // COMMON_LSP_LSP_PROTOCOL_ENUMS_H
13 changes: 13 additions & 0 deletions common/lsp/lsp-protocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,16 @@ RenameParams:

# Response: Range[]

# -- textDocument/inlayHint
InlayHintParams:
textDocument: TextDocumentIdentifier
range: Range

InlayHint:
position: Position
label: string
kind?: integer # InlayHintKind enum
tooltip?: string
paddingLeft?: boolean
paddingRight?: boolean

0 comments on commit 17e909b

Please sign in to comment.