Neovim for Beginners — LSP Installer

Refactor and automate the LSP installation process.

alpha2phi
3 min readJun 11, 2022
Neovim for Beginners — LSP Installer

In this article, let’s refactor our LSP installation process.

This article is part of the Neovim for Beginners series.

The Neovim configuration files can be found in this repository.

The Background

We use nvim-lsp-installer for the installation of language servers. As described in this thread, there are changes and improvements in the plugin to make it even easier to work withnvim-lspconfig and other LSP plugins.

Tip: Check out this article in which we use mason.nvim, the next-generation of nvim-lsp-installer to manage LSP servers, DAP servers, linters, and formatters.

Configure the Installer

Let’s refactor our installer code to use the new APIs and automate the installation of the language servers.

In the lua/config/lsp/installer.lua file, change the code to use the following snippet.

--

--

alpha2phi

Software engineer, Data Science and ML practitioner.