With current configuration, .h file is only associated with c++-mode
only when cc-mode is loaded. So, when a .h file is opened the first
time, it is opened and is applied with c-mode. Only the 2nd time then
c++-mode is properly used.
- Explicitly load Semantic. Currently is loaded only when Srefactor is
loaded, which is not good for other packages that depends on
Semantic but outside of C/C++, i.e. Python.
- Enable evil-emacs-state in Srefactor UI menu, since currently Evil key
mapping override the key mapping of the menu. Vim key bindings are
already supported upstream, with j,k,/ and ? which is good enough to
navigate the menu.
This separates Semantic layer from language major modes, so Semantic
features are only enabled when the layer is added, allow user to choose
using it or not.
Conflicts:
contrib/lang/c-c++/packages.el
Aside from cpp, better enable c++-mode in .h file since C is a subset of
C++ anyway. Without it, when entering .h file of C++, syntax
highlighting is wrong.
It is important to define the buffer local backend variables
in a config.el otherwise it is not available in the layer
configuration if the auto-completion layer is removed.
There were also some issues by hiding the explicit
configuration of company inside a macro, for instance
helm-spacemacs is unable to display the company package
configured in a given layer if the auto-completion layer
is removed.
Now in addition to the <layer>/init-<pkg> function there are
- <layer>/pre-init-<pkg> (executed before <layer>/init-<pkg>)
- <layer>/post-init-<pkg> (executed after <layer>/init-<pkg>)
The init function is mandatory, if it is not present then the
package is ignored and not installed.
This mechanism allows soft (implicit) cross layers dependencies
between packages (see company for more info).
It is now possible to remove flycheck from spacemacs layer and
move it to its own syntax-checking layer.
Move company and auto-complete to a common layer.
They are not enabled globally anymore, each mode using them
must explicitly declare a hook.
Only one frontend is supported for a given mode, we have to
choose the best between the two.
Only one key binding to toggle auto-completion on `SPC t a` no
matter if it is company or auto-complete. The lighter in the
mode-line is Ⓐ for both frontends.
- Enable lazy-loading of company.
- The company layer is now agnostic of any packages which use company
- company-backends is now buffer local and contains only the backends
which are relevant for the current modes
- New macro `spacemacs|reset-local-company-backends`
This change allows semantic-sticky-func-mode to display parameters that
are scattered in many lines by using stickyfunc-enhance package. It also
specifically handles Python to also display assigned values if
available.
Also update documentation.
With Semantic mode enabled, it enables IDE features such as:
- Enable helm-semantic-or-imenu to jump with Semantic instead of Imenu.
- Show function signature of current function point is inside at the
top (with global-semantic-stickyfunc-mode)
- Show function signature of current function at point at the
bottom (with global-semantic-idle-summary-mode).
- Add Srefactor for refactoring using Semantic parser framework. Bind it
to "SPC m r".
- Load 'compile package, otherwise compilation-mode-map won't exists and
Semantic fails to bind some key to the map and throw error.