-
Notifications
You must be signed in to change notification settings - Fork 377
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
Char before inserted completion is deleted, if line is indented by tabs #352
Comments
I don't met this problem with The golang is always uses the |
I've now tried with python ( Also the problem doesn't occur, if i use Is there any additional debug information I could provide? |
I found this issue on both tsserver and gopls. Though I doesn't seem to be consistent? Most of the time it happens when I type some characters and then confirm the first suggestion. I've attached a screencast to better explain it. simplescreenrecorder-2021-11-01_21.12.27.mp4edit: apparently it only happens when native_menu is being used, using cmp custom popup implementation fixed it |
@elianiva Thank you for your information. It's very helpful and I could reproduce. In the first place, I feel that the native menu of nvim-cmp is not working properly. I will fix it... |
I'm sorry. The native menu just didn't work because the main branch was buggy a while ago. I will re-test it. |
Oh... after updating gopls, I'd reproduce it too. |
Can confirm, my issue is still present with the current commit. |
I am having this same issue with gopls as well. |
@dolenam317 Could you provide the reproduction steps and minimal configuration? |
This issue is still present with the current main branch, why was it closed? |
Please see this. |
I think the config can be more reduced. |
It looks like the problem has gone away with the update to neovim 0.7 |
When completing from the
nvim-lsp
source (using Scala Metals language server), one char before the inserted completion is deleted, e.g. the dot before a method or a parenthesis in front of the completed word.After long config bisecting, I found that this curiously only happens, if the line is indented by tabs, not if it is indented by spaces.
Here is a recording of the behaviour (showing the difference between space and tab indents):
https://asciinema.org/a/RvlyJNxrJ9R8oQU1XT4kvfNmk
The full configuration used (https://gist.github.com/crater2150/256d81bf766144e4158176e632bb8ac8, mostly from Readme + Metals config):
I'm not sure if this is specific to the metals language server, as I don't use any others currently. I may be able to try out something else tomorrow evening.
The small Scala example used in the recording can be found at https://github.com/crater2150/nvim-cmp-bug-demo
The text was updated successfully, but these errors were encountered: