Remove nearly all custom behavior with consult.
The separate groups for project and non-project buffers within
consult-buffer weren't as useful after switching away from orderless to
fussy for completion scoring, as non-project buffers were often sorted
higher than project buffers.
And there's no need for the custom siren-consult-projectile-buffer
function, as consult-project-buffer does the same thing when configured
to use projectile's root path function.
There is a clang-format package in MELPA, but I believe a
reformatter-based solution works better. Hence I've made my own,
somewhat like a package, and simply thrown it into the vendor directory.
It seems the string candidates produced by consult-buffer have some
extra non-printable bytes appended at the end. These bytes makes flx-rs
not match against the candidate properly.
Consult does add a text property to the candidate string called 'buffer,
which contains the original buffer name.
So for now, we advice the flx-rs-score function and attempt to the
extract the buffer text property from the input candidate and use that
instead. If the candidate has no such text property, we use it as is.
Remove face overrides for oderless, vertico and selectrum. The defaults
from doom-themes are actually pretty nice once I gave them a chance :P
Also customize the built-in completions-common-part face so it matches
doom-themes' setup for orderless.
It seems the fzf-native scoring method can get slow and laggy over
time. It seems the flx-rs method does not, and is overall a bit faster.
However, flx-rs doesn't give exact matches as high of a score as
fzf-native, so scoring might be a bit different than I'm used to. Time
will tell if I'll find it annoying enough to switch back to fzf-native.
Also switch from orderless to fussy's all-completions backed filtering
method. This yields a noticeable improvement in speed, but it does not
support multiple search terms separated by space like orderless does.
Another potential habit I will need to adjust.
The doom-themes-set-faces essentially just lets you apply a doom-themes
faces spec against any theme you want.
Since we're defining a theme meant to override and extend various faces
from doom-themes, this makes it easier to do so, but also enables the
use of targeting light and dark theme variants with &light and &dark.
The terraform language server is not very good, very rarely provides any
completions, and when it doesn't it overall is just slow and laggy.
Especially so as lsp-mode is set to syntax highlight with the language
server, causing syntax highlighting to often be about 5 seconds behind
of whatever you're typing.
This is mostly a helper function for when I've messed around with active
modes in a file buffer a whole bunch, and I just want to revert all
things to the default state of when the file is opened.
It turns out that using the 'character mode causes very noticeable
performance degradation and straight up lag when typing in a lot of
programming languages. Setting it back to 'column seems to resolved this
for me.
Simply render indent guides identical for all levels. Specifically
highlighting the current indent line makes things feel a bit "noisy",
and also doesn't always respond to changes that fast, making things feel
slow too.
Turns out the conflicts with both copilot and highlight-indent-guide was
due to the newline-mark. Hence disable newline-mark and re-enable
whitespace mode.
As I'm no longer using whitespace-mode in prog-mode derived modes, the
cursor movement bug affecting highlight-indent-guides when
whitespace-mode is enabled is no longer an issue for me.
Further details about the highlight-indent-guides conflict with
whitespace-mode is available in this issue:
https://github.com/DarthFennec/highlight-indent-guides/issues/107
When whitespace-mode is enabled, single-line copilot completions makes
the cursor look like it's at the end of the completion rather than in
it's real position.
Issue with gifs showing the behavior is here:
https://github.com/zerolfx/copilot.el/issues/28
For the most part I should be able to live without whitespace-mode in
day to day use, and improvements to the highlight-indent-guides setup
should help.
And worst case, whitespace-mode can always be toggled easily enough.
Turns out undo-tree massively increases undo limits, and the defaults
seem to cut off history for me much sooner than I'd like. So I set the
limits to the same high values are undo-tree does.
Both undo-fu and undo-fu-session are hosted on codeberg, which seems to
be down right now. Hence instead let's pull in these packages from the
mirrors on the emacsmirrors GitGub org.