aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/zk.lua
diff options
context:
space:
mode:
authorDimitris Dimitropoulos <dimitris.dimitropoulos00@gmail.com>2025-08-11 21:23:42 +0300
committerDimitris Dimitropoulos <dimitris.dimitropoulos00@gmail.com>2025-08-11 21:45:11 +0300
commita4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9 (patch)
tree16ab94c399dd1ebea58c0a14ddb2058bf103a9e6 /lsp/zk.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-a4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9.tar
nvim-lspconfig-a4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9.tar.gz
nvim-lspconfig-a4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9.tar.bz2
nvim-lspconfig-a4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9.tar.lz
nvim-lspconfig-a4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9.tar.xz
nvim-lspconfig-a4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9.tar.zst
nvim-lspconfig-a4cf5c9d9c2490f3f31ac84b1170f6a2944e7ce9.zip
fix(zk): update config to 0.11+
- Remove buf.execute_command in favor of :exec_cmd - Set title on :exec_cmd
Diffstat (limited to 'lsp/zk.lua')
-rw-r--r--lsp/zk.lua9
1 files changed, 7 insertions, 2 deletions
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),