49

By default, Company mode seems to convert every prediction into lower case.

E.g:

  HelloWorldOfGoo
  HelloWorldOfEmacs
  ->
  Hell
  [Helloworldofgoo]  //Company prediction
  [Helloworldofemacs]

This is not very practical for case sensitive programming languages without a special backend. How can I make company mode case sensitive?

Leo Ufimtsev
  • 4,488
  • 3
  • 22
  • 45

1 Answers1

76

After some research, I came across the company mode git hub ticket,

which says that company mode uses dabbrev for plain text as backend.

dabbrev has an option to downcase things, it is turned on by default but can be turned off:

(setq company-dabbrev-downcase nil)

Now all is well.

Leo Ufimtsev
  • 4,488
  • 3
  • 22
  • 45
  • 3
    that only works for the `company-dabbrev` backend... unfortunately I'm seeing the lowercasing problem with the `company-ispell` backend. – fommil Jun 18 '15 at 22:39
  • 13
    This drove me crazy for so long, and since it only happened in some modes, and was only a minor annoyance, I just let it go forever. Finally decided to look into it today. Seems like a weird thing to enable by default, but I am sure there is a reason. – elethan Jul 29 '16 at 20:36
  • 4
    Thanks for this. One google, one solution. What a dumbarse default;) – RichieHH Mar 13 '19 at 08:20
  • Odd thing is that I had its value as `case-replace` and that was `t`, but didn't seem to act like the documentation would lead me to expect. – Matt Savoie Jan 13 '21 at 16:35