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.
- Fix issue where gotest could not be used from non-test files in Emacs
28.x or later.
- Bind "C-c , t" to ff-find-other-file to mimic behavior in Ruby via
rspec-mode.
- Configure gotest to always run tests with "-count=1" to avoid cached
results, so it's easier to notice and handle flickering tests.
Using consult-buffer to switch between buffers is now project aware,
meaning when current buffer is in a project, the list of buffers is
split into two groups; project buffers, and other non-project buffers.
The project buffers group is above the other buffers group, meaning it's
very easy to switch to other buffers within the same project, while
still being able to switch to non-project buffers too.
When current buffer is not part of a project, all buffers are shown
together in a single completion group.
Occasionally right after starting Emacs, it was possible to issue a
projectile-switch-project command which ran before my hacky
vertico-directory advice had been added. This should ensure the advice
gets added earlier.
There's been a couple of recent changes in Emacs' master branch which
has affected the helpful package. These changes work around both issues,
and seems to let helpful keep working as before.
I'm giving the visual tab-bar a try, by making it less ugly than it is
by default. Hopefully I won't mind it taking up one full row at the top
of the frame.
With vertico, orderless and marginalia, I feel the regular projectile
find-file and switch-project commands offer just as good if not better
completion than helm-projectile commands do. Hence the switch.
Override default straight recipe for vertico to expose extensions as
packages.
Also create hacky vertico-directory-mode to easily toggle
vertico-directory features on and off.
vertico-directory-mode is then used by a projectile advice to
temporarily disable vertico-directory features while completing results
from projectile. This is required to avoid breaking the
projectile-switch-project and related commands, as the project list is
not a set of files, but vertico-directory-enter thinks it is.
Rails projects uses a "tmp" directory for asset compilation, which can
lead to thousands of olders, which lsp-mode will try to monitor, and
warns that you're about to monitor +1000 directories.
Hence, ignore "tmp" directories, as there shouldn't be any code in there
that needs a language server.
I finally resolved the lsp-mode bug I had whenever I tried vertico in
the past. It was due to me setting resize-mini-windows instead of
vertico-resize.
This serves as a alternative to the code-review package. I'm adding it
mostly for testing purposes so I can compare the two and see the
pros/cons with each.