zk icon indicating copy to clipboard operation
zk copied to clipboard

LSP server is matching links inside fenced code blocks

Open mickael-menu opened this issue 2 years ago • 3 comments

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.

image

mickael-menu avatar Apr 23 '22 15:04 mickael-menu

@mickael-menu are you using Vim/Neovim?

Could you please post your LSP config to enable zk inside it?

Best regards

pidgeon777 avatar May 21 '22 12:05 pidgeon777

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.

mickael-menu avatar May 21 '22 12:05 mickael-menu

Confirmed this is still happening, could potentially be looked at together with #250

tjex avatar Jan 11 '24 20:01 tjex

Work for this is in progress by @Rahlir as mentioned here in the same issue but over on zk-nvim

tjex avatar Apr 01 '24 00:04 tjex