Better float window support for v0.0.80 #2472
Replies: 38 comments
-
Oh, I only noticed that now. I've recently merged a pull to have insert mode scroll in nvim, if this covers that then please just remove the old one. I'll try this new one now. |
Beta Was this translation helpful? Give feedback.
-
When trying to scroll as suggested I'm getting lots of inoremap <silent><expr> <c-j> coc#float#has_scroll() ? coc#float#scroll(1) : "\<c-j>"
inoremap <silent><expr> <c-k> coc#float#has_scroll() ? coc#float#scroll(0) : "\<c-k>"
vnoremap <silent><expr> <c-j> coc#float#has_scroll() ? coc#float#scroll(1) : "\<c-j>"
vnoremap <silent><expr> <c-k> coc#float#has_scroll() ? coc#float#scroll(0) : "\<c-k>"
|
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
I've made some fixes for
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Sorry, closed it by mistake.
I want to reword that, I see that release branch was updated, so now all these issues are happening on release branch too. The last working release commit is 9ba22e4. |
Beta Was this translation helpful? Give feedback.
-
May I know how I can have consistent Ctrl-j/k or S-/Tab mappings for both floating windows (e.g. actions) and pop-ups? |
Beta Was this translation helpful? Give feedback.
-
@Frederick888 please ask on gitter as it may derail the topic. |
Beta Was this translation helpful? Give feedback.
-
Configuration for action menu not available yet, it's recommended to just type number. |
Beta Was this translation helpful? Give feedback.
-
@oblitum I can't reproduce any of your issue on neovim 0.4.4 and neovim 0.4.3, please open new issue with minimal vimrc. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this is related but the completions now don't clean up themselves properly from time to time when using split windows. I can open a new issue if needed. |
Beta Was this translation helpful? Give feedback.
-
@Frederick888 it could happen when you're not using neovim 0.5.0 and the float window is not closed by coc.nvim, please provide vim version with minimal vimrc. |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
@chemzqm Actually I just installed neovim v0.5.0 and I still have this problem using the minimal vimrc from bug report template:
|
Beta Was this translation helpful? Give feedback.
-
@Frederick888 I can't reproduce. |
Beta Was this translation helpful? Give feedback.
-
@chemzqm it's |
Beta Was this translation helpful? Give feedback.
-
@chemzqm With latest release branch and neovim 0.5.0, I can still see those completion window leftovers using my vimrc but not the minimal one. But to properly test this I should probably check out AutoKey etc (it's stopped working under Arch atm...). But now I see something similar to #2491 almost every time (not using split windows this time): |
Beta Was this translation helpful? Give feedback.
-
After last commits it seems |
Beta Was this translation helpful? Give feedback.
-
Must comment that names are not consistent. While you have |
Beta Was this translation helpful? Give feedback.
-
I've been using it for the last few days and although sometimes it needs a bit patience, the artifacts can be eventually cleaned up. My last comment mentioned that 'can still see those completion window leftovers using my vimrc' but I guess it's simply because I didn't give it enough time. Thanks for the good work. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I can't reproduce, try minimal vimRc. |
Beta Was this translation helpful? Give feedback.
-
Oh, it turns out this only happens when I have tmsvg/pear-tree enabled. 🤦♂️ |
Beta Was this translation helpful? Give feedback.
-
Update: input prompt work on vim as well. |
Beta Was this translation helpful? Give feedback.
-
I used to |
Beta Was this translation helpful? Give feedback.
-
coc.preferences.promptInput |
Beta Was this translation helpful? Give feedback.
-
Update: |
Beta Was this translation helpful? Give feedback.
-
Update: add notifications support, not on release branch yet. |
Beta Was this translation helpful? Give feedback.
-
Add window.withProgress({title: 'Downloading', cancellable: true}, (progress, token) => {
let n = 0
return new Promise(resolve => {
let interval = setInterval(() => {
progress.report({message: 'progress', increment: 1})
n = n + 1
if (n == 100) {
clearInterval(interval)
resolve('done')
}
}, 100)
token.onCancellationRequested(() => {
clearInterval(interval)
resolve()
})
})
}).then(res => {
console.log(res)
}) |
Beta Was this translation helpful? Give feedback.
-
I feel pretty strongly that the changes made for handling the Firstly from a UX perspective, it's not clear at all how you use this. After digging around and asking a bit it also seems that the recommended way for nvim to use this is to use your mouse to select an option. I purposefully don't have I think that without having an easy built-in way to select an option here without your mouse is actually a large regression for a Vim user, not an enhancement. Please consider adding an option to either turn this off or provide a simple way for users to select an option that is as easy as it was before. |
Beta Was this translation helpful? Give feedback.
-
We've done some work with float window/popup support recently, but there're still more work remains.
New dialog features works on neovim >= 0.4.0 or vim >= 8.2.750
Border and title on both vim and neovim, like new action menu:
Type number to select or use
j
k
G
to navigate and<CR>
for confirm, use<esc>
to cancel.New input prompt avoid the need to move your eyes.
You can use keys including
<c-u>
<c-e>
<c-a>
, it's using normal buffer on neovim and terminal buffer on vim, so the experience could be a bit differrent.Functions for scroll float window and popups, checkout
:h coc#float#has_scroll()
, new functions have improved for:Configuration
signature.floatMaxWidth
changed tosignature.maxWindowWidth
with detault 80.Create diaglog support:
Use vim's api like:
call coc#float#create_dialog(['你好', 'vim'], #{close: 0, title: 'hello world', buttons: ['yes', 'no']})
Or use
window.showDiaglog(config)
Buttons accept mouse click on neovim only, vim users have to type specific keys.
Notifications:
Progress notification:
Plans:
strdisplaywidth
Some internal APis would be changed and you'll probably have something wired, give us feedback.
Beta Was this translation helpful? Give feedback.
All reactions