Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

segfaults when calling setup #19

Open
MurdeRM3L0DY opened this issue Sep 4, 2022 · 4 comments
Open

segfaults when calling setup #19

MurdeRM3L0DY opened this issue Sep 4, 2022 · 4 comments

Comments

@MurdeRM3L0DY
Copy link
Contributor

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
Copy link
Owner

noib3 commented Sep 4, 2022

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

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
Copy link
Contributor Author

MurdeRM3L0DY commented Sep 4, 2022

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

@noib3
Copy link
Owner

noib3 commented Sep 5, 2022

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

@MurdeRM3L0DY
Copy link
Contributor Author

Yup, I figured you would.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants