The first commit adds an ignore_id option to opts in update_lightbulb. That is because if we just set opts.ignore[client.id] = true in init.lua:201, the ignore table will be messed up.
For example, if we have two client clangd which have the id 1, and null-ls, which have the id 2. Then set ignore to {"null-ls"}, after init.lua:201, the ignore will be {"null-ls", true}.
So when code comes to init.lua:147, for clangd that has id 1, the not opts.ignore[client_id] will also be false because not "null-ls" = false. So storing the client id in a standalone field will prevent the table to be messed up.
The second commit change config usage into opts because config will not respect the default options that are set by setup but opts will.
I'm not very familiar with the code of the repo so if I break anything, feel free the change it.
This PR contains 2 commits and should fix #39.
The first commit adds an
ignore_id
option toopts
inupdate_lightbulb
. That is because if we just setopts.ignore[client.id] = true
in init.lua:201, the ignore table will be messed up.For example, if we have two client
clangd
which have the id 1, andnull-ls
, which have the id 2. Then set ignore to{"null-ls"}
, after init.lua:201, theignore
will be{"null-ls", true}
. So when code comes to init.lua:147, forclangd
that has id 1, thenot opts.ignore[client_id]
will also befalse
becausenot "null-ls" = false
. So storing the client id in a standalone field will prevent the table to be messed up.The second commit change
config
usage intoopts
becauseconfig
will not respect the default options that are set bysetup
butopts
will.I'm not very familiar with the code of the repo so if I break anything, feel free the change it.