-
Notifications
You must be signed in to change notification settings - Fork 370
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
Multiline snippet ghost text with dynamic window position flip #1955
base: main
Are you sure you want to change the base?
Conversation
This is so awesome! I will test it shortly! Can you share how you have set up CMP @xzbdmw . I want to try and avoid making a mistake in the setup on my part. I was using Copilot.lua with the cmp extension for my ghost text |
Hey I think you don’t need to change anything. should work out of box, and there is no extra config option in cmp . this is my keymap, and near cursor(vedio effect, optional) |
please add an option to toggle between multiline and singleline ghost text, not everyone like to have multiline previews. |
@xzbdmw It works really well and swaps every time there is a multiline ghost text! My completion menu does not seem to follow the mouse as much as yours and I am not completely sure about the hiding of the menu when there is a space (but keeping the ghost text). If you want to take a look at my cmp config: https://github.com/michaelbrusegard/dotfiles/blob/25f81267d8f3d9253153b54bf92dd6e757ac089a/macos/.config/nvim/init.lua#L551 Maybe you have some feedback or suggestions, I am very new to neovim btw |
@cybergaz That shoud be easy(I’m waiting for maintainer’s reply) |
Screen.Recording.2024-06-10.at.23.01.39.movThis is how it looks, but the menu doesnt hide on space (while keeping the ghost text) and it doesnt move with the cursor. It may be my config is wrong for all I know |
That’s because copilot suggestion contains space, so it just matches
you can try |
@xzbdmw Thank you, that worked with the cursor. Are there any convenient way to make the keybinds. I feel like when I have the completion complete with return or tab it can be annoying if I actually want to use any of those |
follow up of #1886
fix #1886 (comment)
close #495
should behave the same as vscode now. Custom snippet not supported yet, only lsp snippet and copilot-similar source will trigger multi-line ghost-text, but should be easy to add.
The functionality is all implemented,
@hrsh7th do let me know what do you think, Thanks!
iShot_2024-06-09_07.56.42.mp4