I am using a nightly build of nvim, and I am trying to use neovim/nvim-lspconfig
. I have followed to doc and setup the language server, but nvim throws error and reports that it is unable to process it.
The error is coming from the lua part. When I comment out it everything works as normal. Here is my code:
Plug 'neovim/nvim-lspconfig'
Plug 'nvim-lua/completion-nvim'
:lua << EOF
require'lspconfig'.tsserver.setup{}
EOF
What have I done wrong? I have checked the doc again but I cannot find the error.
Update
This is the error message. Why is lspconfig
not found? I have already :PlugInstall
ed.
E5108: Error executing lua [string ":lua"]:1: module 'lspconfig' not found:
no field package.preload['lspconfig']
no file './lspconfig.lua'
no file '/usr/local/Cellar/luajit-openresty/20201229_1/share/luajit-2.1.0-beta3/lspconfig.lua'
no file '/usr/local/share/lua/5.1/lspconfig.lua'
no file '/usr/local/share/lua/5.1/lspconfig/init.lua'
no file '/usr/local/Cellar/luajit-openresty/20201229_1/share/lua/5.1/lspconfig.lua'
no file '/usr/local/Cellar/luajit-openresty/20201229_1/share/lua/5.1/lspconfig/init.lua'
no file './lspconfig.so'
no file '/usr/local/lib/lua/5.1/lspconfig.so'
no file '/usr/local/Cellar/luajit-openresty/20201229_1/lib/lua/5.1/lspconfig.so'