Commit graph

219 commits

Author SHA1 Message Date
Henrik Lissner
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
Henrik Lissner
d46eaeddbf
Merge pull request #1100 from mbger/doc/cc
lang/cc Add known issues with bear to readme
2019-01-20 14:23:00 -05:00
Henrik Lissner
7251b50b35
Make bear-macos issue a sub-tree
Since it is directly relevant to the project-compile-settings section.
2019-01-20 14:22:45 -05:00
Henrik Lissner
d7f10cbcbd
lang/cc: fix brace-list argument block indentation
Should be

fn({
    ...
})

Instead of

fn({
        ...
    })
2019-01-14 00:50:33 -05:00
Henrik Lissner
957aa9c63e
lang/cc: make ffap aware of irony include paths 2019-01-14 00:49:58 -05:00
mbger
e02cde1195 :lang cc Add known issues section for macOS 2019-01-07 19:28:59 +01:00
Henrik Lissner
9916025d5c
lang/cc: rewrite README 2019-01-05 19:46:14 -05:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
b43888901f lang/cc: add rotate patterns for c++-mode
These can be used by pressing ! in normal mode, over rotatable regions
of text.
2018-09-28 21:13:27 -04:00
Henrik Lissner
92cf264b1b
lang/cc: don't complain if irony isn't installed 2018-09-20 23:13:17 -04:00
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
fd8f8c5108
feature/lookup: rewrite dash docset integration
+ Uses alist variable to store config, rather than hooks
+ Added check for installed docsets in +lookup/documentation
+ Set docsets for various language modules (c-mode, c++-mode, css-mode,
  scss-mode, sass-mode, web-mode, go-mode, racket-mode, emacs-lisp-mode,
  js2-mode, rjsx-mode, typescript-mode, rust-mode, and php-mode)
+ Made *eww* popups for dash docsets larger
+ Renamed set-docset! => set-docsets! (set-docset! is aliased to
  set-docsets!)
+ New +lookup/install-docset alias
2018-08-31 02:49:48 +02:00
Henrik Lissner
c7e6cb981b
lang/cc: simplify add-hook! call 2018-08-21 23:15:54 +02:00
wanghao
b867afff1f delete redundant comma
this cause wrong tab width in c mode
2018-08-17 10:48:14 +08:00
Henrik Lissner
b17bbf2729
lang/cc: refactor company-(glsl|cmake) configs 2018-08-08 00:11:20 +02:00
Henrik Lissner
7e5b8012b6
lang/cc: set company backends on irony-mode
Rather than c/c++/objc modes.
2018-08-07 21:12:26 +02: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
cfebed96db
lang/cc: cull unnecessary def-package! blocks
rtags loads these packages for us, so long as
rtags-display-result-backend is properly set.
2018-08-02 03:47:29 +02:00
Aria
90d09e6f93 Highlight-numbers on every prog-mode 2018-07-29 12:19:56 +10:00
Henrik Lissner
ce12aaa4bb
lang/cc: use def-package! for demangle-mode
This way, if demangle-mode is disabled, so is its hook.
2018-07-19 03:38:01 +02:00
Josh Seba
fff9547763 Fix major mode symbols 2018-07-05 22:09:29 -07:00
Henrik Lissner
b0f59ff5bd
lang/cc: fix wrong-type-argument: stringp error
Caused by -stdlib flag being a sub-list in +cc-default-compiler-options,
when it should be nil or a string.
2018-06-28 14:40:12 +02:00
Henrik Lissner
c78c6495f1
Apply /* and /** pairs to more modes
Including js, ts, rjsx, rust, all C modes, php, and all css modes (scss,
less, and stylus).

Requested by @ar1a
2018-06-24 16:31:13 +02:00
Henrik Lissner
f6dc6ac74e
Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
Henrik Lissner
e05d7cfee0
Change flycheck initialization strategy
Initialize it globally and turn it off where needed, instead of enabling
it on demand. Also fixes void-function: flycheck-mode errors when
:feature syntax-checker is disabled. This is experimental.

Indirectly fixes #710
2018-06-22 01:49:20 +02:00
Henrik Lissner
1866bb75f0
Gate rtags packages behind +rtags module flag #693 2018-06-17 14:45:07 +02:00
Henrik Lissner
ec8ae0bedc
Add :ui pretty-code & set-pretty-symbols! autodef
Along with defaults for C/C++, elm, elisp, js, typescript, web-mode, and
org-mode. Thanks to @ar1a for inspiration.
2018-06-16 19:32:25 +02:00
Henrik Lissner
c0251aacee
Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +02:00
Henrik Lissner
9f0ebe42e8
Replace :electric with set-electric-rules!
And general refactor of the emacs/electric-indent module.

Also updates (set! :electric ...) references in various :lang modules
2018-06-15 13:32:07 +02:00
Henrik Lissner
d8b1e469bc
Introduce autodefs to replace some settings
+ :popup -> set-popup-rule!
+ :popups -> set-popup-rules!
+ :company-backend -> set-company-backend!
+ :evil-state -> set-evil-initial-state!

I am slowly phasing out the setting system (def-setting! and set!),
starting with these.

What are autodefs? These are functions that are always defined, whether
or not their respective modules are enabled. However, when their modules
are disabled, they are replaced with macros that no-op and don't
waste time evaluating their arguments.

The old set! function will still work, for a while.
2018-06-15 03:42:01 +02:00
Zwb
3ccd459ddb lang/cc: set rtags-install-path to ${doom-etc-dir}/rtags/ 2018-06-10 22:33:26 +08:00
Aria Edmonds
022a64d2e3
rtags is rdm not rtags
silly henrik
2018-06-05 17:40:54 +10: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
1d9ae834f2
Minor refactors & docstring revision
These are not the refactors you are looking for.
2018-06-04 21:17:49 +02:00
Henrik Lissner
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
Henrik Lissner
7cd97588e6
lang/cc: change default standard to c++1z 2018-06-04 00:11:13 +02:00
Henrik Lissner
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
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
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
Henrik Lissner
158c853e63
lang/cc: don't complain about missing rtags executable 2018-05-09 12:17:26 +02:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
fa3f627f44
lang/cc: fontify constants only in c/c++ buffers 2018-04-21 21:04:55 -04:00
Henrik Lissner
80e94ac91f
lang/cc: reindent line on { #510 2018-04-07 08:04:31 -04:00
Henrik Lissner
8e7f97167a
Minor whitespace/docstring refactor 2018-04-02 06:17:22 -04:00
Henrik Lissner
b21e4c8bba
lang/cc: minor refactor 2018-03-22 23:27:48 -04:00