Add Inlay Hints for last legs of transactions with elided amounts
In some complicated transactions where I have not specified the amount in the last leg of the transaction, I still want to view the value that beancount has inferred.
This PR adds support for exactly this scenario by adding inlay hints for such postings.

It only adds the hints for non-trivial transactions, which are either:
- Transctions with more than two legs
- Transactions dealing with multiple commodities
(Open to suggestions on more scenarios)
The extension does not actually calculate the balance amount, so the inlay hints are not real-time. They will show up only after a bean-check run on the file(s), usually triggered by a file save.
TODO:
- [x] Add config to disable the hints
- [ ] Also, a config to change the colors of the inlay hints
- [ ] And a config to show hints even for trivial transactions
- [ ] More robust column alignment for the inlaid amount.
- [x] ~Currently, it only checks the previous line and tries to match its alignment. This means if there's a comment instead of a posting on the previous line, it will fail to get the correct column.~ Fixed. Now we keep searching in previous lines to find the pad amount.
- [x] Needs more testing
Been using this code for 2 years, I'm happy with the current state and believe it should be merged. The remaining work is
- Configs to change color, and to enable the hints for trivial transactions
- One bug I found that happens when you have both the cost and the price specified for a commodity:
(The inlay hint should not be shown) But this is likely because I'm using the
@@directive incorrectly. And I'm not exactly sure how to detect this case in ourbeancheck.pyscript. It is a rare bug, so will leave it unfixed.
Other than these, the PR works fine and is ready for review.
Thanks for the contribution! I will try to find time in the next 2 weeks to review it.