nvim-config

Log | Files | Refs | Submodules | README

commit 9a261d1701eb05b0e35a93174128b482e62d7e4b
parent 10cfb9c49d88b12f715e3e4556d4c970c482102b
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date:   Mon, 28 Mar 2022 17:53:42 +0200

feat: add zk support to markdown

Diffstat:
Mlua/completree-config.lua | 2++
Mlua/lsp_config.lua | 17+++++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/lua/completree-config.lua b/lua/completree-config.lua @@ -33,6 +33,8 @@ local function md_complete(...) local fullpath = vim.fn.expand "%:p" if vim.fn.executable'zest' == 1 and #(vim.fn.system{ 'zest', 'search', string.format('file:%s', fullpath)}) ~= 0 then cc.wrap(zest_complete)(...) + elseif vim.fn.executable "zk" == 1 and vim.startswith(fullpath, vim.fn.expand("$ZK_NOTEBOOK_DIR")) then + cc.pipeline(s.lsp_matches {}, ccomp.debug, ccomp.fzy)(...) else cdef.ins_completion("C-F")(...) end diff --git a/lua/lsp_config.lua b/lua/lsp_config.lua @@ -229,3 +229,20 @@ for lname,config in pairs(lsps) do end end end + +local special = { + zk = { + on_attach = on_attach, + capabilities = capabilities, + cmd = { "zk", "lsp" }, + filetypes = {'markdown'}, + root_dir = function() + return vim.loop.cwd() + end, + } +} + + +for lname,config in pairs(special) do + lsp[lname].setup(config) +end