Neovim 101 — LSP

Let’s explore the different ways to configure LSP in Neovim.

alpha2phi
7 min readOct 21, 2022
Neovim 101 — LSP

Neovim supports the Language Server Protocol (LSP). However, setting it up could be daunting for beginners.

In this article, we will start by configuring LSP using the built-in APIs without using any plugins. With this knowledge, we will check out plugins that make the configuration more straightforward and uncomplicated.

This article is part of the Neovim 101 series.

The Neovim configuration files are available in this repository.

Getting Started

Generally, there are 4 ways to configure LSP in Neovim, listed below from high to low in terms of the efforts.

  • Use the built-in LSP APIs
  • Use the nvim-lspconfig plugin that provides a collection of LSP configurations
  • Use plugins that wrap all the LSP boilerplates and configurations
  • Use a Neovim distribution that functions like an IDE

We will go through these options in this article.

LSP APIs

Starting Neovim release 0.8, we have new APIs that make it easy to configure LSP without plugins.

vim.lsp.start

--

--

alpha2phi

Software engineer, Data Science and ML practitioner.