Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when triggering <Ctrl-X><Ctrl-O> completion #265

Closed
mhanberg opened this issue Dec 14, 2022 · 1 comment · Fixed by #278 or #639
Closed

Error when triggering <Ctrl-X><Ctrl-O> completion #265

mhanberg opened this issue Dec 14, 2022 · 1 comment · Fixed by #278 or #639
Labels
bug Something isn't working

Comments

@mhanberg
Copy link

mhanberg commented Dec 14, 2022

Describe the bug

When i hit control-x-o to trigger some completions (from LSP), I get a nvim-cmp popup that has no text in it and an error. The completions are still in the popup if i move through them with ctrl-n or ctrl-p, but you can't read what they say.

Which version of Neovim are you using?

NVIM v0.9.0-dev-505+ga6b05cb75
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/Users/runner/work/neovim/neovim/build/cmake.config -I/Users/runner/work/neovim/neovim/src -I/Users/runner/work/neovim/neovim/.deps/usr/include -I/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include -I/Library/Frameworks/Mono.framework/Headers -I/Users/runner/work/neovim/neovim/build/src/nvim/auto -I/Users/runner/work/neovim/neovim/build/include
Compiled by runner@Mac-1670907924705.local

Features: +acl +iconv +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/share/nvim"

Run :checkhealth for more info

To Reproduce
Steps to reproduce the behavior:
omnifunc is set to vim.lsp.omnifunc

  1. Trigger completion with ctrl-x-o

Expected Behavior
it works

Screenshots
image

Noice Log

Noice log
Tue Dec 13 20:16:07 2022
An error happened while handling a ui event
...im/site/pack/packer/start/nui.nvim/lua/nui/tree/init.lua:456: String cannot contain newlines

stack traceback:
[C]: in function 'pcall'
...ite/pack/packer/start/noice.nvim/lua/noice/util/call.lua:144: in function <...ite/pack/packer/start/noice.nvim/lua/noice/util/call.lua:143>
[C]: in function 'nvim_buf_set_lines'
...im/site/pack/packer/start/nui.nvim/lua/nui/tree/init.lua:456: in function 'render'
...im/site/pack/packer/start/nui.nvim/lua/nui/menu/init.lua:336: in function 'mount'
...k/packer/start/noice.nvim/lua/noice/ui/popupmenu/nui.lua:209: in function 'create'
...k/packer/start/noice.nvim/lua/noice/ui/popupmenu/nui.lua:192: in function 'show'
...k/packer/start/noice.nvim/lua/noice/ui/popupmenu/nui.lua:224: in function 'on_show'
.../packer/start/noice.nvim/lua/noice/ui/popupmenu/init.lua:75: in function 'handler'
.../site/pack/packer/start/noice.nvim/lua/noice/ui/init.lua:158: in function <.../site/pack/packer/start/noice.nvim/lua/noice/ui/init.lua:157>
[C]: in function 'xpcall'
...ite/pack/packer/start/noice.nvim/lua/noice/util/call.lua:149: in function 'safe_handle'
.../site/pack/packer/start/noice.nvim/lua/noice/ui/init.lua:87: in function <.../site/pack/packer/start/noice.nvim/lua/noice/ui/init.lua:73>
[C]: in function 'complete'
...stalls/neovim/nightly/share/nvim/runtime/lua/vim/lsp.lua:2152: in function 'handler'
...stalls/neovim/nightly/share/nvim/runtime/lua/vim/lsp.lua:1391: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>

noice config
require("noice").setup {
  cmdline = {
    enabled = true, -- disable if you use native command line UI
    view = "cmdline_popup", -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
    opts = { buf_options = { filetype = "vim" } }, -- enable syntax highlighting in the cmdline
    icons = {
      ["/"] = { icon = " " },
      ["?"] = { icon = " " },
      [":"] = { icon = ":", firstc = false },
    },
  },
  messages = {
    backend = "mini",
  },
  notify = {
    backend = "mini",
  },
  lsp = {
    message = {
      view = "mini",
    },
  },
  views = {
    cmdline_popup = {
      position = {
        row = 1,
        col = "50%",
      },
    },
  },
  routes = {
    {
      filter = {
        event = "msg_show",
        kind = "search_count",
      },
      opts = { skip = true },
    },
    {
      filter = {
        event = "msg_show",
        kind = "",
        find = "written",
      },
      opts = { skip = true },
    },
    {
      filter = { find = "Scanning" },
      opts = { skip = true },
    },
  },
}
@mhanberg mhanberg added the bug Something isn't working label Dec 14, 2022
@folke folke closed this as completed in 5199089 Dec 30, 2022
@folke
Copy link
Owner

folke commented Dec 30, 2022

I could not reproduce this, but probably did fix it. Let me know if the problem would still exist. If so, please provide a minimal.lua. see the wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants