Commit graph

14 commits

Author SHA1 Message Date
Henrik Lissner
28adf5825f
lang/cc: fix rtags in other c*-mode derived modes; fix cleanup hook
Also fixed rtags cleanup in doom-cleanup-hook to only kill the server if
there are no more C/C++ buffers open.
2018-03-01 13:47:27 -05:00
Henrik Lissner
5fc4ed3f81
lang/cc: rewrite & polish style settings
Doom used to have its own cc-mode style, which was difficult to
customize without first undoing all its changes.

A doom entry has been added to c-style-alist, which represents
a marriage of various styles (mostly linux), plus some context-sensitive
indentation functions which I think are reasonable.

More importantly, it can be disabled by changing c-default-style.

Also, removed a few hacks that have been merged into v5.33+ of cc-mode.
25.1 users beware! You may not have these changes.
2018-02-23 04:51:20 -05:00
Henrik Lissner
b43743d565
lang/cc: fix smartparens not autopairing/skipping <>
Also removed +cc/autoclose->-maybe -- let smartparens handle this.
2018-02-14 05:40:37 -05:00
Henrik Lissner
dd7a26352b
lang/cc: remove unused arg in +cc/reload-compile-db
Appeases the byte-compiler (praise be!)
2018-01-05 13:16:56 -05:00
Henrik Lissner
b331acb46b
lang/cc: rename +cc-{include-paths,compiler-options} #305 2017-12-27 17:10:28 -05:00
Henrik Lissner
e833a16e04
lang/cc: +cc/reload-compile-commands => +cc/reload-compile-db #305 2017-12-27 00:11:09 -05:00
Henrik Lissner
869a85a46b
lang/cc: new command +cc/reload-compile-commands #305 2017-12-26 23:44:58 -05:00
Henrik Lissner
ad013e96dd
Fix malformed include path bug for c++-mode
Include paths were incorrectly escaped, causing -I options to be
ignored.
2017-09-20 03:10:00 +02:00
Henrik Lissner
b288f34f4e
lang/cc: rewrite init of irony-mode & compiler options 2017-09-19 05:06:50 +02:00
Henrik Lissner
570b093ac4
lang/cc: general config refactor
+ Auto-add the nearest include/ folder to compiler header search path.
+ Remove unneeded fontification hooks (now covered by
  modern-cpp-font-lock).
+ Enable C++11 support by default
2017-09-17 22:01:08 +02:00
Henrik Lissner
52d0dffba4
Restore missing c++ lineup-arglist advice 2017-08-04 22:48:06 +02:00
Henrik Lissner
c7254e7bdc
Major optimization refactor, across the board
+ enable lexical-scope everywhere (lexical-binding = t): ~5-10% faster
  startup; ~5-20% general boost
+ reduce consing, function calls & garbage collection by preferring
  cl-loop & dolist over lambda closures (for mapc[ar], add-hook, and
  various cl-lib filter/map/reduce functions) -- where possible
+ prefer functions with dedicated opcodes, like assq (see byte-defop's
  in bytecomp.el for more)
+ prefer pcase & cond (faster) over cl-case
+ general refactor for code readability
+ ensure naming & style conventions are adhered to
+ appease byte-compiler by marking unused variables with underscore
+ defer minor mode activation to after-init, emacs-startup or
  window-setup hooks; a customization opportunity for users + ensures
  custom functionality won't interfere with startup.
2017-06-09 00:47:45 +02:00
Henrik Lissner
2d44ec4eb6 lang/cc: remove +cc/install (vestigial; using bootstrapper now) 2017-04-05 15:55:11 -04:00
Henrik Lissner
e14e25ecb4 Update modules/lang/* 2017-02-20 00:26:08 -05:00