Postfix completion


Nothing really new since this article dates from 2014, but I just stumbled upon it:

It presents a feature introduced in IntelliJ, which is about snippets / autocompletion.
The goal of this “postfix completion” system is to be able to transform the text that has just been typed.
I let you discover the GIFs embedded in the article which are self explanatory.

This trick would be nice in Kakoune, I think we have everything needed in place (InsertChar hooks, suggestions…)

This is really language dependent feature. It will make language scripts really complex. I feel like this is good candidate for LSP.

rust-analyzer (an alternative Rust Language Server) has a few of these, and it’s written by somebody who works/used to work on IntelliJ, so I’m not surprised that the idea has carried over.

I don’t actually know if it works with kak-lsp, though; rust-analyzer seems to be focussed on IDE-like functionality (refactoring and navigation), whereas I’m more interested in inline compiler errors and warnings, so I generally stick with the official Rust Language Server.