williamboman / nvim-lsp-installer

Further development has moved to https://github.com/williamboman/mason.nvim!
https://github.com/williamboman/mason.nvim
Apache License 2.0
2k stars 123 forks source link

bad argument #1 to 'ipairs' (table expected, got nil) #493

Closed strcat closed 2 years ago

strcat commented 2 years ago

Problem description

Since recently i am getting the error [nvim-lsp-installer] /home/dope/.config/nvim/lua/user/lsp/settings/jsonls.lua:172: bad argument #1 to 'ipairs' (table expected, got nil)

Neovim version (>= 0.6)

NVIM v0.6.1 Build type: Release LuaJIT 2.1.0-beta3

Operating system/version

Linux dreckskind 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 GNU/Linux

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

Affected language servers

all

Actual behavior

Error on starting nvim

Expected behavior

Well.. should start without any errors

Healthcheck output

nvim-lsp-installer: require("nvim-lsp-installer.health").check()
========================================================================
## nvim-lsp-installer report
  - OK: neovim version >= 0.6.0
  - WARNING: **Composer**: not available
  - WARNING: **PHP**: not available
  - WARNING: **javac**: not available
  - WARNING: **julia**: not available
  - OK: **bash**: `GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)`
  - OK: **tar**: `tar (GNU tar) 1.34`
  - OK: **gzip**: `gzip 1.11`
  - OK: **curl**: `curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/1.1.1m zlib/1.2.11 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.46.0`
  - OK: **wget**: `GNU Wget 1.21.2 built on linux-gnu.`
  - OK: **python3**: `Python 3.10.2`
  - OK: **node**: `v17.4.0`
  - OK: **Ruby**: `ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux]`
  - OK: **Go**: `go version go1.17.7 linux/amd64`
  - OK: **sh**: `Ok`
  - OK: **java**: `Ok`
  - OK: **RubyGem**: `3.3.5`
  - OK: **npm**: `8.5.0`
  - OK: **pip3**: `pip 22.0.2 from /home/dope/.local/lib/python3.10/site-packages/pip (python 3.10)`

Screenshots

No response

ch4iril commented 2 years ago

same with me, error like that...

Screen Shot 2022-02-20 at 13 18 39
williamboman commented 2 years ago

Have you tried looking at your file /home/dope/.config/nvim/lua/user/lsp/settings/jsonls.lua on line 172 as the error message suggests the issue is at? I'd wager there's a function call there that is causing the issue.

@ch4iril For you that'd be /Users/Ces30/.config/nvim/lua/user/lsp/settings/json.lua" at line172`.

strcat commented 2 years ago

Yep. But i never changed/edited this file manually but anyway.

171: local function extend(tab1, tab2)
172:   for _, value in ipairs(tab2) do
173:      table.insert(tab1, value)
174:   end
175:   return tab1
176: end
williamboman commented 2 years ago

Where does it come from? It's not from this plugin at least 😅

ch4iril commented 2 years ago

Have you tried looking at your file /home/dope/.config/nvim/lua/user/lsp/settings/jsonls.lua on line 172 as the error message suggests the issue is at? I'd wager there's a function call there that is causing the issue.

@ch4iril For you that'd be /Users/Ces30/.config/nvim/lua/user/lsp/settings/json.lua" at line172`.

i comment the line 16 in lsp-installer (jsonls), the notif red text gone.

williamboman commented 2 years ago

Closing as this is an error outside of nvim-lsp-installer!