Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Custom completion menu (#3862)
* feat(completion): use custom pum * fix(health): fix checked version * fix(events): fix pumvisible could be wrong * fix(snippets): close pum by coc#pum#close() * fix(completion): fix detail window not closed * fix(plugin): add default key-mappings for completion * fix(dialog): scroll current line into view * fix(completion): avoid unexpected broken completion * fix(completion): fix bad detail window position with border * pref(completion): delay resolve on pum shown * fix(pum): fix possible bad height * feat(plugin): add default mappings for <up> and <down> * fix(pum): fix bad position on neovim, increase timer * fix(dialog): fix bad cursor position on vim8 * fix(highlight): give search higher priority * feat(float): support for cursor index * fix(pum): adjust width of pum not position * chore(doc): improve coc-complete * fix(float): fix scroll winid could be wrong * fix(completion): synchronzie content after completion * feat(float): add rounded support for floatConfig * chore(util): change api version * feat(completion): configuration suggest.ambiguousIsNarrow * fix(pum): fix wrong col * fix(dialog): use coc#string#content_height for content height * refactor(completion): get variables on doComplete Avoid use CursorHold which may not work * fix(completion): fix selection not work as expected * fix(document): use insert property from cursor * fix(completion): avoid unnecessary resolve * fix(float): fix popup options on old vim * fix(completion): not save prefix when not starts of word * fix(completion): not cancel when input not changed * fix(pum): fix bad firstline on vim - lastline may not exists with popup_getpos. - consider minimal first line of pum. * fix(completion): show pum after snippet synchronize * fix(pum): fix possible bad firstline * refactor(completion): not persist recent selected items * feat(completion): select word around as fallback * refactor(plugin): remove unused <Plug>CocRefresh * fix(completion): not select around item as fallback Possible bad selection * refactor(float): use s:get_borderhighlight() * feat(float): support change float highlight * fix(completion): avoid unexpected completion stop * refactor(snippets): not check pumvisible on synchronize * fix(document): fix cursor undefined * feat(completion): add coc#pum#info() & coc#pum#select() Check realtime pum dimension instead of transport values. * chore(tests): fix failure tests * chore(doc): simplified README * feat(completion): create pum on insert mode only * fix(pum): create pum as fixed direction * refactor(completion): move resolve logic to floating * feat(completion): indent after completion when necessary * feat(pum): support scroll pum by <PageUp> and <PageDown> * feat(completion): add virtual_text support * feat(pum): add coc#pum#insert * chore(doc): doc of functions * fix(pum) use win col for virt_text * chore(doc): add coc-locations * chore(doc): fix example and version * chore(plugin): remove unused <Plug>CocRefresh * refactor(float): improve default options * chore(types): fix lint issue * fix(completion): avoid add mru item on cancel * feat(pum): support index to be -1 * feat(pum): support suggest.noselect * refactor(plugin): use ts highlights for CocSymbol * feat(plugin): make CocSymbol highlights foreground color only * feat(completion): support suggest.enablePreselect * refactor(completion): not add shortcut to menu Remove suggest.disableMenuShortcut * feat(completion): support suggest.formatItems * feat(completion): fill minimal width * refactor(completion): avoid change word of complete item * refactor(completion): improve check for filter * fix(test): fix workspaceFolder test * fix(pum): use `in` to check if property exists (#3895) * fix(pum): fix pum col when exceeded * feat(pum): make redo work after confirm completion * fix(source-language): fix undefined filetype * fix(snippets): check undefined value * feat(pum): support repeat by complete() Works on nvim 0.4.0 * feat(pum): add warning for obsolete key-mappings * refactor(completion): avoid check filtered sources Co-authored-by: wongxy <xiyao.wong@foxmail.com> Closes #3480 Closes #3568
- Loading branch information