hrsh7th / nvim-compe

Auto completion Lua plugin for nvim
MIT License
1.28k stars 54 forks source link

Questions regarding LuaSnip source #454

Closed gegoune closed 3 years ago

gegoune commented 3 years ago

Hey, I have noticed that LuaSnip has pretty different representation on completion menu.

Screenshot 2021-07-08 at 00 00 09

1) I have noticed that vsnip has menu set to[Vsnip], snippets.nvim sets [Snippets] (presumably due to its name), Ultisnips sets [Ultisnips] but luasnip has very different [Snippets]. I know it's very easy to change it in user's configuration but perhaps it should be kept analogical between sources. Would you accept PR changing it to [LuaSnip]?

2) kind is set to filetype (or all perhaps, but I don't have those snippets enabled so am not sure), while vsnip does not set it at all, bot ultisnip and snippets.nvim set it to Snippet. What was the reasoning behind having filetype in there?

3) And finally, I would really like to render luasnip's snippets in documentation window. Could that perhaps be configurable if it's not widely desired?

CC @L3MON4D3

hrsh7th commented 3 years ago

I have noticed that vsnip has menu set to[Vsnip], snippets.nvim sets [Snippets] (presumably due to its name), Ultisnips sets [Ultisnips] but luasnip has very different [Snippets]. I know it's very easy to change it in user's configuration but perhaps it should be kept analogical between sources. Would you accept PR changing it to [LuaSnip]?

I agree with you. PR welcome!

kind is set to filetype (or all perhaps, but I don't have those snippets enabled so am not sure), while vsnip does not set it at all, bot ultisnip and snippets.nvim set it to Snippet. What was the reasoning behind having filetype in there?

I guess it can be used to determine the snippet item came from global or filetype.

And finally, I would really like to render luasnip's snippets in documentation window. Could that perhaps be configurable if it's not widely desired?

It maybe possible if LuaSnip has API for it.

L3MON4D3 commented 3 years ago

And finally, I would really like to render luasnip's snippets in documentation window. Could that perhaps be configurable if it's not widely desired?

It maybe possible if LuaSnip has API for it.

I'll look into that, may take a while though.

hrsh7th commented 3 years ago

Oh. Issue was automatically closed.

santos-gabriel-dario commented 3 years ago

Any news or temporary fix for this issue?

L3MON4D3 commented 3 years ago

I haven't yet had time to look into it :/ (I assume you're referring to the "rendering" of snippets)

santos-gabriel-dario commented 3 years ago

Well, in reality I was asking about the nvim-compe/LuaSnip "kind". Because, as it was pointed out before, it appears to be referencing the filetype and not some text like "Snippet". I wanted to know if there is any way to change/fix it, because I've already tried through the nvim-compe config but couldn't do it.

L3MON4D3 commented 3 years ago

Not sure if that should be the default(@hrsh7th ??), but it's a one-line change I think, look into the luasnip-source if you want to quickly change it locally.

santos-gabriel-dario commented 3 years ago

Should I make a PR, would it be useful?

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.