Commit Graph

42 Commits

Author SHA1 Message Date
ad6a3d0f33 refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
2022-08-14 20:43:35 +02:00
d58d084774 tweak(:lang,:tools): start eglot/lsp-mode later
To ensure lsp/eglot settings have precedence over local servers (e.g.
cider and lookup handlers).

Ref: clojure-emacs/cider#3170
2022-03-30 17:32:47 +02:00
8b95aa5d3e lang/racket: add +lsp flag
And add link to racket's README.
2021-07-12 19:20:23 -04:00
911d0a2732 Remove racket repl unicode input hook 2020-11-14 15:59:58 -07:00
452bc0d183 Map bindings for the repl 2020-08-22 15:12:39 +02:00
113ec1c201 Remap funs to xp-specific ones in racket-xp-mode 2020-08-22 15:10:30 +02:00
86b144a915 Set lookup handlers in the repl as well 2020-08-22 15:09:43 +02:00
7081d833f6 Move :ui pretty-code to :ui ligatures
Includes a major refactor of the module.
2020-08-20 02:14:32 -04:00
58b4ac9d6d PR feedback 2020-08-05 18:53:16 -07:00
214411edb4 racket-mode: avoid using flycheck-disable-checker
The problem is that at this point, flycheck-mode might not be active
yet. Calling flycheck-disable-checker always call (flycheck-buffer)
which would result in an error: (user-error "Flycheck mode disabled")
2020-08-04 17:30:39 -07:00
e6979166ee Disable flycheck in racket-xp-mode
Plus minor refactors.

Closes #3594

