Oni: Autocompletions carry over after pressing space

Created on 25 Jun 2017  路  6Comments  路  Source: onivim/oni

Autocompletions should be reset or refreshed after a user presses space

bug help wanted

All 6 comments

Looks like the same issue as #414 - but not specific to YCM - basically all Vim-style completion is affected. This would be really nice to fix because this feels really broken for some using Vim autocompletion...

It looks like we might need to grab the popupmenu_hide event from Vim and close in that case.

This should be a quick fix, I'm just trying to think if there's any weird cases where neovim says to close completions even though oni itself has completions... I think neovim is smarter than us on completions mostly though, so I'll just throw a few lines into the AutoCompletion Service and test it out to see if it's mostly good

Yep, it looks like at the very least we'd want to hook the popupmenu_hide event around where we pick up the popupmenu_show event. There could definitely be some corner cases since the language-service powered completion gets fired a bit differently from the neovim-powered integration, worth testing around a bit to see if there is any badness. I think the worst case would be the completions would be overwritten by one strategy, if, for example, neovim-completion kicks in after the language service completion.

Alright, at least in my generic testing it should be good to go. We also need to stop showing a completion that is the same as the word, which I'm not sure how to do

Alright, at least in my generic testing it should be good to go.

Awesome! Look forward to picking up this PR.

We also need to stop showing a completion that is the same as the word, which I'm not sure how to do

I can help with this piece. We do this for TypeScript / LSP already - I was thinking that handling popupmenu_hide might handle this, but there might need to be some special handling in Oni's completion layer.

Fixed by #531 .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

timeyyy picture timeyyy  路  3Comments

Canop picture Canop  路  3Comments

IvRRimum picture IvRRimum  路  3Comments

zxiest picture zxiest  路  3Comments

Siilwyn picture Siilwyn  路  3Comments