Commit Graph

44 Commits

Author SHA1 Message Date
9f37363764 use keybindings from cargo mode 2019-07-04 20:58:44 +02:00
f20f477a44 lang/rust: fix documentation lookup handler #1374 2019-04-30 20:21:12 -04:00
8e18b402ce lang/rust: run cargo commands from Cargo.toml dir
Instead of the current directory, which breaks file links in the
compilation buffer.
2019-04-10 18:52:08 -04:00
2dc52bc9be 💥 Replace exec-path-from-shell w/ 'bin/doom env'
IMPORTANT: This is a breaking update for Mac users, as your shell
environment will no longer be inherited correctly (with the removal of
exec-path-from-shell). The quick fix is: 'bin/doom env refresh'. Also,
the set-env! autodef now does nothing (and is deprecated), be sure to
remove calls to it in your config.

Smaller changes:
+ This update also adds --no-* switches to doom quickstart
+ Includes general improvements to the documentation of several bin/doom
  commands.
+ Moves doom/reload* commands to core/autoload/config.el
+ doom/reload-project has been removed (it didn't actually do anything)

The breaking change:
This update adds an "envvar file" to Doom Emacs. This file is generated
by `doom env refresh`, populated with variables scraped from your shell
environment (from both non-interactive and interactive sessions). This
file is then (inexpensively) loaded at startup, if it exists.

+ The file is manually generated with `doom env refresh`.
+ It can be regenerated automatically whenever `doom refresh` is run by
  running `doom env enable` (`doom env clear` will reverse this and
  delete the env file).
+ `doom quickstart` will ask if you want to auto-generate this envvar
  file. You won't need it if you're confident Emacs will always be
  started from the correct environment, however.
+ Your env file can be reloaded from a running Emacs session with `M-x
  doom/reload-env`. Note: this won't work if the Emacs session you're
  running it in doesn't have a correct SHELL set. i.e. don't use this to
  create your first env file!

The idea isn't mine -- it's borrowed from Spacemacs -- and was
introduced to me in #1053 by @yurimx. I was impressed with it. Prior to
this, I was unhappy with exec-path-from-shell (no hate to the dev, I
understand its necessity), and 'doom patch-macos' wasn't ideal for mac
users (needed to be reapplied every time you update Emacs). What's more,
many users (even Linux users) had to install exec-path-from-shell
anyway.

This solution suffers from none of their shortcomings. More reliable
than patch-macos, more performant and complete than
exec-path-from-shell, and easily handled by bin/doom.
2019-03-28 01:56:09 -04:00
eb3c569e1d Replace +lsp|init with lsp! autodef 2019-03-02 01:34:19 -05:00
69ed1a4a99 feature/{syntax-checker,spellcheck} -> tools/fly{check,spell} 2019-02-22 00:25:30 -05:00
cb923eadcc Add basic LSP support
Still needs to be documented, but includes support for the following
languages:

+ C/C++/ObjC
+ Go
+ Java
+ Javascript
+ OCaml
+ PHP
+ Python
+ Ruby
+ Scala
+ Swift
+ HTML/CSS

Relevant to #460, #716, #1186
2019-02-21 19:13:35 -05:00
01a166d5f0 lang/rust: fix async docs lookup handler #1155 2019-02-11 14:42:28 -05:00
02624251c1 lang/rust: update keybinds for new map! 2018-12-22 20:07:18 -05:00
56a2c15c44 add rust key bingding description 2018-12-19 19:00:58 +08:00
e8b6887259 lang/rust: remove company-racer
Racer provides completion-at-point integration, which makes
company-racer redundant (and it conflicts with company-capf).
2018-10-18 13:11:28 -04:00
cd22434df0 lang/rust: add cargo check localleader keybind 2018-09-12 23:32:17 +03:00
84abac6b69 Remove def-menu!; use :localleader keys instead
def-menu was clumsy. We could use a better UI for refactoring commands,
but they should be available via localleader keybinds in any case.
2018-09-09 09:58:18 -04:00
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
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
c0251aacee Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +02:00
b99ab59578 Replace :docset with set-docset! autodef 2018-06-15 16:20:20 +02:00
98d2f1de3f Add set-env! autodef; make :env obsolete 2018-06-15 03:42:01 +02:00
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
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
135ebd925f Enable global-eldoc-mode; less work for me! 2018-04-23 00:34:03 -04:00
0d056149be lang/rust: refactor & bind +rust/build-menu 2018-03-14 19:08:02 -04:00
1765ca7282 lang/rust: add :docset 2018-03-14 19:06:42 -04:00
74c8b1d113 Rewrite doctor; move warn! blocks out in doctor.el files 2018-03-12 13:32:01 -04:00
2edbf91a5e lang/rust: read RUST_SRC_PATH envvar on MacOS 2018-03-07 21:21:39 -05:00
4dd6bcdc5f lang/rust: rust-indent-method-chain = t 2018-03-05 13:43:20 -05:00
c5abcfa703 lang/rust: fix flycheck not activating in rust-mode 2018-02-28 17:57:30 -05:00
02ad689890 lang/rust: refactor racer config
A lot of the previous logic is redundant and already done by the racer
package.
2018-02-18 03:13:50 -05:00
bac73ec938 Replace warn => warn! 2018-02-14 07:46:38 -05:00
42cee2e046 Update :jump => :lookup 2018-01-05 23:57:48 -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
e0dab9f5fa lang/rust: check for racer binary + RUST_SRC_PATH first 2017-11-02 20:01:34 +01:00
ed76cfda99 General lang refactor; new refactor, help, build & test menus 2017-10-03 02:58:09 +02:00
d0fcb23314 Replace feature/eval build system with def-menu! 2017-10-03 02:58:09 +02:00
235576d168 lang/rust: minor refactor 2017-09-19 05:07:24 +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
5ae94b765c PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES 2017-04-17 02:17:10 -04:00
648c4c1d3b Update lang modules' :build settings 2017-04-07 01:46:33 -04:00
f6ca185e63 lang/rust: add bootstrap 2017-03-20 21:15:18 -04:00
3e63d2d23b Reduce def-package magic; explicitly use :when property 2017-03-19 22:47:50 -04:00
33c88d4f82 Revert macros to ...! name convention (elisp doesn't like @...) 2017-02-23 00:06:12 -05:00
6704736100 lang/rust: refactor racer config + add +rust/install-racer command (WIP) 2017-02-21 03:46:07 -05:00
e14e25ecb4 Update modules/lang/* 2017-02-20 00:26:08 -05:00
f453b3cee1 Reorganize modules 2017-02-20 00:23:03 -05:00