Error running zk commands - attempt to call field get_clients (a nil value)
bsatts opened this issue · 5 comments
bsatts commented
Check if applicable
- I have searched the existing issues (required)
- I'm willing to help fix the problem and contribute a pull request
Describe the bug
Cannot run any zk commands using the plugin as it raises the following error.
How to reproduce?
ZK version - 0.14.1 installed from source
Neovim version - NVIM v0.9.5, Build type: RelWithDebInfo, LuaJIT 2.1.1692716794
zk configuration
N/A
Neovim configuration
{
'zk-org/zk-nvim',
config = function()
require('zk').setup {
-- See Setup section below
-- can be "telescope", "fzf", "fzf_lua", "minipick", or "select" (`vim.ui.select`)
-- it's recommended to use "telescope", "fzf", "fzf_lua", or "minipick"
picker = 'select',
lsp = {
-- `config` is passed to `vim.lsp.start_client(config)`
config = {
cmd = { 'zk', 'lsp' },
name = 'zk',
-- on_attach = ...
-- etc, see `:h vim.lsp.start_client()`
},
-- automatically attach buffers in a zk notebook that match the given filetypes
auto_attach = {
enabled = true,
filetypes = { 'markdown' },
},
},
}
end,
},
Environment
zk 0.14.1
system: Linux 5.15.153.1-microsoft-standard-WSL2 x86_64 GNU/Linux
NVIM v0.9.5
Build type: RelWithDebInfo
LuaJIT 2.1.1692716794
tjex commented
This is because of the api change the came with nvim 0.10.0.
We addressed this though in this commit via this issue
But this should work... The if statement should see you're on 0.9.5 and use the appropriate api call.
How and when did you install zk-nvim
?
As a worst resort, you can get the v0.1.0
which doesn't check for nvim version 0.10.0
With packer it would be use({ "zk-org/zk-nvim", tag = "0.1.0"})
bsatts commented
Installed zk-nvim using Lazy. Fixing it to the v0.1.0 tag worked for me. Thank you :)
tjex commented
great :)