Debian Codegraph @

frontend/src/codemirror/beancount-snippets.ts

raw
1 import type { Completion } from "@codemirror/autocomplete";
2 import { snippetCompletion } from "@codemirror/autocomplete";
3
4 import { todayAsString } from "../format";
5
6 export const beancountSnippets: () => readonly Completion[] = () => {
7 const today = todayAsString();
8 return [
9 snippetCompletion(
10 `${today} #{*} "#{}" "#{}"\n #{Account:A} #{Amount}\n #{Account:B}`,
11 {
12 label: `${today} * transaction`,
13 },
14 ),
15 ];
16 };