File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed
Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ import type * as Atom from "atom"
2+ import type { IdeUri } from "./uri"
3+
4+ export type CallHierarchyType = "incoming" | "outgoing"
5+
6+ export interface CallHierarchyProvider {
7+ name : string
8+ priority : number
9+ grammarScopes : ReadonlyArray < string >
10+ getIncomingCallHierarchy ( editor : Atom . TextEditor , point : Atom . Point ) : Promise < CallHierarchy < "incoming" > | null >
11+ getOutgoingCallHierarchy ( editor : Atom . TextEditor , point : Atom . Point ) : Promise < CallHierarchy < "outgoing" > | null >
12+ }
13+
14+ interface CallHierarchy < T extends CallHierarchyType > {
15+ type : T
16+ data : CallHierarchyItem [ ]
17+ /** Returns CallHierarchy data about the i-th CallHierarchyItem. */
18+ itemAt ( i : number ) : Promise < CallHierarchy < T > >
19+ }
20+
21+ interface CallHierarchyItem {
22+ path : IdeUri
23+ name : string
24+ /** Same as the icon of outline.d.ts */
25+ icon ?: string
26+ tags : SymbolTagKind [ ]
27+ detail ?: string
28+ range : Atom . Range
29+ selectionRange : Atom . Range
30+ }
31+
32+ /**
33+ * Kind of symbol tag - matches the names from the Language Server Protocol. LSP specification:
34+ * https://microsoft.github.io/language-server-protocol/specifications/specification-current/#symbolTag
35+ */
36+ export type SymbolTagKind = "deprecated" // currently no other type
Original file line number Diff line number Diff line change 55
66export * from "./uri"
77export * from "./busy-signal"
8+ export * from "./call-hierarchy"
89export * from "./code-actions"
910export * from "./code-highlight"
1011export * from "./datatip"
@@ -20,6 +21,7 @@ export * from "./refactor"
2021export * from "./console"
2122
2223import { BusySignalProvider } from "./busy-signal.d"
24+ import { CallHierarchyProvider } from "./call-hierarchy"
2325import { CodeActionProvider } from "./code-actions"
2426import { CodeHighlightProvider } from "./code-highlight"
2527import { AnyDatatipProvider } from "./datatip"
@@ -39,6 +41,7 @@ export interface ProviderCommon {
3941export type Provider =
4042 | ProviderCommon
4143 | BusySignalProvider
44+ | CallHierarchyProvider
4245 | CodeActionProvider
4346 | CodeHighlightProvider
4447 | AnyDatatipProvider
You can’t perform that action at this time.
0 commit comments