Commit Graph

632 Commits

Author SHA1 Message Date
Henrik Lissner
ef4106dae8
Remove echo-keystrokes fix in isearch
It isn't necessary anymore.
2019-05-12 17:06:56 -04:00
Henrik Lissner
e088a21335
Fix theme not loading in daemon sessions #1397 2019-05-09 23:15:13 -04:00
Henrik Lissner
17e337a434
Remove reload-theme-on-new-display-device feature
The intention for this feature was to ensure the theme always looks as
expected even if you were to open a new frame on a different display
device (e.g. open a GUI frame, start the server, then open a tty frame
from it).

It turned out to be buggier than anticipated. The underlying issue is
that solaire-mode is fundamentally incompatible with tty Emacs.
Terminals uses will need to disable it, as there's no good way to
predict what kind of frames a user will open.

TL;DR Avoid opening a TTY frame from a GUI session. If you must, and you
see odd colors, disable solaire-mode.
2019-05-09 21:45:42 -04:00
Henrik Lissner
72e8178e42
show-trailing-whitespace = t
A sensible default.
2019-05-04 19:13:26 -04:00
Henrik Lissner
47f0f77d91
Fix #1384
Redundant with show-trailing-whitespace
2019-05-04 19:13:26 -04:00
Henrik Lissner
3bebf3ac9b
Extend switch-buffer hook coverage
To cover switch-to-{next,prev}-buffer commands, which are used in quite
a few places, but don't implicitly trigger switch-buffer hooks.

Also removes switch-{window,buffer,frame} logging. Adds too much noise,
which isn't very helpful.

Also fixes VC state not being refreshed when switching to stale buffers
in certain ways.
2019-05-02 23:10:09 -04:00
Henrik Lissner
4aa65aa019
Move avy, ace-link & ace-window out of core
They don't belong there, and ace-window is no longer a core dependency
anyhow.
2019-05-01 21:02:28 -04:00
Henrik Lissner
3a3017004c
Fix whitespace-style for non-default-indentation hl
And remove lines-tail. This is outside the purview of this hook.
2019-04-30 14:37:29 -04:00
Henrik Lissner
9735f034e1
General refactors & optimizations 2019-04-29 18:54:46 -04:00
Henrik Lissner
7c5fb8ed9c
Remove highlight-escape-sequences
Payoff < performance cost, and is too opinionated.
2019-04-29 18:17:23 -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
337c16cb68
Dear byte-compiler, you drive me to drink,
About Emacs Lisp that I have to rethink.
The world could end,
And humanity transcend,
But you'd still be here raising a stink.
2019-04-05 23:52:29 -04:00
Henrik Lissner
45c9fb982d
Add docstring to switch-{buffer,window,frame} hooks 2019-04-05 22:50:09 -04:00
Henrik Lissner
259590d54e
Remove doom|protect-visible-buffer
This behavior is now isolated to kill-this-buffer.
2019-03-16 23:59:50 -04:00
Henrik Lissner
bd6233518b
Fix doom|run-switch-window-hooks
Using the wrong variable.
2019-03-13 20:15:23 -04:00
Henrik Lissner
d868f5fd10
Use new ;;;###package cookie
This will later be used for doom/describe-packages to list all locations
where a package is being configured (along with def-package! and after!
blocks).
2019-03-13 01:55:50 -04:00
Henrik Lissner
fe28c40371
Fix void-variable frame error w/ whitespace-mode
Fixes #1242
2019-03-11 19:11:10 -04:00
Henrik Lissner
4055f667fb
Defer doom|disable-whitespace-mode-in-childframes 2019-03-08 02:37:34 -05:00
Henrik Lissner
8e32f0da18
Rethink theme/font initialization order
+ Don't use set-frame-font. Causes issues for daemon users and is
  slower.
+ Revice init function docstrings
+ Load fonts a little earlier than themes

May resolve an issue where fonts in daemon Emacs are too small on
startup.

Addresses #1223
2019-03-08 02:37:33 -05:00
Henrik Lissner
a05b1877be
Rewrite switch-{buffer,window} hooks
+ Add doom-switch-frame-hook
+ Replace doom-{enter,exit}-{buffer,window}-hook with
  doom-switch-{buffer,window}-hook
+ New switch-buffer hooks run on buffer-list-update-hook rather than
  in select-window advice.
+ Blank our buffer-list-update-hook in some places to reduce how many
  times it gets triggered.
