Skip to content

Commit

Permalink
Add PreviewerCommon
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Nov 7, 2024
1 parent 238c1a7 commit 8001d04
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions denops/ddc/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,33 +187,40 @@ export type PreviewContext = {
split?: "horizontal" | "vertical" | "no";
};

type PreviewerCommon = {
/**
* Line number of preview buffer to be made center and highlighted
*/
lineNr?: number;
};

type EmptyPreviewer = {
kind: "empty";
};
} & PreviewerCommon;

export type CommandPreviewer = {
kind: "command";

command: string;
};
} & PreviewerCommon;

export type HelpPreviewer = {
kind: "help";

tag: string;
};
} & PreviewerCommon;

type MarkdownPreviewer = {
kind: "markdown";

contents: string[];
};
} & PreviewerCommon;

type TextPreviewer = {
kind: "text";

contents: string[];
};
} & PreviewerCommon;

/**
* Previewer defines how the preview is rendered
Expand Down

0 comments on commit 8001d04

Please sign in to comment.