Completion

While most people use some sort of auto-completion plugin, vim and neovim actually have pretty decent completion functionality built-in. If you take a look at :help ins-completion you will see a list of various completion sources, like buffer words, entire lines, file paths, tags, dictionary words, and more. To be fair, some of these are pretty useless. When writing code you will probably not find yourself using a thesaurus very frequently. However, there are two completion mechanisms that stand out here: userfunc and omnifunc. Both work the exact same way, don’t ask me why there’s two of them; for simplicity’s sake I’m just going to say “omnifunc” from now on, but I mean both, technically. ...

LSP

This is a guide for neovim users who want to use the Language Server Protocol (LSP). What is LSP? The Language Server Protocol is a protocol which defines a standard way of how a code editor and a static analysis tool should communicate. The basic premise of the protocol is that you have a client and a server. The client is your text editor (neovim in this case) and the server is some external process that communicates with a client over RPC. A client can start a server as an external process and the two communicate with messages. This allows a server to analyze the current file you’re editing without having to care about how that information is represented. It’s your editor’s (client) job to interpret the response from the server and showing you the errors. ...