noib3 / nvim-completion

:zap: An async autocompletion framework for Neovim
MIT License
503 stars 13 forks source link

segfaults when calling setup #19

Open MurdeRM3L0DY opened 2 years ago

MurdeRM3L0DY commented 2 years ago

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.

noib3 commented 2 years ago

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?

MurdeRM3L0DY commented 2 years ago

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:

noib3 commented 2 years ago

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

MurdeRM3L0DY commented 2 years ago

Yup, I figured you would.