-
Notifications
You must be signed in to change notification settings - Fork 78
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
virtual text support #241
virtual text support #241
Conversation
43eefea
to
f99547e
Compare
I think this is ready to go. Been using it today in my development and it's looking good so far |
Works very well for me, thanks a lot! I hope this gets merged |
- Add manual setting which disables automatic submission of completion request - Implement cancel of in-flight request in clear function
Rebased on latest main |
@dimfeld I use your fork at my config and have tab use hotkey for apply suggestion. But it is conflict with tab indent and I have next error, then I want to add tab indent where is no suggestion from codeium:
|
Could you give more details please? Also that error seems to be coming from If you just mean that you don't want Tab to be the accept keybinding, check the README on how to change it. The feature to insert a Tab when no completion is showing seems to be working fine for me. |
This generates a "completion request failed” notification on every keystroke when using the plugin in conjunction with, for example, oil.nvim inside the oil buffer. I need to return early in M.complete to make this usable when the detected filetype is “oil”. It would be helpful to have a config option to specify the filetypes to be ignored. |
This indicates special buffers created by some plugins like oil.nvim, and the LS will return an error.
@zenofile Thanks for the report! I installed oil.nvim and was able to reproduce this, so I made 2 changes:
|
Thank you for the quick fix, that works nicely. However, I think the README.md misses brackets for assigning values to the filetype keys: require('codeium.virtual_text').setup({
virtual_text = {
filetypes = {
"python" = true,
"markdown" = false
},
default_filetype_enabled = true
}
}) |
So happy to see this feature! Thanks for the great work @dimfeld. 🙏 I think there has been a regression in a recent commit. Pressing in insert mode doesn't return me to normal mode. Setting Minimal conf to reproduce:
|
@yatinlala which key was affected that doesn’t go back into normal mode? I think GitHub maybe stripped out whatever you wrote there. Esc works fine for me, is there another key you would expect to do that? |
Seems like it got stripped — Esc doesn't work for me. I can try and bisect tomorrow to the problem commit. |
Ok I do see the same issue with that bare config, just not with the one I normally use. Interesting... I'll look into it. Thanks! |
Ok should be fixed now. Turns out that |
Yeah I think it's all ready to go! So I'm only seeing that extra line in cases where it looks like the Codeium completion is actually trying to insert a newline for formatting purposes. For example here an extra newline makes sense, and when I accept the completion it adds it. But then if I already have appropriate whitespace then it doesn't, like here: So I think this is actually coming from Codeium itself. That said, I can try to add something to strip out leading newlines if you think that's not desirable. |
If that's the case then all good. |
Tested on windows but got an error. I think its because this branch doesnt include the fixes in #248 . Ill approve and when I merge in should be sorted out. |
This is a port of the virtual text support from codeium.vim.
To enable it, pass
virtual_text = { enabled = true }
in your setup arguments to the plugin. The README has more details.Closes #14