Skip to content

Commit 8001d04

Browse files
committed
Add PreviewerCommon
1 parent 238c1a7 commit 8001d04

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

denops/ddc/types.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,33 +187,40 @@ export type PreviewContext = {
187187
split?: "horizontal" | "vertical" | "no";
188188
};
189189

190+
type PreviewerCommon = {
191+
/**
192+
* Line number of preview buffer to be made center and highlighted
193+
*/
194+
lineNr?: number;
195+
};
196+
190197
type EmptyPreviewer = {
191198
kind: "empty";
192-
};
199+
} & PreviewerCommon;
193200

194201
export type CommandPreviewer = {
195202
kind: "command";
196203

197204
command: string;
198-
};
205+
} & PreviewerCommon;
199206

200207
export type HelpPreviewer = {
201208
kind: "help";
202209

203210
tag: string;
204-
};
211+
} & PreviewerCommon;
205212

206213
type MarkdownPreviewer = {
207214
kind: "markdown";
208215

209216
contents: string[];
210-
};
217+
} & PreviewerCommon;
211218

212219
type TextPreviewer = {
213220
kind: "text";
214221

215222
contents: string[];
216-
};
223+
} & PreviewerCommon;
217224

218225
/**
219226
* Previewer defines how the preview is rendered

0 commit comments

Comments
 (0)