Commit Graph

33 Commits

Author SHA1 Message Date
9a02bd8ac8 Minor refactors across the board
- when-let* -> when-let
- Fix projectile-locate-dominating-file for connected remote files
2019-06-26 14:31:06 +02:00
be4bae4acf Fix cc fontification for constants with numbers 2019-03-07 01:35:22 +10:00
0bd576673c Refactor lang/cc
+ Fix ffap integration
+ Code reduction for irony, rtags and lsp init hooks
+ Use c-add-style instead of unless+push
+ Log that irony server isn't installed
2019-03-02 01:51:51 -05:00
1f63358947 Use configured variables for rtags binary names 2019-02-27 12:53:03 +05:30
d83ba452ef Refactor +cc-c-c++-objc-mode
Improve docstring and a minor correction to C++ detection regexp.
2019-02-26 13:23:42 -05:00
2d3937ac1f Restore C/C++ default-header-file-mode support 2019-02-26 20:25:55 +10:00
60df01714e lang/cc: more type safety when reading compile options #1168
It was possible that +cc-default-compiler-options and/or
irony--compile-options could contain a nil, causing stringp type errors.
2019-02-14 00:40:19 -05:00
957aa9c63e lang/cc: make ffap aware of irony include paths 2019-01-14 00:49:58 -05:00
553cee5921 lang/cc: remove naive cdb file check #1028
irony looks for compile_commands.json in several places, but
+cc/reload-compile-db would error out if there it didn't exist at the
project root.
2018-12-05 14:22:14 -05:00
53fe7a1f04 Refactor Project API to reflect changes upstream
projectile-project-root no longer returns `default-directory` if not in
a project (it returns nil). As such, doom-project-* functions (and their
uses) have been refactored.

+ doom-project-p & doom-project-root are aliases for
  projectile-project-p & projectile-project-root.
+ doom-project-{p,root,name,expand} now has a DIR argument (for
  consistency, since projectile-project-name and
  projectile-project-expand do not).
+ The nocache parameter is no longer necessary, as projectile's caching
  behavior is now more sane.
+ Removed some projectile advice/hacks that are no longer necessary.
+ Updated unit tests
2018-09-28 21:13:27 -04:00
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
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
fa4b7502c2 lang/cc: add +cc/imenu command
Plus minor reformatting of autoloads file
2018-08-04 13:44:55 +02:00
31c8c0c033 lang/cc: rewrite C/C++/OBJC header file detection 2018-08-03 03:41:31 +02:00
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
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
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
158c853e63 lang/cc: don't complain about missing rtags executable 2018-05-09 12:17:26 +02:00
fa3f627f44 lang/cc: fontify constants only in c/c++ buffers 2018-04-21 21:04:55 -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
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
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
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
b331acb46b lang/cc: rename +cc-{include-paths,compiler-options} #305 2017-12-27 17:10:28 -05:00
e833a16e04 lang/cc: +cc/reload-compile-commands => +cc/reload-compile-db #305 2017-12-27 00:11:09 -05:00
869a85a46b lang/cc: new command +cc/reload-compile-commands #305 2017-12-26 23:44:58 -05:00
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
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
52d0dffba4 Restore missing c++ lineup-arglist advice 2017-08-04 22:48:06 +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
2d44ec4eb6 lang/cc: remove +cc/install (vestigial; using bootstrapper now) 2017-04-05 15:55:11 -04:00
e14e25ecb4 Update modules/lang/* 2017-02-20 00:26:08 -05:00