Commit graph

42 commits

Author SHA1 Message Date
Craig Eales
65ead73365 Remove unnecessary auto-mode-alist additions
The default auto-mode-alist already has an entry that will use c++mode
for .cxx and hpp files.

("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)
2015-05-02 22:01:43 -04:00
Tu Do
b9a7bc905b Enable c++-mode when opening a .h file the first time
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.
2015-05-02 21:59:50 -04:00
syl20bnr
5091f79d4d Remove company-yasnippet backends 2015-04-29 23:54:30 -04:00
syl20bnr
7655221a44 c-c++ layer: Fix post-init function names and remove unnecessary when condition 2015-04-27 22:27:11 -04:00
syl20bnr
84db42e6a4 ycmd layer: Move c specific config to c-c++ layer
fix #1414
2015-04-27 21:27:46 -04:00
Tu Do
6ffb4fa916 Improve Semantic layer
- 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.
2015-04-26 00:33:48 -04:00
syl20bnr
ad06363b39 Modularize ggtags with eldoc configuration
See PHP layer packages.el for an example
2015-04-22 00:53:57 -04:00
Tu Do
f869d650e9 Add missing modes that should have gtags enabled 2015-04-22 00:24:50 -04:00
Tu Do
000791c5f3 [feature] new Semantic layer
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
2015-04-21 01:15:40 -04:00
syl20bnr
fdd4e944ef Reload dotfile and layer anywhere with SPC f e R
Replace `SPC m c c` and `C-c C-c` in the dotfile

Resolve #1210
2015-04-18 23:40:24 -04:00
syl20bnr
afddfec611 gtags layer: remove helm-gtags global hook 2015-04-16 00:13:14 -04:00
syl20bnr
145bf065f4 helm-gtags: more conventional way to add helm-gtags support to a mode 2015-04-16 00:01:42 -04:00
Tu Do
cdbfe68cee Enable c++ mode in proper files
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.
2015-04-14 23:37:18 -04:00
syl20bnr
a4919b3eda New layer syntax-checking
Move flycheck
2015-04-10 22:23:16 -04:00
syl20bnr
90fc74d799 Fix company-backends error with ymcd and c-headers 2015-04-09 01:27:53 -04:00
syl20bnr
0c6682cbd1 Refactor one more time the auto-completin macros
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.
2015-04-09 00:03:51 -04:00
Tristan Hume
e79e077edf Fix bugs in c-c++ and ycmd auto-completion 2015-04-07 16:03:13 -04:00
syl20bnr
57fcb93799 Rename *-declarep functions to *-usedp functions
Makes more sense from a user view point.
2015-04-03 19:13:52 -04:00
syl20bnr
318bd23dc4 Add pre and post init functions support to configuration-layers
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.
2015-04-03 17:12:56 -04:00
syl20bnr
769d54da02 New layer auto-completion
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.
2015-04-03 00:28:13 -04:00
syl20bnr
5e993d8e4c c-c++ layer: Fix append of company-cmake 2015-03-31 22:37:53 -04:00
syl20bnr
46248b1e73 New local company backends 2015-03-31 22:24:01 -04:00
syl20bnr
0fa0409523 Restore reset of local company-backends and add with-yas param 2015-03-30 00:48:41 -04:00
Tristan Hume
cb43a91a15 Add company backend add macro and use it everywhere 2015-03-30 00:01:33 -04:00
Diego Berrocal
78f8c6aae0 Change condition for company-mode detection
changed configuration-layer/package-declaredp for
configuration-layer/layer-declaredp in company-mode
2015-03-29 23:49:37 -04:00
syl20bnr
131fd3cce8 Remove empty file funcs.el in c-c++ layer 2015-03-24 21:53:37 -04:00
Michael Hauser-Raspe
43c9e14d16 Add projectile-find-other-file key bindings 2015-03-23 21:52:55 -04:00
syl20bnr
b1adef0626 Heavy refactoring of company-mode layer
- 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`
2015-03-22 02:23:12 -04:00
syl20bnr
ff7960fe5d Lazy-loading for c-c++ layer 2015-03-15 21:44:10 -04:00
Diego Berrocal
6e348c0a54 Fix compatibility with use-package 2.0 2015-03-15 18:51:18 -04:00
Tu Do
3e277409ea [Fix #738] Display all parameters in the top line
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.
2015-03-14 22:56:20 -04:00
syl20bnr
a1732a8098 Remove unneeded code in C++ layer packages.el file
Use variable spacemacs-cache-directory
2015-03-10 20:33:49 -04:00
syl20bnr
fe6cbe790a C++ layer README srefactor is not available in previous version of emacs 2015-03-10 20:33:47 -04:00
Tu Do
67e5f2733b Change Semantic cache location and update documentation
Also make it compatible with Emacs 24.3
2015-03-10 20:33:45 -04:00
Tu Do
30dac136bb Enable Semantic support for C/C++; add Srefator
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.
2015-02-27 20:36:00 -05:00
syl20bnr
96723eb7eb Update wrong code snippets in READMEs 2015-02-17 22:36:12 -05:00
syl20bnr
ceefe88b75 Update CONTRIBUTE.md and add file headers
Also add default file header to layer templates.
2015-01-13 23:12:56 -05:00
syl20bnr
fd0e9abbe7 Move layer images into img directories 2014-12-24 01:03:49 -05:00
syl20bnr
f770404255 Dispatch flycheck hooks in relevant layers 2014-12-22 22:51:44 -05:00
syl20bnr
9f21172540 Fix bad format and typos in layer READMEs 2014-12-14 00:32:25 -05:00
syl20bnr
95a1795873 Move Scala packages to scala layer 2014-12-13 23:29:23 -05:00
syl20bnr
61a9481e96 Move C/C++ and CMake to c-c++ layer
Although CMake can support different compilers it is mainly
used for C++ projects. So it makes sense to add it here.
2014-12-13 23:08:55 -05:00