Question: How to make company-sourcekit turn on automatically?
wiruzx opened this issue · comments
Victor Shamanov commented
Company mode not being automatically enable company-sourcekitten, instead it turn on some kind of "general" mode, when it's trying to complete me based not on sourcekitten.
When I type a few chars, I got:
And only when I run company-sourcekit
, the real completion is showing up:
Could you please point me at what I am doing wrong?
Benedikt Terhechte commented
Can you try adding this to your init.el
or executing it in the *scratch*
buffer:
(add-hook 'swift-mode-hook (lambda ()
(set (make-local-variable 'company-backends) '(company-sourcekit))
(company-mode)))
And then re-load swift-mode
/ company-mode
and see if that works?
Victor Shamanov commented
@terhechte Yes! Thanks a lot!
Nathan Kot commented
I will add this step to the installation section :)