2019-03-08 02:37:33 -05:00
Henrik Lissner
8c701ef7d4
Fix void-variable error from ediff config 2019-03-08 02:34:26 -05:00
Henrik Lissner
1ec9f5b2e9
Move hl-line-range-function fix to ui/doom
Remapping the hl-line face is what causes the bug that this fix
addresses.
2019-03-05 03:01:59 -05:00
Henrik Lissner
fbcb4e6973
Minor refactor across the board 2019-03-04 20:47:26 -05:00
Henrik Lissner
f18e1c0ea1
Refactor switch {buffer,window} hooks 2019-03-04 20:47:26 -05:00
Henrik Lissner
05303c0fdb
💥 Rethink core hook order & naming
- doom-post-init-hook was renamed doom-init-modules-hook
- doom-init-hook was renamed doom-before-init-modules-hook
- doom-init-modules-hook now runs before the user's config.el is run
- Moved doom-init-ui-hook to run later (on window-setup-hook rather than
  emacs-startup-hook).

Yield a modest improvement in startup times.
2019-03-04 20:47:26 -05:00
Henrik Lissner
d46bb287ae
General refactor of Doom core
- Code reduction and refactor across the board (cull unneeded minor
  advise, hooks and hacks or update them)
- Revise outdated comments and docstrings
- Reorganize core autoload libraries
- Remove large file check (Emacs already has a built-in one, which we
  augment to be even more performant when it does kick in)
- helpful.el can now be disabled completely through package!
2019-03-02 01:34:19 -05:00
Henrik Lissner
21e01189b9
Properly keep cursor out of minibuffer prompt
The prompt in the minibuffer is read-only. You are able to move the
cursor into it before this fix.

This also more effectively silences echo-area output when deleting text
in the minibuffer. No more "Text is read-only" blocking what you're
typing.
2019-03-02 01:34:14 -05:00
Henrik Lissner
15dd5870ea
Fix uniquify+persp-mode compatibility
Uniquify would rename buffers across workspaces, causing "sticky"
buffers when switch between workspaces with buffers that have the same
base name.
2019-02-26 12:19:35 -05:00
Henrik Lissner
6f32ac371b
Highlight non-standard whitespace in file buffers
Prevents whitespace-mode from being enabled in special buffers (like
circe).
2019-02-20 01:28:19 -05:00
Henrik Lissner
c82faf7f10
General reformatting & minor refactors 2019-02-19 15:53:26 -05:00
Henrik Lissner
cee851f55b
Only activate whitespace-mode in editable buffers
Otherwise whitespace-mode will disrupt fontification in special buffers,
like helm and elfeed buffers.

Indirectly addresses #1179
2019-02-18 15:39:08 -05:00
Henrik Lissner
e0519098d9
(Almost) always highlight non-default indentation
The purpose of this is to highlight indentation characters that betray
your indent-tabs-mode setting. i.e. If you're using tab indentation,
highlight space indentation. If you're using spaces, highlight tab
characters.
2019-02-17 22:12:52 -05:00
Henrik Lissner
3dcd253f71
Remove emacs/ediff & move to core-ui 2019-02-17 21:54:26 -05:00
Henrik Lissner
81394cf733
Only prefer compiled theme on startup
...But not on doom/reload-theme or post-init load-theme calls.
2018-12-31 15:19:23 -05:00
André Silva
cf5d7e3ba8 fix highlight-non-default-indentation 2018-12-26 11:54:18 +00:00
Henrik Lissner
3dd34abe61
Remove hide-undefined-binds advice for which-key
Before general.el was introduced to Doom, commands were bound to keys
whether or not their containing modules were enabled. This was out of
laziness and readability. I intend to change this, as such it is no
longer necessary to hide unavailable keybinds from which-key.
2018-12-22 04:25:15 -05:00
Henrik Lissner
56d7f70b2f
Make all-the-icons return empty string in tty #941 2018-10-16 23:50:46 -04:00
Edwin Török
7795da4800 Fix doom-serif-font and doom-variable-pitch-font: they need to be set for current frame too
On Emacs 26.1 these two font settings had no effect on the main frame.

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-10-03 23:03:11 +01:00
Henrik Lissner
6368ef9ba0
Add docstrings to fix hooks 2018-10-01 20:29:43 -04:00
Henrik Lissner
6da307d30e Refactor font initialization
+ Add doom-serif-font variable
+ Update docstrings of all doom-*font variables to mention that they all
  support font-specs, font objects, XFT strings and XLFD strings.
