Skip to content

Commit fad6eef

Browse files
committed
Add snippet for transaction
1 parent 6619587 commit fad6eef

4 files changed

Lines changed: 23 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
1313
- Added transaction status cycling command
1414

1515
## [0.0.3] - 2025-09-17
16-
- Implemented account auto completion
16+
- Implemented account auto completion
17+
18+
## [0.0.4] - TBD
19+
- Added snippets for common ledger entries

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Syntax highlighting
66
- Formatter
77
- Auto-completion for accounts
8+
- Snippets for common ledger entries
89

910
## Release Notes
1011

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@
6262
"description": "List of ledger files to include for account auto-completion."
6363
}
6464
}
65-
}
65+
},
66+
"snippets": [
67+
{
68+
"language": "ledger",
69+
"path": "./snippets/ledger.json"
70+
}
71+
]
6672
},
6773
"scripts": {
6874
"vscode:prepublish": "npm run compile",

snippets/ledger.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"Ledger Transaction": {
3+
"prefix": ["ledger-transaction", "transaction"],
4+
"body": [
5+
"$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE * ${1:Description}",
6+
" ${2:Account1} ${3:Amount} ${4:Currency}",
7+
" ${5:Account2}"
8+
],
9+
"description": "Template for a Ledger transaction entry"
10+
}
11+
}

0 commit comments

Comments
 (0)