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.
Use fussy instead of orderless for filtering and scoring/ordering
completion candidates. This seems to overall order results in a much
better way than just orderless.
Technically orderless is still used to filter the candidate list, but
fzf-native is used to score/order the results.
It seems to have recently been changed to default to the same face as
comments, which I really do not like. Inheriting from
font-lock-keyword-face seems fine though.
Syntax highlighting within code blocks is nice, but it doesn't always
play that nice, and messes up the syntax highlighting of the rest of the
file quite often.
Previously we only hide company-mode's in-line preview when there was
only a single result. This meant that it didn't show the one result
anywhere.
This allows company-mode to still show it's regular popup even when
there's only one result.
I opted for accepting copilot completions using C-<tab> /
<backtab> (shift+tab) instead of regular tab, as it was often getting in
the way of yasnippet and lsp completion suggestions. This allows a more
explicit acceptance of Copilot suggestions.
Due to how lsp integrates with flycheck, it needs to take over all
linting responsibilities.
Hence we need to use efm-langserver to execute shellcheck for us. It's a
bit messy, but end result works pretty well.
Also replace undohist with undo-fu-session.
Overall this seems to yield a more reliable undo history, as undo-fu and
vundo supposedly operate with vanilla emacs undo history state, while
undo-tree supposedly does some custom tweaks to the undo state.
Move away from the whitespace-cleanup-mode package, and instead simply
define our own whitespace-cleanup-on-save-mode minor-mode that uses a
before-save-hook.
This applies especially in lsp-mode. Yasnippet snippets now show as
completion candidates if the word at point exactly matches a snippet
keyword, otherwise it'll fallback to normal lsp backed completion.
And it also supports completing file/directory names now too while
lsp-mode is active.
All this is done by modifying completion-at-point-functions after
lsp-mode has done it's trickery with it. Along with a dirty hack to
company-yasnippet to make it only activate on exact matches. Without
this hack, lsp backed completion rarely activates as snippets would have
higher priority if there's any partial matches.
The prog-mode snippets are very basic, a bit a annoying, as they
contain a couple of single-character snippets which conflict with common
variable names in Go.
Since we enable global-company-mode, explicitly enabling it in the setup
for various major modes does nothing. But it does tie the code to
company mode, making it harder to try alternatives like corfu.
Visually ctrlf is very nice, but it seems one of it's features is to
stay active in the mini-buffer until explicitly cancelled. This can
easily lead to annoyance if you mess up a C-x C-s keybind and then move
on to other buffers and such, as ctrlf will still be active.
Regular isearch however will dismiss itself as soon as you do anything
other than typing in a search query. Hence causing a lot less annoyance
for me.