[Bug] Doesn't handle plugins written in Python
In general, a plugin can arbitrarily rewrite the ledger. The server should work with the ledger after the rewrites have been applied. This can be retreived from beancount's parse Python function.
Eg: The auto_insert_open plugin from upstream beancount inserts open directives after parsing the entire beancount file. These should show up in the completions.
For completion of account name, it didn't check for open directives, once it is used in postings, It should be able to show up in completion items.
For python plugins, There is no way to support plugins on browser side. So the diagnostic might have problem.
Implementing all the Beancount features is almost equivalent to re-implementing Beancount in JavaScript. Even then, it wouldn't support many Beancount plugins. It is a very large work. for diagnostics, I hope to maintain the current simple implementation. For options, I plan to support as much as possible, but it definitely won't fully implement all of Beancount's features.
Originally posted by @fengkx in #11
Is it possible to have certain features available only in local vscode, while keeping them disabled on the browser? Should be a fair compromise I think
Is it possible to have certain features available only in local vscode, while keeping them disabled on the browser?
It is already like this now.
What features? Which plugin? Cloud you provide an example. I don't think auto open account have problem in completion.
Here's an example-
; Set the operating currency
option "operating_currency" "USD"
; Load the plugin
; plugin "plugins.auto_insert_open"
plugin "beancount.plugins.auto_accounts"
;
; Without the plugin, the transaction below would cause an error
; because the accounts 'Assets:Checking' and 'Expenses:Groceries'
; have not been explicitly opened with a directive like:
; 2025-01-01 open Assets:Checking
;
; The 'auto_insert_open' plugin automatically adds these 'open'
; directives using the date of the first transaction (2025-10-26).
;
2025-10-26 * "Corner Market" "Weekly groceries"
Assets:Checking -75.50 USD
Expenses:Groceries 75.50 USD
2025-10-27 * "Gas Station" "Fill up car"
Assets:Checking -45.00 USD
Expenses:Automobile:Gas 45.00 USD
2025-10-26 * "Payee" "Narration"
; should autocomplete the auto-opened accounts
The autocompletion is not working at all in this case.
Can't reproduce this. The completion do not require an account definition(open directive). Once it is used, it should be shown in completion items.