How do you set up account name autocompletion in Emacs ledger-mode?

(from Mastodon:)

I have a question about hledger. How do you use autofill in emacs for cost categories?

I see clues for autocompletion of account names in ledger-mode at

GitHub - ledger/ledger-mode: Emacs Lisp files for interacting with the C++Ledger accounting system

and

ledger-mode/doc/ledger-mode.texi at 1a0e96cd39d5b34e897ed20dc22bd0480035fa35 · ledger/ledger-mode · GitHub

In my .emacs I have…

(setq
  tab-always-indent 'complete
  ledger-complete-in-steps t
  )

And I press TAB a few times, and if I don't get what I want I press M-/ a few times to try dabbrev-expand, another completion system.

And here I see mention of it in hledger-mode:

GitHub - narendraj9/hledger-mode: An Emacs major mode for Hledger

(I don't autocomplete account names too often.)

I have the same configuration for ledger-mode with the only difference I use one hook to set the variables.

(add-hook 'ledger-mode-hook
	    (lambda ()
	      (setq-local tab-always-indent 'complete)
	      (setq-local completion-cycle-thresold t))))