Avimitin / nvim

Handy, maintainable, multi-languages supported neovim configuration.
Apache License 2.0
271 stars 48 forks source link

Strange/incorrect snippet autocomplete #56

Closed towry closed 1 year ago

towry commented 1 year ago

This is a bit annoying, for example:

截屏2022-11-29 23 26 34

This is useless and incorrect, sometimes it will shows autocomplete like try { , and i accidentally trigger it and a bunch code like

try {
} catch (err) {
}

generated.

截屏2022-11-29 23 34 16

In the above case, if I press tab key to indent, it will trigger the completion unintended.

Avimitin commented 1 year ago

Your issue came from this snippets https://github.com/rafamadriz/friendly-snippets/blob/main/snippets/javascript/javascript.json#L653-L656. I met some annoying snippet in Rust too. Maybe I should consider removing those snippets from https://github.com/rafamadriz/friendly-snippets and only use user-defined ver. Let me think about it.

Avimitin commented 1 year ago

Removed in https://github.com/Avimitin/nvim/commit/8feb2ea58331c33aa83e2088490a9350b95f3f8e. Since this commit, every snippet needs to be hand written by user.