spacemacs/contrib/company-mode
Tu Do a173d07252 Remove company-semantic to conform with Spacemacs
Since Spacemacs set the idle delay to 0.0 for continuous completion
offering, it is too much for backend like company-semantic, and probably
other backends that require long processing time that should only be
initiated when user is actually idle. company-semantic is not compatible
with Spacemacs overall, so we should remove it otherwise it hangs
Emacs.
2015-03-20 04:20:25 -04:00
..
config.el Move and rename company mode variables to config.el 2015-02-24 19:42:33 -05:00
funcs.el Update company-mode layer for new flycheck 2015-01-12 23:53:51 -05:00
packages.el Remove company-semantic to conform with Spacemacs 2015-03-20 04:20:25 -04:00
README.md Update company-mode documentation 2015-02-24 20:51:12 -05:00

Company Mode

This contrib layer switches spacemacs to use company-mode for autocompletion. It automatically uninstalls all auto-complete-mode related packages when you include it.

Clang Fanciness

In funcs.el there are some fancy improvements to company-clang. It includes a hook to load a projects .clang_complete file, which is just a text file with one clang flag per line, a format also used by other text editor clang plugins.

Not only does this allow proper autocomplete on projects with extra includes and flags, but I also hooked it into flycheck so that the error messages don't complain about missing header files and skip the actual problems.

Basically, Spacemacs now has better Clang/C++ than any other Emacs config.

Key Bindings

No Debug         |                 Description

---------------------|------------------------------------------------------------ C-j | go down in company dropdown menu C-k | go up in company dropdown menu C-/ | search in company dropdown C-M-/ | filter the company dropdown menu C-d | open minibuffer with documentation of thing at point in company dropdown

Settings

To use tab instead of enter to complete your selection, dotspacemacs/init set company-mode-use-tab-instead-of-enter to true, for example:

(defun dotspacemacs/init ()
  "User initialization for Spacemacs. This function is called at the very
 startup."
  (setq company-mode-use-tab-instead-of-enter t)
  )

Maintainer

This contrib layer was written by and should be maintained by @trishume, everyone else is welcome to contribute.