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

bug: signature_help error #435

Closed
3 tasks done
Fau818 opened this issue Apr 18, 2023 · 6 comments · Fixed by #436 or #639
Closed
3 tasks done

bug: signature_help error #435

Fau818 opened this issue Apr 18, 2023 · 6 comments · Fixed by #436 or #639
Labels
bug Something isn't working

Comments

@Fau818
Copy link

Fau818 commented Apr 18, 2023

Did you check docs and existing issues?

  • I have read all the noice.nvim docs
  • I have searched the existing issues of noice.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.0 Release

Operating system/version

MacOS 13.3.1

Describe the bug

In some cases, the latest version of Noice will give an error when showing the signature help.

The error message is shown below.

...l/share/nvim/lazy/noice.nvim/lua/noice/lsp/signature.lua:221: attempt to concatenate field 'label' (a table value)

Here is a video to show this issue. And there is no problem with this commit at 1da4edf.

noice.signature.bug.mov

Steps To Reproduce

...

Expected Behavior

...

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
  "folke/tokyonight.nvim",
  "folke/noice.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@Fau818 Fau818 added the bug Something isn't working label Apr 18, 2023
@folke folke closed this as completed in 9d778e7 Apr 18, 2023
@folke
Copy link
Owner

folke commented Apr 18, 2023

Should be fixed now. Would be great if you could confirm. Thanks!

@Fau818
Copy link
Author

Fau818 commented Apr 18, 2023

@folke Unfortunately, I just tested it, and now the error is on line 223.

@folke
Copy link
Owner

folke commented Apr 18, 2023

Can you give me some example code?

@Fau818
Copy link
Author

Fau818 commented Apr 18, 2023

Can you give me some example code?

It seems that the error occurs because the label field is a table.

Here is an example in python.

import torch

torch.hub.load()

@folke
Copy link
Owner

folke commented Apr 18, 2023

test again

@Fau818
Copy link
Author

Fau818 commented Apr 18, 2023

test again

Okay, it's working great now!

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