Skip to content

Commit

Permalink
Add filetype for PreviewerCommon
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Jul 13, 2023
1 parent 6e7a979 commit 34508a4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 4 additions & 4 deletions denops/ddu/deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ export { ensure, is } from "https://deno.land/x/[email protected]/mod.ts";
export {
assertEquals,
equal,
} from "https://deno.land/std@0.193.0/testing/asserts.ts";
export { parse, toFileUrl } from "https://deno.land/std@0.193.0/path/mod.ts";
} from "https://deno.land/std@0.194.0/testing/asserts.ts";
export { parse, toFileUrl } from "https://deno.land/std@0.194.0/path/mod.ts";
export {
deadline,
DeadlineError,
} from "https://deno.land/std@0.193.0/async/mod.ts";
} from "https://deno.land/std@0.194.0/async/mod.ts";
export { TimeoutError } from "https://deno.land/x/[email protected]/response_waiter.ts";
export { Lock } from "https://deno.land/x/[email protected]/mod.ts";
export {
basename,
dirname,
SEP as pathsep,
} from "https://deno.land/std@0.193.0/path/mod.ts";
} from "https://deno.land/std@0.194.0/path/mod.ts";
5 changes: 5 additions & 0 deletions denops/ddu/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ type PreviewerCommon = {
* Syntax to apply in the preview buffer
*/
syntax?: string;

/**
* Filetype to apply in the preview buffer
*/
filetype?: string;
};

/**
Expand Down
9 changes: 8 additions & 1 deletion doc/ddu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,13 @@ expr (number | string) (Optional)
|bufname()|.
NOTE: It is only avaiable in |ddu-previewer-BufferPreviewer|.

*ddu-previewer-attribute-filetype*
filetype (string) (Optional)
'filetype' to apply in the preview buffer.

Default: |filetype-detect|
(|ddu-previewer-BufferPreviewer| only)

*ddu-previewer-attribute-highlights*
highlights (PreviewHighlight[]) (Optional)
Highlights to apply in the preview buffer.
Expand Down Expand Up @@ -1275,7 +1282,7 @@ pattern (string) (Optional)

*ddu-previewer-attribute-syntax*
syntax (string) (Optional)
Syntax to apply in the preview buffer.
'syntax' to apply in the preview buffer.


==============================================================================
Expand Down

0 comments on commit 34508a4

Please sign in to comment.