+ Set doom-font if the user hasn't, ensuring that other functions know
  what the current, default font is set to (fixes doom-big-font-mode not
  switching back to normal when disabled).
2018-09-28 21:13:27 -04:00
Henrik Lissner
ddaf1e5b67 Fix wrong-type-arg error on menu-bar-open
Due to malformed menu-bar-lines frame property. Same for tool-bar-lines
as well.
2018-09-28 21:13:27 -04:00
Henrik Lissner
078e3028a6 Minor, general comment revision 2018-09-28 21:02:59 -04:00
Henrik Lissner
e38b710f29 Update docstrings for theme & font variables 2018-09-20 14:31:47 -04:00
Henrik Lissner
9c4147bbbb
Merge pull request #891 from edwintorok/theme-elc
Load .elc even for themes
2018-09-20 09:15:19 -04:00
Henrik Lissner
9970fdac2c
Enable highlight-numbers-mode in conf-modes 2018-09-19 19:42:21 -04:00
Edwin Török
228204926d Load .elc even for themes
Even when an `.elc` is preset `load-theme` would attempt to load the `.el` first,
to give the opportunity to inspect the theme.
However we are loading themes automatically from (M)ELPA, and loading a
theme package is no more dangerous than loading a regular package.

So override the search order for themes and atttempt to load the `.elc`
first.
This improves startup time by ~25ms with the default theme.

Improved implementation by @hlissner.

Signed-off-by: Edwin Török <edwin@etorok.net>
2018-09-20 00:41:54 +01:00
Henrik Lissner
54e8577bf6
Simplify doom|init-fonts: add xft font support
custom-set-faces is somewhat overkill for this. It overwrites any user
customizations for the default & variable-pitch faces, and saves them to
custom-file, which may cause those settings to persist even when we
don't want them to.

This new solution is a little faster, is more respective of
customizations, and adds XFT font string support.

XFT font strings are a little more powerful. For example, the :antialias
font-spec property was unreliable, but now you can use:

  (setq doom-font "Fira Mono:pixelsize=12:antialias=off")
