williamboman/nvim-lsp-installer

module 'lspconfig.util' not found

RoryNesbitt opened this issue · 5 comments

Problem description

When I put my config on a new computer or sometimes when I rerun PackerSync I get an Error at startup
Error in packer_compiled: ...nvim-lsp-installer/lua/nvim-lsp-installer/middleware.lua:1: module 'lspconfig.util' not found:

Neovim version (>= 0.7)

NVIM v0.7.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/gcc-11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=malloc -Wsuggest-attribute=cold -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/runner/work/neovim/neovim/build/config -I/home/runner/work/neovim/neovim/src -I/home/runner/work/neovim/neovim/.deps/usr/include -I/usr/include -I/home/runner/work/neovim/neovim/build/src/nvim/auto -I/home/runner/work/neovim/neovim/build/include
Compiled by runner@fv-az395-591

Operating system/version

Unraid/slackware

I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig

  • Yes

Affected language servers

all

Actual behavior

Getting the error on startup

Expected behavior

Lsp-installer doesn't die before it can even install an lsp

Healthcheck output

## nvim-lsp-installer report                                                    
    4   - OK: neovim version >= 0.7.0                                                 
    5   - WARNING: Go: not available                                                  
    6   - WARNING: cargo: not available                                               
    7   - WARNING: luarocks: not available                                            
    8   - WARNING: Ruby: not available                                                
    9   - WARNING: RubyGem: not available                                             
   10   - WARNING: Composer: not available                                            
   11   - OK: PHP: `PHP 7.4.29 (cli) (built: Apr 30 2022 15:42:38) ( NTS )`           
   12   - ERROR: npm: not available                                                   
   13   - ERROR: node: not available                                                  
   14   - OK: python3: `Python 3.9.6`                                                 
   15   - OK: pip3: `pip 21.2.3 from /usr/lib64/python3.9/site-packages/pip (python 3.9)`
   16   - WARNING: javac: not available                                               
   17   - WARNING: java: not available                                                
   18   - WARNING: julia: not available                                               
   19   - OK: wget: `GNU Wget 1.21.2 built on linux-gnu.`                             
   20   - OK: curl: `curl 7.83.1 (x86_64-pc-linux-gnu) libcurl/7.83.1 OpenSSL/1.1.1o zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 c-ares/1.18.1 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.46.0 OpenLDAP/2.4.59`
   21   - OK: gzip: `gzip 1.12`                                                       
   22   - OK: tar: `tar (GNU tar) 1.34`                                               
   23   - OK: bash: `GNU bash, version 5.1.16(1)-release (x86_64-slackware-linux-gnu)`
   24   - OK: sh: `Ok`                                                                
   25   - OK: GitHub API rate limit. Used: 0. Remaining: 60. Limit: 60. Reset: Mon 27 Jun 2022 06:59:32 PM BST.

Screenshots

No response

Might be worth noting that sometimes the config works perfectly fine and then I recompile the packer, without changing anything, and it starts doing this. And the other way round, no changes but it suddenly stops erroring

The checkhealth and version info is from my unraid server where I'm currently gettting the error but it's not the only device it happens on. My main machine is EndeavourOS with the latest stable neovim and I get the issue. Currently I fixed it on this machine by adding require'lspconfig' to the top of my lsp.lua file, but that hasn't fixed it on unraid so I imaging it is a temporary solution

Hello! This might be due to me providing a bad example of how to install it when using packer 🙈. I removed these incorrect instructions in #830. Did you copy these examples from the README when installing it perhaps?

I think I started off with that but my packer has changed so often it no longer looks like that. I'll copy over my config in the morning

My packer is very simple

use {
  "williamboman/nvim-lsp-installer",
  config = "dofile('"..pluginConf.."lsp-installer.lua')",
}

I actually think I've fixed it by changing this to

use {
  "williamboman/nvim-lsp-installer",
  config = "dofile('"..pluginConf.."lsp-installer.lua')",
  requires = {
    "neovim/nvim-lspconfig",
  }
}

Cool 👍!