From a4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9 Mon Sep 17 00:00:00 2001 From: Dimitris Dimitropoulos Date: Mon, 11 Aug 2025 21:23:42 +0300 Subject: fix(zk): update config to 0.11+ - Remove buf.execute_command in favor of :exec_cmd - Set title on :exec_cmd --- lsp/zk.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lsp/zk.lua') diff --git a/lsp/zk.lua b/lsp/zk.lua index e8a4e16b..267d3839 100644 --- a/lsp/zk.lua +++ b/lsp/zk.lua @@ -16,12 +16,15 @@ return { cmd = { 'zk', 'lsp' }, filetypes = { 'markdown' }, root_markers = { '.zk' }, + ---@param bufnr integer + ---@param client vim.lsp.Client on_attach = function(client, bufnr) vim.api.nvim_buf_create_user_command(bufnr, 'LspZkIndex', function() - vim.lsp.buf.execute_command { + client:exec_cmd({ + title = 'ZkIndex', command = 'zk.index', arguments = { vim.api.nvim_buf_get_name(bufnr) }, - } + }, { bufnr = bufnr }) end, { desc = 'ZkIndex', }) @@ -31,6 +34,7 @@ return { local root = find_zk_root(bufpath) client:exec_cmd({ + title = 'ZkList', command = 'zk.list', arguments = { root, { select = { 'path' } } }, }, { bufnr = bufnr }, function(_err, result) @@ -50,6 +54,7 @@ return { vim.api.nvim_buf_create_user_command(bufnr, 'LspZkNew', function(...) client:exec_cmd({ + title = 'ZkNew', command = 'zk.new', arguments = { vim.api.nvim_buf_get_name(bufnr), -- cgit v1.2.3-70-g09d2