mireq / luasnip-snippets

Vim-snippets (snipMate & UltiSnip Snippets) converted to native luasnip snippets
60 stars 2 forks source link

Broken Go snippets #7

Open mawkler opened 1 month ago

mawkler commented 1 month ago

Hi! Thanks for making this plugin!

I'm having issues with some Go snippets. In particular the func and if.

func:

func name(params)typetype {

}

Note that type appears twice, but only the second one is an insert node. The first type changes to whatever I insert into the second one.

if:

if conditioncondition{

}

Similarly to func, if also has the condition repeated. The first condition is an insert node, and the second condition changes to whatever I insert into the first one.

mawkler commented 1 month ago

Also, the meth Go snippet doesn't even expand for some reason

mireq commented 4 days ago

@mawkler please test it with minimal configuration (or with cmp) from this sample directory - sample_configs

If it works, then problem is somewhere in configuration, maybe some conflict with other plugin. Try to make minimal config to reproduce that bug.

mawkler commented 2 days ago

@mireq I get the exact same behaviour when using both your minimal configs cmp_lazy.lua and minimal_lazy.lua in a Go file

mireq commented 2 days ago

@mawkler if you can try it on empty user profile without ~/.config/nvim directory and ~/.local/share/nvim. If problem persists, please check nvim and nvim python bridge version. I will try to reproduce bug with same version.

mawkler commented 2 days ago

@mireq

try it on empty user profile

Could you please elaborate on what you mean by this? I ran nvim -u path/to/your/config, is there anything else that I need to do?