Co-authored-by: sorawee <sorawee@users.noreply.github.com>
2020-07-26 15:09:05 -04:00
0f3bd57101 Fix visit docs for Racket & support racket-xp (#3373)
* Fix visit docs for Racket & support racket-xp

- Fix Racket's +lookup/documentation in the same way as
  https://github.com/hlissner/doom-emacs/commit/f20f477a44138d3bc8b
- Support the +xp feature which enables racket-xp. When it's not
  enabled, default handlers to the traditional racket-repl
  (which requires users to run code first)

* PR feedback

* Replace add-hook! with add-hook
2020-06-13 03:03:11 -04:00
789b1dc1ab Bump :lang racket
greghendershott/racket-mode@bd4c8cf -> greghendershott/racket-mode@202cc1b

Fixes #2922
2020-04-17 15:47:04 -04:00
a938eb33e6 Fix #2626: associate *.rkt w/ racket-mode
geiser claims *.rkt for scheme-mode, but if :lang racket is enabled,
let's assume the user wants racket-mode instead.
2020-02-29 00:08:26 -05:00
887d127748 Conditionally enable racket-smart-open-bracket-mode 2020-02-23 15:36:16 -06:00
fe464910d2 Fixes:2023, added racket-smart-open-bracket-mode 2019-11-07 14:09:30 -05:00
0b67251159 tools/eval: associate plist with repl handlers
Also consolidates all REPLs (opened through the :tools eval module)
under one popup rule, which inhibits ESC from prematurely closing
them (#1944), and cleans up after their buffers *only* if their handlers
weren't specified to :persist, e.g.

  (set-repl-handler! 'some-mode #'some-repl-handler :persist t)

Also standardized ESS's REPL commands.
2019-10-23 21:41:23 -04:00
9b25582be1 Reduce list of root files projectile searches for
And define them on a per-module basis. This reduces the number of file
checks it performs, particularly for non-project files.

Might help #1317
2019-10-19 22:22:49 -04:00
11a6c03d69 Standardize naming of repl handler commands 2019-10-07 14:08:58 -04:00
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
2d365619cd General refactor & cleanup, across the board 2019-09-13 22:00:34 -04:00
5dc1ad0033 lang/racket: Fix bug in configuration 2019-07-28 17:07:17 -04:00
55b9c1f171 lang/racket: Fix smart open bracket insertion
`racket-smart-open-bracket-enable` has been replaced by a function that
inserts the right type of bracket (see
669275b3a6),
which we need to bind to [.
2019-07-28 10:27:38 -04:00
592bb13496 lang/racket: set lookup handler to find definition 2019-07-26 14:43:57 -04:00
a3e262c7ac 💥 Refactor add-hook! macro & change arg order
This update may potentially break your usage of add-hook! if you pass
the :local or :append properties to it. This is how they used to work:

  (add-hook! :append 'some-mode-hook #'do-something)

Thsoe properties must now follow the hooks, e.g.

  (add-hook! 'some-mode-hook :append #'do-something)

Other changes:
- Various add-hook calls have been renamed to add-hook! because I
  incorrectly assumed `defun` always returned its definition's symbol,
  when in fact, its return value is "undefined" (so sayeth the
  documentation). This should fix #1597.
- This update adds the ability to add multiple functions to hooks
  without a list:

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

- The indentation logic has been changed so that consecutive function
  symbols at indented at the same level as the first argument, but forms
  are indent like a defun.

    (add-hook! 'some-mode-hook
               #'do-something
               #'do-something-else)

    (add-hook! 'some-mode-hook
      (message "Hello"))
2019-07-26 20:17:29 +02:00
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
3f195614d9 Normalize :leader/:localleader keybinds
Evil states no longer apply to them. Also removes x-alt-keysym.
2018-12-23 23:54:27 -05: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
edc9bf70af Delete trailing whitespace, globally, by default
Also adds doom|disable-delete-trailing-whitespace hook, which can be
used to disable this behavior on a per-buffer basis. If you want to turn
off this global behavior:

  (remove-hook 'write-file-functions #'delete-trailing-whitespace)
2018-08-30 20:36:15 +02:00
743e43add1 lang/racket: redo keybinds
+ Improve verbal mneumonics and enforce localleader conventions (e.g. h
  = help, g = goto)
+ Remove keybinds that other features replace (like smartparens or
  lookup handlers).
+ Alphabetize keybinds for easier skimming.
2018-08-19 00:09:04 +02:00
99815f8b98 lang/racket: more sensible lookup handlers
definition: racket-visit-definition
documentation: racket-describe
2018-08-19 00:08:32 +02:00
81c3f3f024 lang/racket: remove redundant localleader keybinds
These already exist on TAB (for all users) and gc/= for evil users (or
M-;/C-M-\ for non-evil users).
2018-08-18 23:51:58 +02:00
a3c0985aa0 lang/racket: remove keybind :desc properties #814 2018-08-18 23:50:28 +02:00
b8f1b90744 Remove set-company-backend!
Since racket-mode uses company-capf, it isn't necessary to set any default backends for it.
2018-08-13 23:57:10 +02:00
f143a03221 Use set-company-backend!
Fixes incorrect usage of setq-local in a global context.
2018-08-13 02:59:38 +02:00
2f7282af12 Input-method optional 2018-08-12 13:52:35 -03:00
36ac08f3fa Company-capf needs to be the first 2018-08-12 13:13:25 -03:00
c24a3671b1 lang/racket: setq racket-smart-open-bracket-enable
Instead of doing so in a hook (which is harder to customize).

Addresses #772
2018-07-30 02:57:50 +02:00
253660095f lang/racket: minor reformatting 2018-07-29 19:31:33 +02:00
53b246ef8c Remove racket-mode eval handler
The quickrun package already defines it.
2018-07-29 19:31:33 +02:00
238e37a171 lang/racket: refactor and cleanup
+ Removed highlight-quoted block because `highlight-quoted-mode` is already autoloaded by the package
+ Removed org-babel-do-load-languages because lang/org/+babel already has a built-in autoloader for ob-* packages.
+ Removed flycheck-mode from racket-mode hook because it is enabled globally in :feature syntax-checker
+ Removed highlight-numbers-mode from racket-mode-hook because it is enabled on prog-mode-hook in core-ui (as of #770)
+ Fix racket popup rule regexp
+ Remove popup rules that were redundant with the defaults
+ Remove racket-mode-specific company-frontends value, looks like personal preference, otherwise should be set in a separate hook function that is easily recognized and disabled, if the user desires.
+ Remove :interpreter and :mode properties because they are already registered by the racket-mode package.
+ Move racket-unicode-input-method-enable into :hook property (to defer the config)
2018-07-29 17:22:01 +02:00
d8cd4bdf03 Add Racket lang 2018-07-29 10:50:17 -03:00