Commit graph

23 commits

Author SHA1 Message Date
Henrik Lissner
c58077810d
General refactor of modules
General code and comment improvements.

Also, removed the :desc's for csv-mode because map! is currently unable
to set which-key descriptions mode-locally, and should be avoided for
anything but global keybinds. This will be fixed when General is
introduced into Doom.
2018-09-09 09:58:20 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
fa4b7502c2
lang/cc: add +cc/imenu command
Plus minor reformatting of autoloads file
2018-08-04 13:44:55 +02:00
Henrik Lissner
31c8c0c033
lang/cc: rewrite C/C++/OBJC header file detection 2018-08-03 03:41:31 +02:00
Henrik Lissner
3c52c36c2f
lang/cc: general refactor
For idempotence and to group dependencies so certain sub-packages (like
irony's) aren't loaded if irony is disabled.
2018-06-05 02:29:44 +02:00
Henrik Lissner
09cb4f6716
Major refactor & optimization of how modules load their packages
Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
2018-05-25 00:46:16 +02:00
Henrik Lissner
4ee0b5ba6d
New macros file-exists-p! & project-file-exists-p!
The latter replaces the doom-project-has! macro
2018-05-24 21:15:17 +02:00
Henrik Lissner
158c853e63
lang/cc: don't complain about missing rtags executable 2018-05-09 12:17:26 +02:00
Henrik Lissner
fa3f627f44
lang/cc: fontify constants only in c/c++ buffers 2018-04-21 21:04:55 -04:00
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