How to add a custom server to `nvim-lspconfig`?

I have been redirected here from nvim-lspconfig/issues/new.

I remembered that in the past there was a section in the readme/wiki on how to add a custom lsp server, but it was removed. I looked it up in the git history and tried using the code and it didn’t work (it said the server’s configuration was not found even though I was manually assigning it to lspconfig.configs).

I managed to get it to work by going into lspconfig directory and creating the config there, but I am looking for a less hacky solution. I’d be interested in the following questions:

  1. Why was the custom guide removed?
  2. What is the recommended way currently?

(I am the creator of woke, an lsp for the Ethereum-based language Solidity, and was trying to enable it for neovim, after supporting Vs Code for many months) Thanks!

I was able to do it like this:

local lsp = require 'lspconfig'

vim.tbl_deep_extend('keep', lsp, {
	lsp_name = {
		cmd = { 'command' },
		filetypes = 'filetype',
		name = 'lsp_name',
1 Like