2018-09-18 22:48:21 -04:00
Henrik Lissner
0c39e73a1e Refactor/reformat core-ui
+ Move minibuffer fringe disabler to ui/doom
+ Disable blink-cursor-mode (too distracting, causes other issues e.g.
  #892)
2018-09-18 15:19:50 -04:00
Henrik Lissner
e71b26b1e8 core-ui: minor reformatting/refactor 2018-09-18 15:19:50 -04:00
Henrik Lissner
4067c8937e Remove doom-major-mode-names & doom|set-mode-name
And replace it with buffer-local mode-name setters. This is more
explicit and less magical, which is easier for users to discover and
change, if they'd like.
2018-09-18 15:19:50 -04:00
Henrik Lissner
57579b883b
Refactor doom core files 2018-09-09 09:58:20 -04:00
Henrik Lissner
49e6e68a07
Use EMACS26+ to detect native line numbers
Checking for the 'display-line-numbers symbol property is clumsy and
checking for boundp is pointless now that we have a Emacs 25 polyfill
for display-line-numbers-mode.
2018-09-09 09:58:19 -04:00
Henrik Lissner
7d3ffdff06
Remove third line in section headers
This is truly important stuff. We've saved many lives with this update.
2018-09-09 09:58:19 -04:00
Henrik Lissner
a0250e60e3
Add rainbow-delimiters in lang/common-lisp instead
Gives users one place to look to determine what cosmetic hooks are
applied in lisp-mode.
2018-09-09 09:58:19 -04:00
Henrik Lissner
8b7404bf75
Refactor hl-line eob fix in Emacs 26+ 2018-09-09 09:58:18 -04:00
Patrick Elliott
475e2f9982
Fix unicode regression 2018-09-04 10:13:48 +02:00
Patrick Elliott
939dd93e79
Impose fallback behaviour 2018-09-03 13:14:59 +02:00
Henrik Lissner
3a23ff56cd
General formatting & minor refactors 2018-09-02 17:20:19 +02:00
Henrik Lissner
a581b7fc3f
Remove jit-lock-* options
Only jit-lock-stealth-nice is different from the default, and slows down
some scrolling operations without helping much. It may be better to
conditionally enable this in larger buffer.
2018-09-02 15:56:45 +02:00
Henrik Lissner
b3fb3ef55f
Fix highlight-numbers in elixir-mode
The new highlight-numbers regexp depends on a mode to have a well
defined syntax table. elixir-mode does not appear to be one of those
modes.
2018-09-02 15:15:58 +02:00
Henrik Lissner
32de22b1d2
Remove :load-path
Gah, it snuck in again! Sneaky punk...
2018-09-02 13:01:06 +02:00
Henrik Lissner
83a843bfe6
Fix void-function doom|fix-whitespace-mode-in-childframes
Function was renamed.
2018-09-01 16:30:17 +02:00
Henrik Lissner
44e536e8e8
Refactor core-ui
+ Remove doom/switch-theme (replaced with an advice for load-theme)
+ Reorganize core-ui
+ Fix Emacs 26+ hl-line hack being applied for Emacs 25 users
+ Rename doom|show-whitespace-maybe to doom|highlight-non-default-indentation
+ Disable tool-bar, menu-bar and vertical-scroll-bars via
  default-frame-alist; this is a little faster than using the minor
  modes.
2018-08-31 23:44:08 +02:00
Henrik Lissner
2b560a6a0e
General & minor refactoring 2018-08-28 13:36:44 +02:00
Henrik Lissner
d8fa5f39ad
Omit undefined/disable keybinds in which-key
This is for commands in disabled modules. This does not disable their
keybinds, but it stops them from showing up in which-key.
2018-08-26 16:38:35 +02:00
Henrik Lissner
62977247c9
Revert da7f9019 & refactor doom init hooks 2018-08-21 04:27:14 +02:00
Henrik Lissner
9a4cce8d9a
Refactor detection of native display-line-numbers 2018-08-21 04:10:18 +02:00
Henrik Lissner
a7da9a4738
💥 Rewrite line numbers system for Emacs 25
This removes the various doom-line-number* variables and replaces it
with the Emacs 26 display-line-numbers API, which I've ported to Emacs
25.x (however, it uses nlinum under the hood, and not all of
display-line-numbers options are supported).
2018-08-21 03:34:39 +02:00
Henrik Lissner
4618b7afad
Refactor & reformat core-ui 2018-08-21 02:56:54 +02:00
Henrik Lissner
6b7f97f4fc
Autoload doom-quit-p & revise its docstring 2018-08-20 23:56:56 +02:00
Henrik Lissner
1d3a1ee82f
highlight-numbers-mode -> highlight-numbers #813
Correct package name
2018-08-17 13:03:59 +02:00
Henrik Lissner
4a4b012b5d
Move custom hooks to core/core.el
Also ensures that the custom hooks aren't fired until as late as
possible, which prevents a few packages from prematurely loading at
startup. Faster startup! Yay!
2018-08-17 01:57:09 +02:00
Henrik Lissner
6df179bb29
Use def-package! for highlight-numbers-mode
Easier for users to disable
2018-08-16 19:34:03 +02:00
Henrik Lissner
ce9f03f310
Use personal fork of highlight-escape-sequences
Improves elisp support, adds support for more modes and fixes some minor
issues.
2018-08-16 15:17:07 +02:00
Henrik Lissner
4c18fc81af
Ensure switch hooks don't reference dead buffers 2018-08-13 21:47:56 +02:00
Henrik Lissner
43e0314e86
Add doom/switch-theme; a more sensible load-theme
load-theme doesn't disable previously enabled themes before switching.
doom/switch-theme does.

This remaps any keys bound to load-theme to doom/switch-theme.
2018-08-11 01:59:37 +02:00
Henrik Lissner
e05f3ec739
Add python & enh-ruby support to hes-mode 2018-08-06 00:31:23 +02:00
Henrik Lissner
4dc5ef3879
Add highlight-escape-sequences 2018-08-06 00:31:23 +02:00
Henrik Lissner
c2d5b64790
Fix broken frame creation/deletion (+ emacsclient)
Caused by a void-function error due to an incorrectly named function.
2018-07-30 13:53:36 +02:00
Henrik Lissner
cb7e471c90
General reformatting & comment revision/cleanup 2018-07-29 19:31:33 +02:00
Henrik Lissner
088480047c
Polish & move new modeline into :ui modeline
Removes modeline library out of core-ui and contains them in :ui
doom-modeline and :ui modeline.

:ui modeline will eventually replace :ui doom-modeline, but is still
considered experimental. This update provides makes it much more stable
and closer to being feature complete.
2018-07-29 19:31:32 +02:00
Henrik Lissner
a2ffbe4ede
Add new emacs/hideshow module
Brings better default code folding support to various languages, like
yaml, ruby, matlab, haml and vimrc. Hideshow is still quite
unsophisticated and will need the help of another package for complete
code folding functionality. Perhaps origami or vimish fold.

The code-folding functional in the feature/evil module will soon be
replaced by that.
2018-07-29 17:41:59 +02:00
Henrik Lissner
44bf6861a6
Fix overeager theme reloading when creating frames 2018-07-29 17:41:59 +02:00
Henrik Lissner
c75b2a36ab
Don't reload theme at startup if already enabled 2018-07-29 17:41:58 +02:00
Henrik Lissner
593666933d
Convert old def-modeline! from macro to function
This makes it easier to use dynamically, and ensures that
doom--prepare-modeline-segemnts isn't run prematurely (at macro
expansion time).
2018-07-29 17:41:58 +02:00
Henrik Lissner
4f3ce4d06d
Move highlight-numbers-mode config
Into plugins section in core-ui
2018-07-29 16:51:06 +02:00
Aria
90d09e6f93 Highlight-numbers on every prog-mode 2018-07-29 12:19:56 +10:00
Henrik Lissner
4941e327f4
General refactor for readability
+ Removes redundant/unhelpful comments
+ Renames functions, hooks and variables to be self-documenting
+ Use add-to-list to ensure idempotency (and is more performant)
2018-07-09 15:33:31 +02:00
Henrik Lissner
64867cbed4
Don't lazy load doom|disable-show-paren-mode
In case it is used early (e.g. by org-mode).
2018-07-06 12:48:41 +02:00
Henrik Lissner
15f66f4b52
Add doom|disable-show-paren-mode hook
For disabling show-paren-mode buffer-locally.
2018-07-06 01:06:13 +02:00
Henrik Lissner
b42dd5c1db
Minor refactor of doom|init-fonts
Prefer native functions over macros, and conform to new convention of
naming condition-case error variables "e".

No, not the meme.
2018-07-03 03:41:08 +02:00
Henrik Lissner
81ffed520b
Rename doom-before-switch-*-hook hooks
+ doom-before-switch-buffer-hook => doom-exit-buffer-hook
+ doom-before-switch-window-hook => doom-exit-window-hook
+ doom-after-switch-buffer-hook => doom-enter-buffer-hook
+ doom-after-switch-window-hook => doom-enter-window-hook

Shorter, easier-to-type names that better describe their intended
purpose.

The old names are still usable, but deprecated.
2018-07-03 03:41:08 +02:00
Henrik Lissner
15f2e21468
On second thought...
Causes char-table-p errors in some cases.

Setting hscroll-margin = 0 in dashboard accomplishes the same thing, by
preventing truncation glyphs from ever appearing anyway.
2018-06-30 02:58:01 +02:00
Henrik Lissner
d402c6ef44
Seriously, don't show $ glyphs on long lines
Seriously, dude. Seriously.
2018-06-30 02:29:18 +02:00
Henrik Lissner
1d7782aea3
Ensure paren isn't loaded at startup
post-command-hook would trigger too soon, for some reason.
2018-06-25 15:47:29 +02:00
Henrik Lissner
f6dc6ac74e
Refactor out map.el usage
After some profiling, it turns out map-put and map-delete are 5-7x
slower (more on Emacs 25) than delq, setf/alist-get and add-to-list for
small lists (under 250 items), which is exactly how I've been using
them.

The only caveat is alist-get's signature is different on Emacs 25, thus
a polyfill is necessary in core-lib.
2018-06-23 19:53:54 +02:00
Henrik Lissner
ab07e07352
Improve general error handling at startup
This will hopefully reveal more information as to the cause and origin
of errors at startup. It should also make doom-debug-mode more likely to
produce a backtrace in non-interactive sessions.
2018-06-18 14:47:36 +02:00
Henrik Lissner
03022d09f9
Remove doom//x naming convention
This naming convention was meant to be for batch commands, but it grew
to include "commands that were helpful with managing Doom", but many of
these commands shouldn't be interactive in the first place!
2018-06-17 21:35:58 +02:00
Henrik Lissner
3188d67d6e
Hide modeline in Man-mode 2018-06-17 14:22:29 +02:00
Henrik Lissner
b880175d79
Remove switch-frame hooks
They are too unreliable. Use after-focus-change-function if you
must (though, that's an latest-Emacs-27-only feature atm).
2018-06-16 21:40:46 +02:00