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 showing snippets' document with multi-line decriptions in friendly-snippets #91

Closed
ccbhj opened this issue Oct 11, 2024 · 1 comment · Fixed by #92
Closed

Comments

@ccbhj
Copy link
Contributor

ccbhj commented Oct 11, 2024

Some errors show up when selecting snippets items from friendly-snippets:
For example, 'break' in the shell file:
image

error trace:
Debug: ~/.local/share/nvim/lazy/blink.cmp/lua/blink/cmp/sources/lib/init.lua:85 "failed to resolve item with error: ...m/lazy/blink.cmp/lua/blink/cmp/sources/snippets/init.lua:51: attempt to concatenate field 'description' (a table value)"

nvim version: v0.10.0
blink.cmp: commit 526f786

@ccbhj
Copy link
Contributor Author

ccbhj commented Oct 11, 2024

After some investigation, I found the cause: when formating documentation of snippets, we treat the description field of a snippet item as string by default but it could a list of string sometimes(see snippets for shell in friendly-snippets )
image

So I suppose we can join the description if it is a list of string instead of string ?

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

Successfully merging a pull request may close this issue.

1 participant