Thicket thicket
cambridge
REPOS 4

Projects covers Forester, Merry, xdge and ocaml-crockford.

W39.2026 · 21–27 Sep / Issue

Link completion triggers on single-left-bracket

tangled · jonmsterling.com/ocaml-forester · did:plc:jjiv56ot7d6sgethto3jr3r5

It should only trigger on [[ or ](.

Comments

did:plc:4gj3ihsdh6fn3aqq5bdnw5w3

https://tangled.org/jonmsterling.com/ocaml-forester/commit/8cddff1d90417099084796ca9deb63278a68d120


did:plc:jjiv56ot7d6sgethto3jr3r5

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')

did:plc:4gj3ihsdh6fn3aqq5bdnw5w3

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


did:plc:jjiv56ot7d6sgethto3jr3r5

thanks and no worries! it is not an emergency :-)


did:plc:4gj3ihsdh6fn3aqq5bdnw5w3

Fixed?

https://tangled.org/jonmsterling.com/ocaml-forester/commit/bc5284424aea45c4dc9060c1699e1a07dc74a89b