Replace persp-mode with:
- tab-bar-mode for perspective/screen management
- desktop-save-mode for session management
Both tab-bar-mode and desktop are enhanced and customized a decent bit
via the siren-tab-bar and siren-desktop modules.
This allows specific major-modes to disable hl-line-mode, which is
desired some terminal/shell modes like vterm where the hl-line flickers
constantly while typing.
company-lsp is no longer supported by lsp-mode for providing completions
to company, instead company-capf should be used which it built-in to
company itself.
It seems the visual-fill-column-mode that writeroom-mode depends upon
causes persp-mode to sometimes forget the contents/layout of a persp.
Hence I'm completely disabling it for now to see if it resolves my
issues, specially as I hardly ever use writeroom-mode anyway.
On my 2016 MacBook Pro correction times are around 200ms with the
daemon, compared to around 3-4 seconds without.
There might be some issues if bundler depends heavily on gems included
in the project, but we'll see how that goes.
This involved always loading `helm-config` which sets up
`helm-command-prefix` and `helm-command-map` allowing use-package to set
bindings on the map all without loading anything else until needed.
Additionally allow `recursive-narrow-or-widen-dwin` to also trigger
`org-edit-src-code` within org buffers. This technically does not use
narrowing, but it does "focus" on the source code block for editing, so
it at least in spirit embodies the intent of narrowing.
This behavior was inspired by:
https://endlessparentheses.com/emacs-narrow-or-widen-dwim.html
By default when region is not active, both `downcase-region` (C-x C-l)
and `upcase-region` (C-x C-u) will operate on surrounding text in
different ways depending on major-mode. This has caught me off guard a
few times.
So let's replace them with safer `downcase-region-only` and
`upcase-region-only` functions which ONLY perform changes when the
region is active. And obviously changes are only applied to the text
within the region.
The auto-highlight-symbol package has a nicer interactive editing mode,
but it messes with the visual presentation for selected region and other
things. So let's go back to the less fancy but more reliable
highlight-symbol package.
Also let's properly disable both symbol highlighting packages in golang
and dart, where lsp-mode provides a better and more intelligent symbol
highlighting feature.
Smex has not been updated since late 2015. Amx was originally a fork of
smex, but as since evolved much further into it's own thing.
Among other things is supports other completing backends, and ivy with
it's fuzzy matching feels rather nice. I'm keeping ido-mode for
everything else, but specifically for M-x I'll give ivy a try.
Recent Emacs 27 builds use the native macOS fullscreen for the first
10-20 seconds after startup when `ns-use-native-fullscreen` is set to
nil during startup.
So instead of forcing emacs into fullscreen, just force maximize the
window on startup instead.
With my shell setup cleaned up so all environment variables are set in
`~/.zshenv`, and all the slower interactive shell setup in `~/.zshrc`,
we can no remove the `-i` flag from exec-path-from-shell's setup,
leading to a much faster setup time.
Also load additional environment variables, and also set
`temporary-file-directory` to match the `TMPDIR` environment variable.
Due to the value being set not ending with a slash, auto-save files were
being stores in `~/.emacs.d/cache` instead of
`~/.emacs.d/cache/autosave`.
The fix was to add a slash at the end, and also to ensure the directory
exists.