segfaults when calling setup
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.
- 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?
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
That's not a segfault, that's just a panic (which I'm aware of).
Yup, I figured you would.