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

Use <C-X><C-O><C-P> instead of <C-X><C-O> #3205

Closed
hayatogh opened this issue Jun 12, 2020 · 2 comments
Closed

Use <C-X><C-O><C-P> instead of <C-X><C-O> #3205

hayatogh opened this issue Jun 12, 2020 · 2 comments

Comments

@hayatogh
Copy link

Currently, ALE needs completeopt+=noselect,noinsert in users' .vimrc.

If completeopt is default value, first completion is selected. Type <C-P><C-N> to insert first one.
If completeopt is dafault value and omnifunc=ale#completion#OmniFunc, first completion is selected and inserted.

I want to select and insert first completion with <C-P>, <C-X><C-L> and <C-X><C-O> when I manually typed.
And I don't want to select first completion provided by ALE.

inoremap <silent> <Plug>(ale_show_completion_menu) <C-x><C-o><C-p>

solves this problem and looks like it has no degradation whatever completeopt is.

I've tested with this minimal .vimrc. with installed only latest ALE in .vim

filetype plugin indent on
syntax enable
set completeopt=menu,preview
" set completeopt=menu,menuone,preview,noselect,noinsert
let g:ale_linters = {'python': ['pyls']}
let g:ale_completion_enabled = 1
" set omnifunc=ale#completion#OmniFunc

and typed vim test.py

x = "foo"
x.
@w0rp
Copy link
Member

w0rp commented Aug 29, 2020

This is genius. 😄 I have done this now.

@hayatogh
Copy link
Author

Thank you for implementing and this great plugin!

MeTheFlea added a commit to MeTheFlea/ale that referenced this issue Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants