Neovim LSP Enhanced

8 min readMar 14, 2021

Additional features to enhance your LSP experience in Neovim.

Neovim — Enhanced LSP Experience


In the previous article, I walked through with you how to set up LSP and DAP in Neovim. In this article let’s enhance the LSP experience in Neovim by configuring and setting up additional features.

Installation of Language Servers

Just like the previous article, let’s get started by installing the language servers.

If you are using coc.nvim, normally the language server is installed automatically for you. For Neovim LSP, there are available plugins to automate this process. Here I will go through the manual installation steps.


For Python, let’s install pyright.

$ npm install -g pyright


For Golang, let’s install gopls.

$ GO111MODULE=on go get


For Rust, let’s use rust_analyzer. The easiest way to install is to download the binary, copy it to a folder, and add the folder to the environment PATH.


For Typescript, let’s install typescript-language-server.

$ npm install -g typescript-language-server


In the previous article, I use completion-nvim. For this article, I am going to use nvim-compe and add additional features.

In lua/plugins.lua, add the lines below to install the plugins.

use { 'neovim/nvim-lspconfig' }
use { 'hrsh7th/nvim-compe' }

Run :luafile % and :PackerInstall to install the plugins.

Create a lang folder under lua and add an init.lua file with the following content. This file sets up LSP for Python, Golang, Rust, and Typescript and also the key mappings.


Software engineer, Data Science and ML practitioner.