fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

Clément Joly :ferris:

I’ve been using with for a couple months now. It’s been a complete game changer to update my journal with fast completions and code navigation. It works out of the box with my editor of choice /#vim and also with other editors, sometimes with a plugin (, …).

I’m now sharing the ctags configuration, as this could benefit others: cj.rs/ledger-ctags/

Please let me know if you have issues or if some things are unclear!

🏦

🧵1/4

cj.rsLedger.ctagsCtags file for ledger-cli

The Language Server Protocol (LSP) is the long-running process that VS Code uses to get clever completions, code navigation and error checking. You get one LSP per language and it continuously “builds your code” in the background and answers queries from the text editor. Such queries can be: “Where was this variable declared?” or “What symbols of type X could complete what was just typed”.

🧵2/4

I’m also setting -cli as a custom compiler in vim (with github.com/ledger/vim-ledger). So on write, the file is parsed by ledger and any errors are highlighted straight away in the editor, with the usual navigation convenience.

🧵3/4

GitHubGitHub - ledger/vim-ledger: Vim plugin for LedgerVim plugin for Ledger. Contribute to ledger/vim-ledger development by creating an account on GitHub.

Ctags + this compiler support actually makes for a great LSP substitute, but much lighter. There is no long running process building an in memory view from all the files, just a text file with pointers to definitions (the tag file) and quick calls to the ledger command to get errors.

🧵4/4

@cjoly No way!!1 Using ctags for auto-completion is such a great idea