Commit graph

11354 commits

Author SHA1 Message Date
Henrik Lissner
94ea4aa7dc
docs: add examples.org
This adds the basic framework of docs/examples.org, including the former
contents of demo.org in :lang emacs-lisp. elisp-demo has also been
reconfigured to search it instead.

Keep in mind that examples.org references a few things in as-of-yet
published documentation. This will be rectified soon.
2022-09-16 01:14:20 +02:00
Henrik Lissner
e71daf5cc3
tweak(emacs-lisp): elisp indentation for data/plists
This was adapted from
https://www.reddit.com/r/emacs/comments/d7x7x8/finally_fixing_indentation_of_quoted_lists/.
It fixes the indentation of quoted data (and plist keywords) so they're
indented like data, rather than function arguments, like so:

  BEFORE:
    `(foo bar baz
          doom emacs)
    '(:foo 1
           :bar 2
           :baz 3)
    '(:foo 1
           2
           3
           :bar 4)
    (:foo 1
          :bar 2)
    (:foo 1
          ;; test comment
          :bar 2)
    (:foo 1
          2
          :bar 3)

  AFTER:
    `(foo bar baz
      doom emacs)
    '(:foo 1
      :bar 2
      :baz 3)
    '(:foo 1
      2
      3
      :bar 4)
    ;; only align unquoted keywords if keywords start each line:
    (:foo 1
     :bar 2)
    (:foo 1
     ;; test comment
     :bar 2)
    (:foo 1
          2
          :bar 3)

