Commit Graph

114 Commits

Author SHA1 Message Date
b7d619fc8e Fix objc-mode auto-mode-alist regexp
It had no line terminator.

COME WITH ME IF YOU WANT TO LIVE.
2018-06-04 00:12:02 +02:00
7cd97588e6 lang/cc: change default standard to c++1z 2018-06-04 00:11:13 +02:00
1e81a35461 Minimize dependence on map!
This is in preparation for general.el integration coming in 2.1.1. It is
very likely that map! will change (and even more, be split into several
macros). Not much, but change none-the-less. Specifically, the state
keywords (e.g. :nvi, :n, :i) will be removed in favor of a :state
property that takes a list, e.g. (normal visual insert).

In any case, both map! and general are also relatively expensive
compared to define-key and evil-define-key* (and the new define-key!
macro), so use that when we can.

This also means changes to either API won't affect Doom's modules in the
long term.
2018-06-03 15:46:00 +02:00
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
63fdc3530c lang/cc: refactor (nest configs and chain packages)
Allows users to disable irony and/or rtags only, then their dependent
packages won't be loaded.
2018-05-16 00:16:13 +02:00
158c853e63 lang/cc: don't complain about missing rtags executable 2018-05-09 12:17:26 +02:00
93e552fcaf lang/cc: remove unnecessary :after irony properties
These two packages will be autoloaded by other means.
2018-05-09 10:22:03 +02:00
abd141aed9 lang/cc: alias cpp-mode to c++-mode
Offers an alternative for invoking c++-mode via M-x. The default M-x
interfaces for helm and ivy treat input as regexp, thus not reading +'s
literally, which can be annoying.
2018-05-07 21:57:20 +02:00
80e94ac91f lang/cc: reindent line on { #510 2018-04-07 08:04:31 -04:00
8e7f97167a Minor whitespace/docstring refactor 2018-04-02 06:17:22 -04:00
b21e4c8bba lang/cc: minor refactor 2018-03-22 23:27:48 -04:00
9168dfd733 lang/cc: add build-conda to irony-cdb-search-directory-list 2018-03-16 00:38:10 -04:00
74c8b1d113 Rewrite doctor; move warn! blocks out in doctor.el files 2018-03-12 13:32:01 -04:00
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
dfb6bc162d lang/cc: remove ivy+rtags hack (unnecessary?) 2018-03-01 04:35:52 -05:00
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
2b1c323dbf 💥 Redesign private sub-module system
~/.doom.d/modules is now a full module tree, like ~/.emacs.d/modules.
Symlinks are no longer involved.

Private modules can now shadow Doom modules. e.g.
~/.doom.d/modules/lang/org will take precendence over
~/.emacs.d/modules/lang/org.

Also, made doom--*-load-path variables public (e.g. doom--site-load-path
=> doom-site-load-path), and rearranged the load-path for a 10-15%
startup boost.
2018-02-16 02:11:10 -05:00
bac73ec938 Replace warn => warn! 2018-02-14 07:46:38 -05:00
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
25977d662b Fix adding evil-set-jump to rtags-jump-hook when evil is not enabled 2018-02-13 09:29:48 -06:00
2bfb4accf2 Merge pull request #348 from UndeadKernel/rtags-fix
Correctly report when rtags's client or server are not found.
2018-01-11 13:11:47 -05:00
c59f584444 Correctly report when rtags's client or server are not found. 2018-01-11 15:49:50 +01:00
669b3cbbb0 lang/cc: fix void-function irony-mode error #341 2018-01-10 22:25:09 -05:00
42cee2e046 Update :jump => :lookup 2018-01-05 23:57:48 -05:00
1ebc4c9594 lang/cc: fix irony-mode complaining in non-C modes, like php-mode 2018-01-01 13:23:39 -05:00
b331acb46b lang/cc: rename +cc-{include-paths,compiler-options} #305 2017-12-27 17:10:28 -05:00
0a9a992e81 lang/cc: remove +cc|init-rtags-server-maybe
The rtags-start-process-unless-running function does exactly the same
thing, making +cc|init-rtags-server-maybe redundant.

Relevant to #305
2017-12-27 00:49:09 -05:00
854b26af28 lang/cc: fix rtags-cancel-process preventing emacs quit 2017-12-27 00:42:04 -05:00
fa98d79bf4 lang/cc: rtags-completions-enabled = nil #305 2017-12-26 23:39:44 -05:00
0b2e6abac6 lang/cc: don't undo ivy-mode-map remapping 2017-12-26 19:39:20 -05:00
10110ad9d2 lang/cc: kill emacs-spawned rdm on quit #305 2017-12-26 19:36:03 -05:00
222a2955e2 lang/cc: refactor rtags integration #305 2017-12-26 19:24:25 -05:00
750b74379d lang/cc: add rtags support #305 2017-12-26 18:15:10 -05:00
a02edc1d01 lang/cc: map cmake-mode to .cmake files 2017-12-26 18:12:15 -05:00
e5dcdadd5e lang/cc: (when ...) -> :when 2017-12-26 14:14:36 -05:00
76a4ae459d Fix obsolete (when|if)-let messages in Emacs 26 2017-12-10 14:49:52 -05:00
9d81bc5a8b Major refactor: use-package-always-defer = nil & use :hook
Possibly breaking change: packages are no longer deferred by default.

Addresses #286
2017-12-08 23:14:11 -05:00
d600d36675 lang/cc: minor refactor 2017-09-20 14:25:35 +02:00
58198acf18 Refactor magic-mode-alist entries for rjsx-mode, c++-mode & objc-mode 2017-09-20 01:34:47 +02:00
ad8418a84b lang/cc: remove redundant condition 2017-09-19 05:07:05 +02:00
b288f34f4e lang/cc: rewrite init of irony-mode & compiler options 2017-09-19 05:06:50 +02:00
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
d28c64b4fa General refactor & cleanup 2017-09-02 16:39:51 +02:00
52d0dffba4 Restore missing c++ lineup-arglist advice 2017-08-04 22:48:06 +02:00
b135c1a5f3 lang/cc: reorganize; add company-glsl 2017-07-06 16:42:35 +02:00
5f141a82ab lang/cc: refactor 2017-06-24 02:25:15 +02:00
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
10ea06b661 General cleanup + refactor 2017-05-25 20:12:43 +02:00
55b718191d Fix double indentation in java 2017-05-23 21:25:24 +02:00
3e53c3ba76 Restrict irony-mode to cc-modes
Irony-mode gets triggered for other modes derived from cc-mode, like php
or java. Might fix #81.
2017-05-22 22:27:47 +02:00