Link completion triggers on single-left-bracket #37

Closed kento.tngl.sh
Closed opened by kento.tngl.sh

It should only trigger on [[ or ](.

Huh, Tangled swallowed my comment, but long story short I can still reproduce this issue. Here's a neovim configuration to try it with:

vim.pack.add {
  { src = 'https://github.com/neovim/nvim-lspconfig' },
  { src = 'https://github.com/saghen/blink.cmp', checkout = 'v1.*' },
}

vim.diagnostic.config { virtual_text = true }

vim.opt.linebreak = true
vim.opt.breakindent = true
vim.opt.expandtab = true
vim.opt.tabstop = 2
vim.opt.shiftwidth = 2
vim.opt.softtabstop = 2

vim.keymap.set({'n', 'v'}, 'j', 'gj')
vim.keymap.set({'n', 'v'}, 'k', 'gk')

vim.filetype.add { extension = { tree = 'forester' } }

vim.lsp.config('forester', {
  cmd = { 'forester', 'lsp' },
  filetypes = { 'forester' },
  root_markers = { 'forest.toml' },
})

require('blink.cmp').setup {
  keymap = { preset = 'default' },
  completion = {
    trigger = { show_on_keyword = false, show_on_trigger_character = true },
    documentation = { auto_show = true },
  },
  sources = { default = { 'lsp', 'path', 'snippets' } },
  fuzzy = { implementation = 'lua' },
}

vim.lsp.enable('forester')

I have a fix, but I am a bit unsatisfied with the implementation. Will get back to it later today.

thanks and no worries! it is not an emergency 😃

Sign up or Sign in to add to the discussion.