I am new to emacs (long-time vim user). Specifically, I am using doom-emacs.
Doom is supposedly set up to use
company-mode for auto completion, but I have not gotten it to work. I have the following source code:
class CompleteUserBankruptcyJob < ApplicationJob queue_as :default def perform(user) CompleteUserBankruptcy.call(user) end end
If I type in
def perfo, I would expect company to suggest
perform. However, it does not suggest anything at all. If I manually trigger suggestions via
C-SPC, it says "No completion found". Finally, if I run
company-diag in the buffer, I get the following information:
Emacs 27.1 (x86_64-apple-darwin18.7.0) of 2020-08-12 on builder10-14.porkrind.org Company 0.9.13 company-backends: (company-capf company-yasnippet) Used backend: company-yasnippet Major mode: ruby-mode Prefix: nil Completions: none
I have no idea how to debug further. If it is any help, I have my personal configuration files in this repo, but I have not modified any company-mode related settings, so it should all be using the default from doom-emacs, which for company I believe are located here. Finally, I believe that the list of backends is not being set correctly in
ruby major mode (and may be failing in other modes as well), given the references to company in this file.
I'm not sure which completion backend Doom uses by default these days for Ruby (whether it's LSP or Robe), but the Troubleshooting section of
company/README.org says this:
For instance, go-mode requires guru to be installed on your system, and ruby-mode requires that you have a Robe server running (M-x robe-start).
Meaning, you need to have
robe (the package) installed (perhaps it already is) and to type
M-x robe-start to launch the background process. And to possibly deal with any errors you see if it fails to launch (e.g. run
Yes, I'm also not sure why
company-robe is not in the list of backend, but perhaps it will be added automatically as soon as the
robe package is (auto)-loaded.
Answered by Dmitry on October 29, 2020
0 Asked on January 4, 2022 by gigiair
0 Asked on January 4, 2022 by l-s
1 Asked on January 1, 2022 by ashton-wiersdorf
0 Asked on January 1, 2022 by falseee
1 Asked on December 28, 2021
1 Asked on December 26, 2021
2 Asked on December 26, 2021 by ugur
3 Asked on December 19, 2021 by philip-kirkbride
1 Asked on December 19, 2021 by j3rn
1 Asked on December 16, 2021 by space_held
0 Asked on December 14, 2021 by alex-shroyer
2 Asked on December 11, 2021 by thomas-kahle
1 Asked on December 11, 2021
3 Asked on December 9, 2021 by user8542613
Get help from others!