spacemacs/contrib/!lang
Tu Do fafb9c4b3e Enable company in Python REPL for code completion
- Company should be enabled in Python REPL for displaying completion
candidates. Note that in Python REPL, we must use company-capf to
display the candidates from Python REPL, since in the REPL it uses
completion-at-point to display candidates from the REPL. Also, we
locally set company-minimum-prefix-length to 0, so that completion
starts immediately after the first character. We also need to set the
idle delay a bit higher (0.5) compared with Spacemacs default (0.2),
since setting it too low may cause company unable to retrieve completion
candidates.

- Anaconda should NOT be enabled in Python REPL for retrieving proper
completion candidates. This can be tested in Python REPL: when
anaconda-mode is enabled and without any prefix string before point, run
the command completion-at-point (bound to C-M-i by default), completion
candidates from Anaconda are displayed but NOT the ones from the real
REPL. So, when you import a module i.e. os and try to access the
functions in the module with "os." prefix, nothing inside the module is
displayed because Anaconda does not work in Python REPL. When
anaconda-mode is disabled, candidates in "os." are displayed properly
with company-capf. company-anaconda backend cannot be used in Python
REPL since it is buggy: it cannot retrieve any prefix before point and
narrow properly.
2015-05-25 23:39:05 -04:00
..
agda Prefix categories with ! 2015-05-25 00:50:38 -04:00
autohotkey Prefix categories with ! 2015-05-25 00:50:38 -04:00
c-c++ Prefix categories with ! 2015-05-25 00:50:38 -04:00
clojure Prefix categories with ! 2015-05-25 00:50:38 -04:00
csharp Prefix categories with ! 2015-05-25 00:50:38 -04:00
d Prefix categories with ! 2015-05-25 00:50:38 -04:00
emacs-lisp Prefix categories with ! 2015-05-25 00:50:38 -04:00
erlang-elixir Prefix categories with ! 2015-05-25 00:50:38 -04:00
ess Prefix categories with ! 2015-05-25 00:50:38 -04:00
extra-langs Prefix categories with ! 2015-05-25 00:50:38 -04:00
fsharp Prefix categories with ! 2015-05-25 00:50:38 -04:00
go Prefix categories with ! 2015-05-25 00:50:38 -04:00
haskell Prefix categories with ! 2015-05-25 00:50:38 -04:00
html Turn on rainbow-delimiters for LESS and SCSS 2015-05-25 23:34:46 -04:00
javascript Prefix categories with ! 2015-05-25 00:50:38 -04:00
lua Prefix categories with ! 2015-05-25 00:50:38 -04:00
markdown Prefix categories with ! 2015-05-25 00:50:38 -04:00
ocaml Prefix categories with ! 2015-05-25 00:50:38 -04:00
php Prefix categories with ! 2015-05-25 00:50:38 -04:00
purescript Prefix categories with ! 2015-05-25 00:50:38 -04:00
python Enable company in Python REPL for code completion 2015-05-25 23:39:05 -04:00
racket Prefix categories with ! 2015-05-25 00:50:38 -04:00
ruby Prefix categories with ! 2015-05-25 00:50:38 -04:00
rust Prefix categories with ! 2015-05-25 00:50:38 -04:00
scala Prefix categories with ! 2015-05-25 00:50:38 -04:00
shell-scripts Prefix categories with ! 2015-05-25 00:50:38 -04:00
sql Prefix categories with ! 2015-05-25 00:50:38 -04:00
typescript Prefix categories with ! 2015-05-25 00:50:38 -04:00
windows-scripts Prefix categories with ! 2015-05-25 00:50:38 -04:00