From 12ac162276d256e011122c4361207510fd85a21d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 24 Jan 2018 03:15:45 -0500 Subject: [PATCH] lang/python: set :company-backend sooner #369 company-anaconda was added to company-backends too late, causing code completion not to work in first-time python buffers. --- modules/lang/python/config.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index 90bf1e83d..bb39481c3 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -24,8 +24,9 @@ is loaded.") :config (add-hook! 'python-mode-hook #'(flycheck-mode highlight-numbers-mode)) - (set! :repl 'python-mode #'+python/repl) + (set! :company-backend 'python-mode '(company-anaconda)) (set! :electric 'python-mode :chars '(?:)) + (set! :repl 'python-mode #'+python/repl) (when (executable-find "ipython") (setq python-shell-interpreter "ipython" @@ -87,7 +88,6 @@ environment variables." :when (featurep! :completion company) :after anaconda-mode :config - (set! :company-backend 'python-mode '(company-anaconda)) (set! :lookup 'python-mode :definition #'anaconda-mode-find-definitions :references #'anaconda-mode-find-references