-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Option to select first completion provided by ALE (without inserting) #3433
Comments
I think this is worth doing when you request completion result manually. I added that fix to prevent a selection from being made as you type with automatic completion. We can send a different key sequence to open the completion menu when you manually request completion results, from the one we send when they are shown automatically. |
This patch removes `noselect` from the default `completeopts`. This should no longer be necessary thanks to 25b572b, because the `<C-p>` added to the map will deselect the first entry. Combined with something like this in your `~/.vimrc`: ``` function! RemapAleCompletion() iunmap <Plug>(ale_show_completion_menu) inoremap <silent> <Plug>(ale_show_completion_menu) <C-x><C-o> endfunction augroup remap_ale_completion autocmd! autocmd VimEnter * call RemapAleCompletion() augroup END ``` This can address dense-analysis#3433.
@MeTheFlea i think #3573 might fix this for you? |
This patch removes `noselect` from the default `completeopts`. This should no longer be necessary thanks to 25b572b, because the `<C-p>` added to the map will deselect the first entry. Combined with something like this in your `~/.vimrc`: ``` function! RemapAleCompletion() iunmap <Plug>(ale_show_completion_menu) inoremap <silent> <Plug>(ale_show_completion_menu) <C-x><C-o> endfunction augroup remap_ale_completion autocmd! autocmd VimEnter * call RemapAleCompletion() augroup END ``` This can address dense-analysis#3433.
This patch removes `noselect` from the default `completeopts`. This should no longer be necessary thanks to 25b572b, because the `<C-p>` added to the map will deselect the first entry. Combined with something like this in your `~/.vimrc`: ``` function! RemapAleCompletion() iunmap <Plug>(ale_show_completion_menu) inoremap <silent> <Plug>(ale_show_completion_menu) <C-x><C-o> endfunction augroup remap_ale_completion autocmd! autocmd VimEnter * call RemapAleCompletion() augroup END ``` This can address dense-analysis#3433.
This patch removes `noselect` from the default `completeopts`. This should no longer be necessary thanks to 25b572b, because the `<C-p>` added to the map will deselect the first entry. Combined with something like this in your `~/.vimrc`: ``` function! RemapAleCompletion() iunmap <Plug>(ale_show_completion_menu) inoremap <silent> <Plug>(ale_show_completion_menu) <C-x><C-o> endfunction augroup remap_ale_completion autocmd! autocmd VimEnter * call RemapAleCompletion() augroup END ``` This can address dense-analysis#3433.
@rouge8 @MeTheFlea I've pushed a commit now which only sets |
Thanks! 🎉 |
Is there a way to auto select the first option in the completion menu whenever
:ALEComplete
is used? I haveset completeopt=menu,menuone,preview,noinsert
in my.vimrc
but every time the menu opens I have no entry selected.I saw commit 25b572b fixed an issue with automatically inserting the completion text by forcing the selection away from the first match but after I reverted this commit locally I got exactly the behaviour I wanted (without knowing the full consequences of such a change).
Is there a supported way of getting this same behaviour?
The text was updated successfully, but these errors were encountered: