nvim-completion icon indicating copy to clipboard operation
nvim-completion copied to clipboard

segfaults when calling setup

Open nxmxsxs opened this issue 3 years ago • 4 comments

Hi. Would you mind sharing what versions of neovim, nvim-oxi and rustc you use to test nvim-completion? I've tried with rustc 1.65.0-nightly/1.63.0, neovim (NVIM v0.8.0-dev-1021-g24fbda04b Build type: Release), nvim-oxi latest master. Could you also share your config options for nvim-completion? Thanks.

nxmxsxs avatar Sep 04 '22 12:09 nxmxsxs

  • rustc: rustc 1.65.0-nightly (e1b28cd2f 2022-08-19);
  • nvim: NVIM v0.7.2;
  • nvim-oxi: latest master, updated in (d6f48b06a448b73135dafbfbc771ce9dd61efead);

Config:

-- config.lua

local completion = require("nvim_completion")

completion.setup({
  sources = {
    lipsum = { enable = function(_buf) return true end },
    lsp = { enable = true },
  },
})

Starting Neovim w/ nvim --clean -u ./config.lua. You need to build a debug version of the plugin for the lipsum source to be available.

Then you need to open a new buffer for the sources to attach to via :e <somefilename>.

Can you share your config? It shouldn't segfault. Does the segfault also happen if you use Neovim 0.7.2 instead of nightly?

noib3 avatar Sep 04 '22 14:09 noib3

Yup, just confirmed it only segfaults with neovim latest master. On nvim 0.7.2, It segfaults with this message thread '<unnamed>' panicked at 'assertion failed: col <= line.len()', completion-core/src/completions/completion_context.rs:134:5 when I try to:

  • enter insert mode with o/O
  • <cr> in insert mode

nxmxsxs avatar Sep 04 '22 16:09 nxmxsxs

That's not a segfault, that's just a panic (which I'm aware of).

noib3 avatar Sep 05 '22 21:09 noib3

Yup, I figured you would.

nxmxsxs avatar Sep 06 '22 09:09 nxmxsxs