zk
zk copied to clipboard
LSP server is matching links inside fenced code blocks
Originally posted by @daephx in https://github.com/mickael-menu/zk/issues/22#issuecomment-1107476645
I don't know if this was mentioned but I didn't see any other relevant issues. It appears the LSP attempts to check wikilink syntax within code blocks. Which is probably a rare issue but still doesn't strike me as appropriate behavior. I only noticed this due to the multi-line string syntax Lua uses.
@mickael-menu are you using Vim/Neovim?
Could you please post your LSP config to enable zk inside it?
Best regards
My config is very basic. I'm using zk-nvim
with:
require("zk").setup({
picker = "telescope",
lsp = {
-- `config` is passed to `vim.lsp.start_client(config)`
config = {
cmd = {'zk', 'lsp', '--log', '/tmp/zk-lsp.log'},
name = "zk",
},
-- automatically attach buffers in a zk notebook that match the given filetypes
auto_attach = {
enabled = true,
filetypes = { "markdown" },
},
},
})
And ftplugin
to add the mappings, as described here: https://github.com/mickael-menu/zk-nvim#example-mappings The sample ~/.config/nvim/ftplugin/markdown.lua
is mine.
Confirmed this is still happening, could potentially be looked at together with #250
Work for this is in progress by @Rahlir as mentioned here in the same issue but over on zk-nvim