Commit graph

135 commits

Author SHA1 Message Date
Henrik Lissner
659f7bfc71
refactor!: deprecate IS-* OS constants
BREAKING CHANGE: This deprecates the IS-(MAC|WINDOWS|LINUX|BSD) family
of global constants in favor of a native `featurep` check:

  IS-MAC      ->  (featurep :system 'macos)
  IS-WINDOWS  ->  (featurep :system 'windows)
  IS-LINUX    ->  (featurep :system 'linux)
  IS-BSD      ->  (featurep :system 'bsd)

The constants will stick around until the v3 release so folks can still
use it -- and there are still some modules that use it, but I'll phase
those uses out gradually.

Fix: #7479
2024-02-04 17:54:29 -05:00
Ellis Kenyő
9787022b83
refactor!: replace all-the-icons with nerd-icons
BREAKING CHANGE: This commit replaces all-the-icons with nerd-fonts. Any
all-the-icons-* function calls or variable references in your private
config will break and should be replaced with their nerd-icons-*
equivalent. That said, Doom will continue to install all-the-icons for
a while, so feel free to load it if you don't want to fully commit to
the change yet.

This change is happening because nerd-icon has wider support for GUI and
TUI Emacs; has a larger, more consistent selection of symbols; plus unicode
coverage.

Fix: #7368
Close: #6675
Close: #7364
2023-09-14 01:03:55 +02:00
Henrik Lissner
4158e5124a
tweak(helm): helm-candidate-number-limit = 150
Ref: #6676
Co-authored-by: johanwiden <johanwiden@users.noreply.github.com>
2023-02-23 22:54:02 -05:00
Henrik Lissner
86d0478acf
fix(helm): all-the-icons support
Ref: #6676
Co-authored-by: johanwiden <johanwiden@users.noreply.github.com>
2023-02-23 22:54:02 -05:00
Henrik Lissner
1bfa90621b
tweak(helm): use emacs completion instead
This may fix +fuzzy, as well.

Ref: #6676
Co-authored-by: johanwiden <johanwiden@users.noreply.github.com>
2023-02-23 22:54:01 -05:00
Henrik Lissner
8789e2e5c6
refactor(helm): reformat and revise comments
Ref: #6676
Co-authored-by: johanwiden <johanwiden@users.noreply.github.com>
2023-02-23 22:54:01 -05:00
Henrik Lissner
928902213f
refactor(helm): use helm-posframe
The old, in-house implementation no longer works (and reportedly causes
crashes).

Ref: #6676
Co-authored-by: johanwiden <johanwiden@users.noreply.github.com>
2023-02-23 22:54:01 -05:00
Henrik Lissner
fcf587fbe8
tweak(helm): show mode-line by default
Let's not hide the minibuffer. It may be detrimental in cases where
certain helm commands actually display helpful information there. And
rather than design edge cases for a package I don't dogfood, and push
minimalism onto helm users, I'll lean onto the defaults more instead.

Ref: #6676
Co-authored-by: johanwiden <johanwiden@users.noreply.github.com>
2023-02-23 22:53:57 -05:00
Henrik Lissner
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
Itai Y. Efrat
34fae1c01c Remove remaining Emacs27+ checks
- Remove remaining `EMACS27+` checks, since the whole codebase is
  assumed to run at version 27 or above now
- Remove `EMACS27+` definition since it's no longer needed
2021-07-10 16:03:41 +03:00
Itai Y. Efrat
b3dfd4758d don't explicitly set projectile-completion-system
The default value is `'auto`, which handles the detection of the active
completion system, see the definition of `projectile-completing-read`.
2021-07-03 15:20:59 +03:00
Ellis Kenyő
473f4b1e12
Improved Helm module (#4561)
* Improved Helm module

+ Added README
+ Added posframe
+ Added icons

* Requested changes

* Remove helm-posframe and merge upstream

* Removed redundant line
2021-02-24 11:02:32 -05:00
Henrik Lissner
28b3ad4529 completion/helm: fix +childframe 2021-02-16 11:44:59 -05:00
Ralf Beckmann
4e7ce47825 Demote overly aggressive completion styles
Use the Helm completion styles only as a fallback. They match so eagerly
that they disrupt other facilities like company.
2020-11-05 01:41:46 +01:00
Henrik Lissner
8bf902d5f4
General refactors & reformatting across the board 2020-06-04 20:13:28 -04:00
Henrik Lissner
0e851ace9b
Backport bits of CLI rewrite
The rewrite for Doom's CLI is taking a while, so I've backported a few
important changes in order to ease the transition and fix a couple bugs
sooner.

Fixes #2802, #2737, #2386

The big highlights are:

- Fix #2802: We now update recipe repos *before* updating/installing any
  new packages. No more "Could not find package X in recipe repositories".

- Fix #2737: An edge case where straight couldn't reach a pinned
  commit (particularly with agda).

- Doom is now smarter about what option it recommends when straight
  prompts you to make a choice.

- Introduces a new init path for Doom. The old way:
  - Launch in "minimal" CLI mode in non-interactive sessions
  - Launch a "full" interactive mode otherwise.
  The new way
  - Launch in "minimal" CLI mode *only* for bin/doom
  - Launch is a simple mode for non-interactive sessions that still need
    access to your interactive config (like async org export/babel).
  - Launch a "full" interactive mode otherwise.

  This should fix compatibility issues with plugins that use the
  async.el library or spawn child Emacs processes to fake
  parallelization (like org's async export and babel functionality).

- Your private init.el is now loaded more reliably when running any
  bin/doom command. This gives you an opportunity to configure its
  settings.

- Added doom-first-{input,buffer,file}-hook hooks, which we use to queue
  deferred activation of a number of packages. Users can remove these
  modes from these hooks; altogether preventing them from loading,
  rather than waiting for them to load to then disable them,
  e.g. (after! smartparens (smartparens-global-mode -1)) -> (remove-hook
  'doom-first-buffer #'smartparens-global-mode)

  Hooks added to doom-first-*-hook variables will be removed once they
  run.

  This should also indirectly fix #2386, by preventing interactive modes
  from running in non-interactive session.

- Added `doom/bump-*` commands to make bumping modules and packages
  easier, and `doom/bumpify-*` commands for converting package!
  statements into user/repo@sha1hash format for bump commits.

- straight.el is now commit-pinned, like all other packages. We also
  more reliably install straight.el by cloning it ourselves, rather than
  relying on its bootstrap.el.

  This should prevent infinite "straight has diverged from master"
  prompts whenever we change branches (though, you might have to put up
  with it one more after this update -- see #2937 for workaround).

All the other minor changes:

- Moved core/autoload/cli.el to core/autoload/process.el
- The package manager will log attempts to check out pinned commits
- If package state is incomplete while rebuilding packages, emit a
  simpler error message instead of an obscure one!
- Added -u switch to 'doom sync' to make it run 'doom update' afterwards
- Added -p switch to 'doom sync' to make it run 'doom purge' afterwards
- Replace doom-modules function with doom-modules-list
- The `with-plist!` macro was removed, since `cl-destructuring-bind`
  already serves that purpose well enough.
- core/autoload/packages.el was moved into core-packages.el
- bin/doom will no longer die if DOOMDIR or DOOMLOCALDIR don't have a
  trailing slash
- Introduces doom-debug-variables; a list of variables to toggle on
  doom/toggle-debug-mode.
- The sandbox has been updated to reflect the above changes, also:
  1. Child instances will no longer inherit the process environment of
     the host instance,
  2. It will no longer produce an auto-save-list directory in ~/.emacs.d
2020-05-15 01:33:52 -04:00
Henrik Lissner
06d5d5e6c0
General refactors, reformatting & comment revision 2020-04-23 23:56:17 -04:00
Henrik Lissner
2e6e191da3
Remove helm-descbinds remapping
helm-descbinds-mode overrides describe-bindings itself.
2020-04-11 00:36:17 -04:00
Brian McGillion
5a14dcd48e Add helm-descbinds
This package allows for easier navigation of the assigned bindings.
The inbuilt describe-bindings (C-h b b) feature is remapped to the helm
equivalent.

Signed-off-by: Brian McGillion <brian@ssrc.tii.ae>
2020-04-11 01:24:29 +04:00
Henrik Lissner
83b6f74d11
Minor refactors & reformatting 2020-03-27 21:39:27 -04:00
Ralf Beckmann
cf19fe739c Apply some minor changes to the helm module
Remove usage of the following variables, since they are no longer
present in helm's source code:

helm-M-x-fuzzy-match
helm-completion-in-region-fuzzy-match

Also remove the usage of the deprecated helm-mode-fuzzy-match variable.
Instead, modify completing-styles so that helmized commands will use
multi- or fuzzy-matching, respectively.
2020-03-14 20:52:33 +01:00
Jonas Møller
93ebe4a4bb Moved adding of helm-hide-minibuffer-maybe hook
From a racy when condition in the posframe autoload, into an
unconditional hook in the helm config.el file.
2020-01-23 12:58:39 +01:00
Jonas Møller
f6dc8d0202 Actually fix #2397
Added the setq to the wrong (when (featurep!)) initially.
2020-01-22 12:19:56 +01:00
Jonas Møller
73ad5ddc83 Fixes #2397 2020-01-22 12:06:02 +01:00
Henrik Lissner
b5a279311c
Fix #2317: helm-mode-handle-completion-in-region = t
It turns out that helm can handle completing ex constructs (e.g. globs),
so this setting is no longer needed.
2020-01-07 00:14:46 -05:00
Henrik Lissner
996188250b
Minor refactors & comment revision 2019-12-06 17:16:34 -05:00
Henrik Lissner
1a4add4630
ivy-height = 20 for swiper-isearch helm users 2019-12-05 16:11:19 -05:00
Henrik Lissner
c1e3e3cc04
Fix helm-project-* override advice 2019-12-05 16:10:57 -05:00
Henrik Lissner
6facc534ce
completion/helm: replace helm-ag with helm-rg 2019-12-05 16:10:46 -05:00
Henrik Lissner
c44185168d
completion/helm: remove +helm-project-search-engines
No longer used as of a66872fe2
2019-11-17 23:57:45 -05:00
Henrik Lissner
dca4ff7887
completion/helm: remove redundant package cookies 2019-11-17 23:43:41 -05:00
Henrik Lissner
99cd52e70f
💥 Drop Emacs 25.x support
Emacs 26.1 is Doom's new minimum supported version

Closes #2026
2019-11-08 16:02:06 -05:00
Henrik Lissner
6ba7c97501
Remove the_platinum_searcher support
I'm reducing the scope of our project search so we can eventually focus
on ripgrep. By specializing I can extend Doom's features for project
searching.
2019-10-10 22:02:18 -04:00
Henrik Lissner
3a026c0a8c
completion/helm: fix void-variable helm-completing-read-handlers-alist error 2019-09-29 01:58:22 -04:00
Henrik Lissner
a8e7c4fd45
Move helm-org config to completion/helm 2019-09-28 23:08:44 -04:00
Henrik Lissner
19ef103392
completion/helm: add mdfind support to helm-locate 2019-09-22 13:33:26 -04:00
Henrik Lissner
f4d17707e7
config/default: bind SPC f l to locate
This will be remapped to counsel-locate or helm-locate if the ivy/helm
modules are enabled.
2019-09-22 12:09:51 -04:00
Henrik Lissner
6bd2eaf2c8
completion/helm: remove obsolete advice
Doesn't appear to be needed anymore.
2019-08-22 18:56:25 -04:00
Henrik Lissner
40eb9cf17e
Replace helm-projectile-* commands with +helm/* #1589 2019-07-29 21:23:51 +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
Henrik Lissner
9d5e8fdda4
completion/helm: use ;;;###package cookies 2019-05-20 21:09:11 -04:00
Henrik Lissner
a7069b93f2
Remove vestigial imenu-anywhere remappings 2019-05-20 21:09:10 -04:00
Henrik Lissner
a4c5396558
Add better-jumper
Replaces evil's jumplist; makes its functionality available for non evil
users.
2019-04-24 18:16:04 -04:00
Henrik Lissner
77e4cc4d58
💥 Remove :feature category
:feature was a "catch-all" category. Many of its modules fit better in
other categories, so they've been moved:

- feature/debugger -> tools/debugger
- feature/evil -> editor/evil
- feature/eval -> tools/eval
- feature/lookup -> tools/lookup
- feature/snippets -> editor/snippets
- feature/file-templates -> editor/file-templates
- feature/workspaces -> ui/workspaces

More potential changes in the future:

- A new :term category for terminal emulation modules (eshell, term and
  vterm).
- A new :os category for modules dedicated to os-specific functionality.
  The :tools macos module would fit here, but so would modules for nixos
  and arch.
- A new :services category for web-service integration, like wakatime,
  twitter, elfeed, gist and pastebin services.
2019-04-24 18:16:04 -04:00
Henrik Lissner
4daa9271a0
Introduce general.el & rewrite map!
+ Now uses an overriding keymap for leader keys, so that it is always
  available, even outside of normal/visual states. In insert/emacs
  states, or in sessions where evil is absent, an alternative prefix is
  used for leader/localleader keys. See these variables:
  + doom-leader-prefix
  + doom-leader-alt-prefix
  + doom-localleader-prefix
  + doom-localleader-alt-prefix
+ Keybinds now support alternative prefixes through the new :alt-prefix
  property. This is useful for non-evil users and non-normal evil
  states. By default, this is M-SPC (leader) and M-SPC m (localleader).
+ Removed +evil-commands flag from config/default (moved to
  feature/evil/+commands.el).
+ config/default/+bindings.el has been split into
  config/default/+{evil,emacs}-bindings.el, which one is loaded depends
  on whether evil is present or not. The latter is blank, but will soon
  be populated with a keybinding scheme for non-evil users (perhaps
  inspired by #641).
+ The define-key! macro has been replaced; it is now an alias for
  general-def.
+ Added unmap! as an alias for general-unbind.
+ The following modifier key conventions are now enforced for
  consistency, across all OSes:
    alt/option      = meta
    windows/command = super
  It used to be
    alt/option      = alt
    windows/command = meta
  Many of the default keybinds have been updated to reflect this switch,
  but it is likely to affect personal meta/super keybinds!

The map! macro has also been rewritten to use general-define-key. Here
is what has been changed:

+ map! no longer works with characters, e.g. (map! ?x #'do-something) is
  no longer supported. Keys must be kbd-able strings like "C-c x" or
  vectors like [?C-c ?x].
+ The :map and :map* properties are now the same thing. If specified
  keymaps aren't defined when binding keys, it is automatically
  deferred.
+ The way you bind local keybinds has changed:

    ;; Don't do this
    (map! :l "a" #'func-a
          :l "b" #'func-b)
    ;; Do this
    (map! :map 'local "a" #'func-a
                      "b" #'func-b)

+ map! now supports the following new blocks:
  + (:if COND THEN-FORM ELSE-FORM...)
  + (:alt-prefix PREFIX KEYS...) -- this prefix will be used for
    non-normal evil states. Equivalent to :non-normal-prefix in general.
+ The way you declare a which-key label for a prefix key has changed:

    ;; before
    (map! :desc "label" :prefix "a" ...)
    ;; now
    (map! :prefix ("a" . "label") ...)

+ It used to be that map! supported binding a key to a key sequence,
  like so:

    (map! "a" [?x])  ; pressing a is like pressing x

  This functionality was removed *temporarily* while I figure out the
  implementation.

Addresses: #448, #814, #860
Mentioned in: #940
2018-12-22 04:14:43 -05:00
Henrik Lissner
0312f8656a
completion/helm: remove +helm-global-prompt
This could hide helpful prompt text.

Addresses #923
2018-10-03 00:02:01 -04:00
Henrik Lissner
394633b5d8
Leave lifecycle management of helm buffers to helm
Could cause buffer processes to get killed, inadvertently.
2018-10-01 19:58:23 -04:00