Also, I added a way to declare that plists in an macro's arguments
should be indented like data:

  (put 'map! 'indent-plists-as-data t)

  BEFORE:
    (map! :localleader
          :map emacs-lisp-mode-map
          (:prefix ("d" . "debug")
                   "f" #'+emacs-lisp/edebug-instrument-defun-on
                   "F" #'+emacs-lisp/edebug-instrument-defun-off))

  AFTER:
    (map! :localleader
          :map emacs-lisp-mode-map
          (:prefix ("d" . "debug")
           "f" #'+emacs-lisp/edebug-instrument-defun-on
           "F" #'+emacs-lisp/edebug-instrument-defun-off))

There was a third improvement I was hoping to include, namely,
proper indentation of interpolated forms:

  BEFORE:
    `(foo
      bar
      ,(if t
           'baz
         'boo))

    `(foo
      bar
      (if t
          baz
        boo))

  AFTER:
  `(foo
    bar
    ,(if t
          'baz
        'boo))

  `(foo
    bar
    (if t
     baz
     boo))

But this was removed because it breaks indentation for quoted macro
forms (or dynamic elisp programming):

  BEFORE: (good)
    `(with-temp-buffer
       (if (always)
           (message
            "Hello %s"
            user-login-name)
         (message
          "Goodbye %s"
          user-login-name)))

  AFTER: (bad)
    `(with-temp-buffer
      (if (always)
       (message
        "Hello %s"
        user-login-name)
       (message
        "Goodbye %s"
        user-login-name)))

Ref: https://www.reddit.com/r/emacs/comments/d7x7x8/finally_fixing_indentation_of_quoted_lists/'
2022-09-16 01:14:20 +02:00
Henrik Lissner
a18ea683d2
refactor(python): autoload syntax highlighter fix for 28.1
A summary of the issue:
- emacs-mirror/emacs@c44908c059 broke syntax highlighting for
  python-mode.
- emacs-mirror/emacs@a8acb9516e fixes the issue shortly after, but the
  fix did not make it into the 28.1 release (but made it into 28.2).
- This fix was deployed in #6414 (773122f1ec).
- This commit ensures the fix is only effective for 28.1 users, and
  documents it for posterity.

Ref: #6414
Ref: emacs-mirror/emacs@c44908c059
Ref: emacs-mirror/emacs@a8acb9516e
Amend: 773122f1ec
Co-authored-by: dani84bs <dani84bs@users.noreply.github.com>
2022-09-16 01:14:20 +02:00
Henrik Lissner
afa154db27
refactor!(emacs-lisp): flycheck config in non-packages
BREAKING CHANGE: This performs the following backwards-incompatible
changes:

- Replaces `+emacs-lisp-reduce-flycheck-errors-in-emacs-config-h` with a
  `+emacs-lisp-non-package-mode` minor-mode.
- Removed the `+emacs-lisp-disable-flycheck-in-dirs` variable, as this
  mechanism no longer checks a directory list to detect a "non-package".

If you've referenced either of these symbols, you'll need to
update/remove them from your config. No extra config is needed
otherwise.

Why: Doom has always tried to reduce the verbosity of Flycheck when
viewing elisp config files or scripts (i.e. non-packages). These are so
stateful that the byte-compiler, package-lint, and checkdoc inundate
users with false positives that are more overwhelming than helpful.

The heuristic for this has always been a simple "is this file in
$DOOMDIR or $EMACSDIR", but this wasn't robust enough, especially in
cases where symlinking was involved, so I've employed a new, more
general heuristic for detecting non-package files:

- The file isn't a theme in `custom-theme-load-path`,
- The file doesn't have a (provide ...) or (provide-theme ...)
  statement whose first argument matches the file name,
- The file lives in a project with a .doommodule file (doom modules
  never have convention package files in them),
- Or the file is a dotfile (like .dir-locals.el or .doomrc).

I've also tweaked byte-compile-warnings to yield a little more output,
but not by much. Whether this is too permissive or not will require
further testing to determine.

What's more, I've updated this to reflect recent changes to Doom's
startup process (in c05e615).

Ref: c05e61536e
2022-09-12 11:45:56 +02:00
Sean Farley
2548632600 fix(mu4e): force the account stripe face to be non-italic
With mu4e came a new face for the header view. While this is nice for
the text, it had the consequence of making the account stripe (the
vertical bar) a bit jarring. This patch fixes that behavior to make the
stripe non-italic by append `'default` to the face.
2022-09-10 23:54:31 +02:00
tecosaur
01bb743c6c
tweak(mu4e): set last-child thread symbol
Also tweak the line order and whitespace while I'm at it, to show the
overall styling more clearly.
2022-09-10 23:52:36 +02:00
Krzysztof Baranowski
836d229636 fix(nix): remove :mode hook for nix-drv-mode
The nix-mode package already does this and it shadows other entries for the .drv files in auto-mode-alist (namely Guix derivations).

Ref: 34d51e2731/nix-drv-mode.el (L48)
2022-09-10 23:37:50 +02:00
Henrik Lissner
b66ccaeca0
fix(agda): tree-sitter compatibility with agda2-mode
Tree-sitter-lang recognized agda-mode, but not agda2-mode.
2022-09-10 18:36:24 +02:00
Henrik Lissner
49f4ec3b10
feat(tree-sitter): add set-tree-sitter-lang! autodef 2022-09-10 18:36:24 +02:00
Gerry Agbobada
2cd8f85bac fix(debugger): fix dap-ui conditional loading
Probably missed when adding eglot support code in the module
2022-09-07 16:23:24 +02:00
Henrik Lissner
9e3d99277e
docs(everywhere): update CLI command
6c0b7e1 introduced a new convention for CLIs defined by Doom's modules:
to namespace them under `doom +MODULE ...`. What was once 'doom
everywhere' is now 'doom +everywhere', so the docs needed correcting.

Ref: 6c0b7e1530
2022-09-07 02:34:57 +02:00
Andrew Whatson
71e0190618 bump: :lang scheme
emacs-geiser/chicken@79a9ac78f4 -> emacs-geiser/chicken@a480598b59
emacs-geiser/gauche@fd52cbaed9 -> emacs-geiser/gauche@8ff743f641
emacs-geiser/geiser@9507e81a07 -> emacs-geiser/geiser@550d57d347
emacs-geiser/guile@c641fcc50b -> emacs-geiser/guile@b2d6f398e3
flatwhatson/flycheck-guile@e46d6e5453 -> flatwhatson/flycheck-guile@e58ceb8b51
2022-09-07 01:40:10 +02:00
Andrew Whatson
5fb96f2886 fix(scheme): restore repl-per-project for scheme
Geiser commit 476897e4f8a1 introduced `geiser-repl-per-project-p` which
defaults to false, breaking our repl-per-project support.  Previously,
setting `geiser-repl-current-project-function` was sufficient.
2022-09-07 01:40:10 +02:00
Henrik Lissner
a1c9d40ee8
docs(rust): de-emphasize rls
RLS has been deprecated for rust-analyzer, so it's best that our rust
module refrain from advertising it so prominently.

Ref: https://blog.rust-lang.org/2022/07/01/RLS-deprecation.html
2022-09-07 01:25:22 +02:00
Henrik Lissner
63b0ebeda7
refactor!(rust): remove racer and default to +lsp
BREAKING CHANGE: Racer is no longer developed and its project page
recommends using rust-analyzer instead. Moreover, users have reported
issues trying to build/install it on recent versions of rust, so I've
removed support for Racer from Doom, and now default solely to LSP for
IDE features.

Users that want these features will need to activate the module's +lsp
flag (along with the :tools lsp module) and install rust-analyzer. See
the module's README for instructions.

Close: #6705
Co-authored-by: c1ttim <c1ttim@users.noreply.github.com>
2022-09-07 01:25:18 +02:00
Henrik Lissner
20c50755e8
fix(magit): end-of-file error
Due to an unbalanced paren in d8f87ad.

Amend: d8f87ada96
2022-09-07 00:55:51 +02:00
Henrik Lissner
ea84212d0a
fix(magit): void-function (:files) error
Due to a missed syntax error in d8f87ad.

Amend: d8f87ada96
2022-09-07 00:52:49 +02:00
casswedson
d8f87ada96 fix(magit): only install forge if asked 2022-09-07 00:25:52 +02:00
Jen-Chieh Shen
f8bd14ebc3
bump: ts-fold
jcs090218/ts-fold@01d6485398 -> emacs-tree-sitter/ts-fold@01d6485398

The repo has moved.
2022-09-07 00:24:57 +02:00
Matthieu Petiteau
ba859fcfc0 nit(vertico): add missing function docstring 2022-09-07 00:22:25 +02:00
Matthieu Petiteau
3694969dd4 nit(vertico): typo in docstring 2022-09-07 00:22:25 +02:00
Ralf Beckmann
829998e70b docs(pdf): fix instructions to build epdfinfo
The documentation claimed that epdinfo will be built as soon as a pdf
file is opened. However, support for automatically building epdfinfo was
removed in the commit referenced below.

Ref: daa50557a4
2022-09-07 00:20:54 +02:00
Daniel Radetsky
3e98f11d9b fix(csharp): add dep pkg for sln-mode 2022-09-07 00:19:23 +02:00
Ellis Kenyo
c6cfee63b4 fix(dart): enable rainbow-delimiters in dart-mode 2022-09-07 00:16:04 +02:00
Henrik Lissner
3ae8c520d5
nit(vc-gutter): reformat annotated comments 2022-09-06 23:41:28 +02:00
Alex Birdsall
5ca8c75644 fix(file-templates): better recognize shell types
There are some conventional files strongly associated with a non-bash
shell which do not use an explicit `.zsh` file extension (e.g.
`.zprofile`); the old logic would always use the `#!/usr/bin/env bash`
shebang in these cases, which is a tiny little bummer.
2022-08-19 11:23:56 +02:00
Ralf Beckmann
5a0f1fe1cc docs(mu4e): mention variable renamed in mu-1.8 2022-08-19 11:22:46 +02:00
Henrik Lissner
4c9df9bfc6
fix: partially revert OS detection changes
These changes snuck into ad6a3d0, but have not been implemented yet, so
some OS-specific functionality was orphaned.

Amend: ad6a3d0f33
2022-08-18 17:08:16 +02:00
Henrik Lissner
aa54383b5d
refactor: deprecate doom-etc-dir for doom-data-dir
doom-etc-dir will be renamed to doom-data-dir, to better reflect its
purpose, and align it with XDG_DATA_HOME (where it will be moved to in
v3, where Doom will begin to obey XDG directory conventions more
closely).
2022-08-14 20:43:35 +02:00
Henrik Lissner
a5c80fcb4b
refactor: deprecate doom-private-dir for doom-user-dir
- Deprecates the doom-private-dir variable in favor of doom-user-dir.
- Renames the pseudo category for the user's module: :private -> :user.
- Renames the doom-private-error error type to doom-user-error.

Emacs uses the term "user" to refer to the "things" in user space (e.g.
user-init-file, user-emacs-directory, user-mail-address, xdg-user-dirs,
package-user-dir, etc), and I'd like to be consistent with that. It also
has the nice side-effect of being slightly shorter. I also hope
'doom-user-error' will be less obtuse to beginners than
'doom-private-error'.
2022-08-14 20:43:35 +02: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
Henrik Lissner
0407621aff
refactor: deprecate EMACS2[89]+, NATIVECOMP, MODULES
To reduce redundancy, remove the maintenance hassle that version
constants would impose later on, and rely on built-in
facilities (featurep) more over global variables or doomisms, these
global constants have been deprecated in favor of Emacs "features":

- EMACS28+   -- replace with (> emacs-major-version 27)
- EMACS29+   -- replace with (> emacs-major-version 28)
- NATIVECOMP -- replace with (featurep 'native-compile)
- MODULES    -- replace with (featurep 'dynamic-modules)

(These constants will be formally removed when v3 is released. The IS-*
constants are likely next, but I haven't decided on their substitutes
yet)

I also decided to follow native-compile's example and provide features
for Emacs' system features (since system-configuration-features' docs
outs itself as a poor method to detect features):

- dynamic-modules
- jansson
- native-compile -- this one already exists, but will instead be removed
  if it's non-functional; i.e. (native-comp-available-p) returns nil.

These are now detectable using featurep, which is fast and built-in.
2022-08-14 20:43:35 +02:00
Henrik Lissner
3239ab8b2e
nit(mu4e): neutralize comments
Some of our comments/docs can come off as disparaging or snide. They're
glimpses of unfiltered frustration or snarky rubber ducking gone too
far, something I can totally sympathize with, as a scatterbrained
tinkerer, unwittingly made responsible for a lot of work that isn't mine
because of Doom's position as a middleman. But now that Doom has a
veritable userbase, I'd like to hold it to a higher standard.

Light-hearted banter and aired grievances in our source code,
documentation, or community are fine if focused on the problem or the
personal/shared experiences of the community (things that offer value or
amusement to others), but it is never acceptable to attack people or
their efforts. Especially not the very people on whose shoulders Doom
stands.

I sincerely apologize if these have offended you.

Amend: b07614037f
2022-08-14 20:36:42 +02:00
efim
02bb28dc82
fix(org): respect org-table-automatic-realign
Co-authored-by: efim <efim.nefedov@nordigy.ru>
2022-08-12 21:03:39 +02:00
joh13266
eb65ef169b fix(ocaml): ocaml tree-sitter function typo 2022-08-12 21:02:30 +02:00
Itai Y. Efrat
0e6682612f feat(default): use consult-flycheck when applicable 2022-08-12 21:01:56 +02:00
Henrik Lissner
de62c5449d
nit(vc-gutter): add summary tags to comments
A new convention I'm slowly rolling out to modules to help readers
quickly identify the purpose of a change. E.g.

  UX    - a change done to improve user experience
  STYLE - for aesthetics
  FIX   - addresses a perceived or potential issue
  PERF  - intended to improve performance

Combined tags will be delimited with commas. E.g. "UX,PERF:"

There may be more later, and these will be further documented in the new
docs about to come up.
2022-08-10 14:06:52 +02:00
Henrik Lissner
7598485e1a
bump: :emacs vc
magit/magit@846d153a2e -> magit/magit@8a0cc83eff
magit/git-modes@62fbf2e5b8 -> magit/git-modes@eca3bb42ea
https://codeberg.org/pidu/git-timemachine@3381797bcbf9 -> emacsmirror/git-timemachine@ca09684e94

Moved to a git-timemachine mirror because codeberg.org has uptime
issues.
2022-08-10 13:18:34 +02:00
Henrik Lissner
118f0c416a
refactor(evil): replace evil-visual-update-x-selection advice
With the new evil-visual-update-x-selection-p setting.

Also adds a more descriptive comment to this design choice.
2022-08-10 13:18:34 +02:00
Henrik Lissner
bd597ffda4
docs(vc-gutter): document module's hacks 2022-08-10 13:18:34 +02:00
Henrik Lissner
99b0b70c49
fix(vc-gutter): remove advice removal for diff-hl-overlay-modified
Originally, this intended to *stop* diff-hl from too aggressively
deleting the diff overlays while editing. This is either no longer the
case or the old advice was mistaken; the intended behavior is achieved
without it.
2022-08-10 13:18:34 +02:00
Henrik Lissner
d55d7f3088
feat(vc-gutter): shrink revert-hunk popup to contents 2022-08-10 13:18:33 +02:00
Henrik Lissner
a0a4aa81c1
fix(vterm): +vterm/toggle creating duplicates
If vterm-buffer-name-string is set to non-nil, then vterm will rename
the buffer after it is initialized. Since +vterm/toggle looks up buffers
by name, it will lose track of them, causing it to create a new one on
each invocation. With this, it will no longer lose track of them.

Fix: #6651
2022-08-09 17:18:35 +02:00
Henrik Lissner
4cf5ae8be1
fix(literate): tangling loop on 'doom sync'
Why the setenv call wasn't persisted into session restart (#6642) needs
further investigation, but for now this seems to solve the issue.

Fix: #6642
2022-08-09 17:12:56 +02:00
Henrik Lissner
24623f9959
refactor!(dired): move diff-hl config to :ui vc-gutter
BREAKING CHANGE: users who are used to diff-hl displaying diffs in dired
will notice they have vanished. diff-hl's conig has been moved to :ui
vc-gutter +diff-hl (added in 27a448b). Enable it to get it back.

Ref: 27a448b04b
2022-08-09 16:30:43 +02:00
Henrik Lissner
e76f327e0a
fix(vc-gutter): apply +pretty to diff-hl-dired-mode
Amend: cd9bc5a1fd
2022-08-09 16:30:43 +02:00
Henrik Lissner
e30eb03f83
refactor(vc-gutter): remove redundant hooks
The refresh hooks address the stage/unstage cases already.
2022-08-09 16:30:43 +02:00
Henrik Lissner
15b00b78fe
refactor(vc-gutter): use local modes instead of global 2022-08-09 16:30:43 +02:00
Bruce D'Arcus
b06fd63dcb bump: :tools biblio
andras-simonyi/citeproc-el@9f783967c1 -> andras-simonyi/citeproc-el@406bd9964f
emacs-citar/citar@b24b5b94b7 -> emacs-citar/citar@146f2cb5a3
tmalsburg/helm-bibtex@aa775340ba -> tmalsburg/helm-bibtex@ce8c17690d

Also add citar-embark, which now contains the embark functionality in a
separate minor mode package, and explicitly add parsebib, so we can pin
the precise version.
2022-08-08 23:41:06 +02:00
Henrik Lissner
13b3304c08
bump: :lang org
emacs-straight/org-mode@5a49cc5f4f -> emacs-straight/org-mode@00adad9357
hakimel/reveal.js@039972c730 -> hakimel/reveal.js@e219184f37
oer/org-re-reveal@f184e66e39 -> oer/org-re-reveal@6f78a0a228
org-roam/org-roam@e435581215 -> org-roam/org-roam@7f453f3fff

- Fixes "Variable binding depth exceeds max-specpdl-size" error when
  opening Doom's docs in doom-docs-org-mode. See 1abcf91.

Ref: 1abcf913aa
2022-08-08 22:28:14 +02:00