Commit graph

511 commits

Author SHA1 Message Date
Henrik Lissner
f4382b45fd Remove redundant mode from so-long-minor-modes
Already in its default value.
2021-05-06 04:27:32 -04:00
Jan Felix Langenbach
3c00ddcebd Fix smartparens pairing ' and ` in the minibuffer 2021-04-28 21:50:19 +02:00
Henrik Lissner
ce65645fb8 Minor refactors & comment revision 2021-03-27 18:27:19 -04:00
Henrik Lissner
6cb5c381b8 Disable dtrt-indent in pascal-mode
Throws wrong-type-argument number-or-marker-p errors otherwise, because
dtrt-indent--for-each-indentation calls
dtrt-indent--skip-to-end-of-match with four nil arguments (presumably
because there is no pascal entry in dtrt-indent-language-syntax-table)
and there is no fall back to its default entry.
2021-02-25 18:34:31 -05:00
Henrik Lissner
d52abd37f7 Fix #4691: half revert 7e9911f642
Seems this was not fixed upstream.
2021-02-24 18:06:30 -05:00
Henrik Lissner
79f2f42b95 Persist Emacs registers across sessions
Has the side effect of persisting evil macros between
sessions (equivalent to vim's "set viminfo")
2021-02-21 14:44:59 -05:00
Henrik Lissner
7e9911f642 Bump :core
domtronn/all-the-icons.el@5fa7283 -> domtronn/all-the-icons.el@2f5ea72
jscheid/dtrt-indent@854b9a1 -> jscheid/dtrt-indent@4a30d8e
jwiegley/use-package@317137b -> jwiegley/use-package@a7422fb
raxod502/straight.el@f2cb888 -> raxod502/straight.el@0f9b828

Remove dtrt-indent+smie fix (was fixed upstream)
2021-02-11 17:35:48 -05:00
Henrik Lissner
510bc7b5b4 Revert "Don't auto-create directory when opening files"
This reverts commit 4d7640b4c2.
2021-02-11 17:35:48 -05:00
Henrik Lissner
3a4f182a3c Revise core docstrings & comments 2021-01-27 03:36:53 -05:00
Henrik Lissner
4d7640b4c2 Don't auto-create directory when opening files
It'll ask when you want to save, so this is redundant and imposing.
2021-01-27 03:30:19 -05:00
Henrik Lissner
3967d6001b
Comment/docstring revision 2020-12-18 16:10:06 -05:00
Henrik Lissner
0f2bb647eb
Rewrite "large file" detection
Adds a doom-inhibit-large-file-detection letvar for disabling it in
some contexts.
2020-12-18 16:08:22 -05:00
Henrik Lissner
aba28824a0
Fail gracefully on files with no large-file-size-alist entry 2020-12-15 17:03:40 -05:00
Henrik Lissner
5aaaf3d99c
Remove text-mode from so-long-target-modes
This is too buggy as a general rule. Too many false positive bug
reports from plugins writing text files that are too large/long.

Fixes #4419
2020-12-15 16:58:43 -05:00
Henrik Lissner
9490d42cd3
Comment revision 2020-12-14 15:48:29 -05:00
Henrik Lissner
d69d245778
Remove sp-escape-quotes-after-insert hack
Was fixed upstream at some point.
2020-12-13 19:48:43 -05:00
Henrik Lissner
084defb165
Reset sp-pair-overlay-keymap for evil users
Smartparens creates a conditional keybind on C-g when its overlays are
present (whether or not they're visible). This causes confusion when
evil users are forced to press C-g twice to exit insert mode.
2020-12-13 19:41:08 -05:00
Nikita Bloshchanevich
61135f5374 Enable smartparens' for evil-ex'
febf960 introduced a regression, in that it caused `smartparens-mode' to
no longer be enabled for `evil-ex'. This is because the latter doesn't
call `read--expression', but calls the minibuffer directly instead.

Return `doom-init-smartparens-in-minibuffer-maybe-h', enabling
`smartparens' for `evil-ex'. The hook responsibly for enabling it in
`eval-expression-minibuffer-setup-hook' was renamed to
`doom-init-smartparens-in-eval-expression-h', since otherwise the naming
would have been awkward.

Also explicity enable `smartparens-mode' instead of toggling it.
2020-12-12 12:58:41 +01:00
Henrik Lissner
febf960c4e
Merge pull request #4401 from nbfalcon/bugfix/edebug-eval-expression-smartparens
Enable smartparens for `edebug-eval-expression'
2020-12-09 17:30:25 -05:00
Nikita Bloshchanevich
9e56927b5f Enable smartparens for `edebug-eval-expression'
`doom-init-smartparens-in-minibuffer-maybe-h' is responsible for enabling
`smartparens' in the minibuffer, which it does by checking `this-command'.
However, the list of commands doesn't include `edebug-eval-expression',
preventing the mode from being enabled for it.

Fix this by enabling `smartparens' in `eval-expression-minibuffer-setup-hook',
unconditionally, which means that anything using `interactive' "x" or
`read--expression' will work correctly.
2020-12-09 21:55:21 +01:00
Henrik Lissner
4652511440
Fix #4384: save server auth files to EMACSDIR
It's where the daemon looks for them. It's too much hassle to move it
elsewhere.
2020-12-08 21:40:10 -05:00
Henrik Lissner
b5e948054c
Refactor & reformat core.el
Backport a bit of core.el from our CLI rewrite.
2020-12-02 17:58:09 -05:00
Henrik Lissner
affd076d53
Minor refactors & reformatting 2020-12-01 13:53:46 -05:00
Henrik Lissner
8ffc9ba429
Disable so-long if visual-line-mode is enabled
Long lines are very common in text modes where visual-line-mode is
enabled.
2020-11-16 19:29:32 -05:00
Henrik Lissner
9bbdacc79b
Prefix tramp auto-save files
Makes them easier to see and reduces the possibility of filename
conflicts with autosaves of local files.
2020-10-22 14:51:49 -04:00
Henrik Lissner
8892be8372
Correct comments on auto-save #4096 2020-10-20 23:32:00 -04:00
Henrik Lissner
b4e66bffeb
More sensible backup/auto-save defaults
More sensible defaults.

And save tramp backups locally, to prevent excessive remote writes.
2020-10-20 23:12:16 -04:00
Henrik Lissner
24cc09895d
Enable auto-save by default
Offers a backup in case of crashes or power loss.

Fixes #4096
2020-10-18 19:08:08 -04:00
Henrik Lissner
9cdb0b85d3
Optimize large-file detection
Two less file ops when opening new files. Particularly helpful for
remote files.
2020-10-18 19:08:07 -04:00
Henrik Lissner
c59ae5d172
Stop ws-butler from corrupting undo history #4071 2020-10-11 16:41:07 -04:00
Henrik Lissner
3935d431fc
tab-always-indent = nil
Seems like a more sensible default to reindent the line if cursor is at
BOL or in indentation, then insert literal indentation (tab or space *
tab-width) otherwise.
2020-09-01 01:41:39 -04:00
Henrik Lissner
801cfd63d4
Don't recenter window after better-jumper jump
On C-o or C-i; this can be more disorienting than helpful.
2020-08-21 15:49:39 -04:00
Henrik Lissner
995b45285c
core: revise & clarify comments 2020-08-20 03:35:29 -04:00
Henrik Lissner
9cab6a6fd9
Fix #3723: auto-revert on window/buffer switch 2020-08-13 22:49:35 -04:00
Henrik Lissner
0a4841b247
Add :os tty module
- Moves clipetty to its own, opt-in module (#2671, #3195, #3498)
- Fix cursor shape changing between evil states (#1994)
- Moves `xterm-mouse-mode` and `visible-cursor` config out of core.
2020-08-07 23:44:39 -04:00
Henrik Lissner
9a5175dd0e
Fix savehist compression & persist marks
+ Fixes: doom-unpropertize-kill-ring-h ran too late to affect the value
  of kill-ring that gets saved.
+ Adds: now persist mark-ring and global-mark-ring (doesn't affect evil
  users)
2020-08-05 16:21:40 -04:00
Henrik Lissner
7638bd3968
Revert 439999cb6
I had incorrectly assumed tramp-own-remote-path would prepend the remote
system's PATH to tramp's exec-path, but it does not, it prepends your
local machine's PATH onto it. tramp-default-remote-path was what I was
looking for and it is already in tramp-remote-path by default.

If tramp can't find a program on the remote it's because either the
remote doesn't support getconf (which tramp uses to scrape the remote
PATH), or your PATH on the remote has been incorrectly configured.
2020-08-03 20:29:41 -04:00
Henrik Lissner
439999cb66
Add tramp-own-remote-path to tramp-remote-path
Makes tramp consider the remote's PATH when searching for executables.
2020-08-03 15:01:11 -04:00
Henrik Lissner
ccfaf3f464
Move auto-mode-alist fallbacks to bottom
So they don't override auto-mode-alist entries added by packages, like
direnv's .envrc entry.
2020-07-26 18:26:33 -04:00
Henrik Lissner
bcc1b84e76
Increase so-long threshold for softwrapped text modes 2020-07-24 02:29:03 -04:00
Henrik Lissner
c348b51e5f
Fix typo regression from 8e83a8e84 2020-07-13 17:14:57 -04:00
Henrik Lissner
8e83a8e842
Fix #3491: void-function doom-set-jump-h 2020-07-13 17:10:30 -04:00
Henrik Lissner
3a38fc633c
Change doom-{interactive,debug}-mode suffix to -p
Because these are not really modes.

Also makes `doom-debug-mode` an actual (global) minor mode.
2020-05-25 03:43:40 -04:00
Henrik Lissner
8a83e9addd
Fix wrong-number-of-args error on dired-find-file 2020-05-15 14:20:03 -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
a239326165
Activate save-place-mode when it loads 2020-05-14 01:00:12 -04:00
Henrik Lissner
e4f24fd150
Don't enable smartparens-mode in minibuffer if global mode is off 2020-05-01 16:03:18 -04:00
Henrik Lissner
d12752324a
Introduce letf! convenience macro
A more succinct cl-letf, which allows for local functions and macros.
2020-04-29 23:48:21 -04:00
Henrik Lissner
e24b8cd1d1
Slim down from lang/data
+ Removes jsonnet, graphql, dhall & protobuf packages from the module.
+ Removes +data-vagrant-mode project minor mode (unused).

I'm phasing out the lang/data module. Its original purpose was to be for
data interchange formats, like JSON, but over time it became the dumping
ground for languages with no clear defining feature.

These packages are being removed first because their configs are
non-existent or so trivial that it offers nothing a user couldn't set up
themselves.

graphql and jsonnet might get heir own modules (or jsonnet might be
gated behind a flag in the :lang json module), but for now they gotta
go.

fixup! Remove jsonnet, graphql, dhall & protobuf modes from lang/data
2020-04-23 23:56:17 -04:00
Henrik Lissner
a36afa5136
Remove redundant dtrt-indent mapping
It was upstreamed in jscheid/dtrt-indent#51
2020-04-19 20:34:47 -04:00