Skip to content
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

Completion messing up newlines #150

Open
asmodeus812 opened this issue Dec 14, 2021 · 1 comment
Open

Completion messing up newlines #150

asmodeus812 opened this issue Dec 14, 2021 · 1 comment

Comments

@asmodeus812
Copy link

asmodeus812 commented Dec 14, 2021

``I have noticed a very weird problem with company (with LSP). When typing something and i get the autocomplete options in the list but i decide to delete a few characters (using backspace) the entire line delimiter (\n) gets deleted for some reason and the line below the one i am editing. What is odd is this is happening only when deleting the member accessor (e.g . or -> in c/c++). The same issue also happens if you start typing a symbol, the suggestions show up, if you start deleting char by char, the list updates, but the moment you delete the last character, instead of leaving just a blank line, it inserts the top most suggestion in the list of suggestions and again deletes the new line char (\n)

Type some_var;
some_var.<box-of-suggestions-pops>
............... more code below .......................................

// (BACKSPACE) the member delimiter the dot (.) from some_var
// code below is now on the same line as where i was editing
some_type............... more code now on the same line .......................................
symbol_name<box-of-suggestions-pops>
............... more code below .......................................

// (BACKSPACE) until left out with just an s
s<box-of-suggestions-updated>
............... more code below .......................................

// (BACKSPACE) the s character
<suggestion-on-the-top-when-s-was-present-is-inserted> ............... more code now on the same line .......................................
@asmodeus812
Copy link
Author

Seems to be caused by enabling setq company-auto-complete t, to disable this behaviour disable it like that `setq company-auto-complete nil). Pasting this for future reference -https://stackoverflow.com/questions/27008259/emacs-company-mode-inserts-completion-on-space-key-pressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant