Commit graph

137 commits

Author SHA1 Message Date
Henrik Lissner
e1edbcb3d9
Remove dtrt-indent entries for crystal, rust & scala
They were merged upstream in jscheid/dtrt-indent/pull/49
2019-10-19 15:01:37 -04:00
Henrik Lissner
323e0adf45
Minor refactors & reformatting across the board 2019-10-17 01:47:58 -04:00
Henrik Lissner
051bceb0a8
Refactor localleader keybinds #1270
Introduces a select few of the localleader keybind standards proposed in
issue #1270, corrects a few typos and introduces more localleader
keybinds in general.

Co-authored-by: yuhan0 <>
2019-10-04 22:04:47 -04:00
Sean Escriva
f62723644f
Fix install command for clippy, uses rustup
Trying to install with cargo fails with the following error:

```
Caused by:
  failed to run custom build command for `clippy v0.0.302`

Caused by:
  process didn't exit successfully: `/var/folders/66/180ynjt55z74l338gh0stq0c0000gn/T/cargo-installkNqJBB/release/build/clippy-bcde765a4c9acf93/build-script-build` (exit code: 1)
--- stderr

error: Clippy is no longer available via crates.io

help: please run `rustup component add clippy-preview` instead
```
2019-09-27 14:39:17 -04:00
Henrik Lissner
bb68bcb80a
lang/rust: update prerequisites in README #1827 2019-09-26 14:26:47 -04:00
Henrik Lissner
f05512c2e5
lang/rust: restore advice redefs
Update package-installed-p redefinition to use a safe `require`, so that rustic-setup-rls will fail gracefully if lsp/eglot aren't available.

And restore rustic-install-rls-client-p redefinition to prevent rustic from trying to install packages.
2019-09-20 14:49:39 -04:00
Andrew Whatson
8e9d3fdc5d Fix package-installed-p hack for rustic 2019-09-20 21:49:44 +10:00
Henrik Lissner
7f2c7e7ae3
lang/rust: prevent rustic from installing packages 2019-09-20 00:11:02 -04:00
Henrik Lissner
e956c0dc5a
lang/rust: enable rainbow-delimiters-mode #1787 2019-09-15 12:06:40 -04:00
Henrik Lissner
56d2c95cc7
lang/rust: remove redundant editorconfig-indentation-alist entry 2019-08-15 14:51:06 -04:00
Henrik Lissner
19ecf8e46a
Correct last inline hook defuns
See a3e262c7 for rationale
2019-07-28 16:10:53 +02:00
Henrik Lissner
bc044ae3c0
Merge pull request #1578 from jdemilledt/patch-1
Remove flycheck-rust since it is no longer used.
2019-07-27 13:13:46 +02:00
Henrik Lissner
82ae3a73f3
def-advice!->defadvice! & conform to new advice conventions
This commit does two things:

- Renames def-advice! to defadvice!, in the spirit of naming convenience
  macros after the function/macro they enhance or replace.
- Correct the names of advice functions to indicate visibility and
  intent. A public advice function like doom-set-jump-a is meant to be
  used elsewhere. A private one like +dired--cleanup-header-line-a
  shouldn't -- it likely won't work anywhere but the function(s) it was
  made to advise.
2019-07-23 17:24:56 +02:00
Henrik Lissner
76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00
Henrik Lissner
149b2617b0
💥 revise hook/var fns naming convention (2/2)
This is second of three big naming convention changes. In this commit,
we change the naming conventions for hook functions and variable
functions:

1. Replace the bar | to indicate a hook function with a -h suffix, e.g.

     doom|init-ui -> doom-init-ui-h
     doom|run-local-var-hooks -> doom-run-local-var-hooks-h

2. And add a -fn suffix for functions meant to be set on variables,
   e.g.

     (setq magit-display-buffer-function #'+magit-display-buffer-fn)

See ccf327f8 for the reasoning behind these changes.
2019-07-22 02:30:38 +02:00
Henrik Lissner
51d3b1b424
💥 revise advice naming convention (1/2)
This is first of three big naming convention updates that have been a
long time coming. With 2.1 on the horizon, all the breaking updates will
batched together in preparation for the long haul.

In this commit, we do away with the asterix to communicate that a
function is an advice function, and we replace it with the '-a' suffix.
e.g.

  doom*shut-up -> doom-shut-up-a
  doom*recenter -> doom-recenter-a
  +evil*static-reindent -> +evil--static-reindent-a

The rationale behind this change is:

1. Elisp's own formatting/indenting tools would occasionally struggle
   with | and * (particularly pp and cl-prettyprint). They have no
   problem with / and :, fortunately.
2. External syntax highlighters (like pygmentize, discord markdown or
   github markdown) struggle with it, sometimes refusing to highlight
   code beyond these symbols.
3. * and | are less expressive than - and -- in communicating the
   intended visibility, versatility and stability of a function.
4. It complicated the regexps we must use to search for them.
5. They were arbitrary and over-complicated to begin with, decided
   on haphazardly way back when Doom was simply "my private config".

Anyhow, like how predicate functions have the -p suffix, we'll adopt the
-a suffix for advice functions, -h for hook functions and -fn for
variable functions.

Other noteable changes:
- Replaces advice-{add,remove}! macro with new def-advice!
  macro. The old pair weren't as useful. The new def-advice! saves on a
  lot of space.
- Removed "stage" assertions to make sure you were using the right
  macros in the right place. Turned out to not be necessary, we'll
  employ better checks later.
2019-07-22 02:27:45 +02:00
Julian DeMille
50dd1e63ac
Remove flycheck-rust since it is no longer used. 2019-07-21 09:16:13 -04:00
Henrik Lissner
8158cb1402
lang/rust: rustic-format-on-save = nil by default
Use :editor format instead.
2019-07-12 01:14:16 +02:00
Henrik Lissner
5c09772219
lang/rust: fix rustic load order
Since both the rust-mode and rustic packages aggressively fight for
precedence in auto-mode-alist, rustic *must* be loaded after rust-mode,
so we switch from rust-mode to rustic-mode if it's available. This only
needs to happen once.
2019-07-11 01:09:30 +02:00
Henrik Lissner
7b04bee2de
lang/rust: add doctor checks for lsp servers 2019-07-09 20:35:09 +02:00
Henrik Lissner
31875b64f4
Set rustic-rls-pkg sooner
To give the user an opportunity to change it.
2019-07-09 19:29:08 +02:00
Henrik Lissner
a7a9951a50
lang/rust: fix void-function package-installed-p 2019-07-09 18:50:50 +02:00
Henrik Lissner
7f735bcafa
lang/rust: fix cannot load file t error with +lsp 2019-07-09 18:46:27 +02:00
Henrik Lissner
236c9ceeab
lang/rust: use rustic-mode instead on Emacs 26+ 2019-07-09 17:54:18 +02:00
Henrik Lissner
f09a2b60c4
lang/rust: move lsp! to local-vars hook
i.e. start lsp-mode as late as possible
2019-07-07 17:39:19 +02:00
chrunchyjesus
e577ce0162
add b prefix back 2019-07-05 16:15:05 +02:00
chrunchyjesus
301173f35f
remove b prefix, small refactor 2019-07-04 21:33:13 +02:00
chrunchyjesus
883c390e2e
add documentation regarding some commands 2019-07-04 21:13:21 +02:00
chrunchyjesus
9f37363764
use keybindings from cargo mode 2019-07-04 20:58:44 +02:00
Jarmo Riikonen
7919825e4f Fix to Troubleshooting link. 2019-06-05 10:28:17 +03:00
Jarmo Riikonen
b89e71fe7b Fixed some things in description and Plugins 2019-06-05 09:59:44 +03:00
Jarmo Riikonen
13a9e00fff Rust README to new format 2019-06-05 09:49:02 +03:00
Henrik Lissner
f20f477a44
lang/rust: fix documentation lookup handler #1374 2019-04-30 20:21:12 -04:00
chrunchyjesus
feb78e8fa3
fix rustc detection 2019-04-25 18:31:42 +02:00
Henrik Lissner
c399c07694
Add :tools lsp checks for +lsp flag
Also:
- Reorganizes some :lang modules' packages.el file.
- Adds setuptools check in lang/python
- Adds javac check in lang/java
- Removes the depends-on! macro
2019-04-24 18:16:05 -04:00
Henrik Lissner
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
Henrik Lissner
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
Henrik Lissner
eb3c569e1d
Replace +lsp|init with lsp! autodef 2019-03-02 01:34:19 -05:00
iovxw
07d54abb9d
lang/rust: disable racer when +lsp 2019-02-23 14:05:12 +08:00
Henrik Lissner
69ed1a4a99
feature/{syntax-checker,spellcheck} -> tools/fly{check,spell} 2019-02-22 00:25:30 -05:00
Henrik Lissner
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
Henrik Lissner
01a166d5f0
lang/rust: fix async docs lookup handler #1155 2019-02-11 14:42:28 -05:00
Henrik Lissner
02624251c1
lang/rust: update keybinds for new map! 2018-12-22 20:07:18 -05:00
wanghao
56a2c15c44 add rust key bingding description 2018-12-19 19:00:58 +08:00
Henrik Lissner
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
Vladyslav M
cd22434df0
lang/rust: add cargo check localleader keybind 2018-09-12 23:32:17 +03:00
Henrik Lissner
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
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
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
c0251aacee
Replace :lookup with set-lookup-handlers! autodef
And update all internal references.
2018-06-15 17:27:48 +02:00