neogen icon indicating copy to clipboard operation
neogen copied to clipboard

Luasnip breaks indentation annotation in python

Open sirutBuasai opened this issue 1 year ago • 2 comments

When specifying snippet_engine = "luasnip", the annotation is not indented. I have not tested this in other languages but is currently broken in python.

With snippet_engine = "luasnip" Screen Shot 2022-09-13 at 21 16 21

With snippet_engine = nil Screen Shot 2022-09-13 at 21 16 45

sirutBuasai avatar Sep 14 '22 01:09 sirutBuasai

Can confirm the same for JavaScript.

h0adp0re avatar Sep 14 '22 23:09 h0adp0re

I'm encountering the same issue as Sirut in Python.

ghost avatar Sep 16 '22 17:09 ghost

Hello everyone, i had to get a loong time of because of moving out and starting a new work. I will look into the issue very soon, and i will write a message if I need more user input ❤️

danymat avatar Sep 19 '22 21:09 danymat

Concerning your issue, it seems that luasnip did some breaking change. WIll look closely

danymat avatar Sep 19 '22 22:09 danymat

I also hit this issue. This is my config

n.setup {
  snippet_engine = 'luasnip',
  languages = {
    python = {
      template = {
        annotation_convention = 'numpydoc', -- for a full list of annotation_conventions, see supported-languages below,
      },
    },
  },
}

yriveiro avatar Sep 20 '22 20:09 yriveiro

Hi! found got the same issue with files using LuaSnip.

Took the liberty of finding which LuaSnip commit introduced the issue: c4f7e797376c8e3ab6f848bd6bc5d33019fea5e1

Hope this helps!

Elkiders99 avatar Sep 22 '22 05:09 Elkiders99

Opened #110 to fix this!

Elkiders99 avatar Sep 22 '22 05:09 Elkiders99

Hello, the fix was provided and is now on main, thanks @Elkiders99 ! You can all update the app, or put a "2.8.1" tag to your plugin manager.

danymat avatar Sep 22 '22 08:09 danymat