Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual triggered 'ALEComplete' overwrites user's 'completeopt' setting permanently. #2326

Closed
bluz71 opened this issue Mar 3, 2019 · 2 comments
Labels

Comments

@bluz71
Copy link

bluz71 commented Mar 3, 2019

Hello ALE team,

I have started using ALE completion via LSP servers, tsserver and solargraph, but only by manual triggering via the following settings:

let g:ale_completion_enabled = 0
imap <C-Space> <Plug>(ale_complete)

In this case Control-Space will trigger an LSP completion. At the same time I set my own completeopt to just menu.

Triggering :ALEComplete via Control-Space will successfully complete (nice), but at the same time it will overwrite completeopt to menu,menuone,noselect,noinsert even once the completion has finished (not nice).

As with live completion, I believe manual triggered completion should not permanently overwrite a user's personal completeopt setting. That ALEComplete-modified completeopt then changes my preferred completion behaviour for standard Control-n / Control-p keyword completion.

When doing manual triggered LSP completion I don't see why menu,menuone,noselect,noinsert is needed at all. For live completion, yes absolutely, but for manual triggering via :ALEComplete maybe don't overwrite completeopt at all?

If that proves too difficult, then :ALEComplete function should record a user's completeopt setting, change it to menu,menuone,noselect,noinsert temporarily, do the LSP completion, then restore the user's original completeopt setting

Thanks for an excellent plugin.

@w0rp w0rp added the bug label Mar 3, 2019
@w0rp w0rp closed this as completed in 413529f Mar 8, 2019
@w0rp
Copy link
Member

w0rp commented Mar 8, 2019

Now manual completion doesn't change the setting.

@bluz71
Copy link
Author

bluz71 commented Mar 9, 2019

Just updated. Yes, the issue is now fixed.

Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants