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.
Turns out running (magit-delta-mode -1) to "disable" or ensure it's
disabled as a magit-mode-hook was a bad idea, as it set
magit-diff-refine-hunk to nil.
So instead, we only call magit-delta-mode when siren-magit-delta-enabled
is not nil, and the delta executable is available.
Disabled by default, as the syntax highlighting can make code harder to
read in the diff. Hence disabled by default, and easy to toggle on if I
want to try it.
The state of using diff-hl using the margin or fringe ends up within
desktop-mode save files, so let's force set diff-hl to use margin or
fringe based on if we have a window-system or not, both after diff-hl is
loaded, and also as a desktop-after-read hook.
Change style back to a plain vertical line, but slightly narrower than
last time which I ended up not liking, while also aligning it to the
right hand side of the left fringe, so there's a gap between the window
border and the diff-hl status line. Also tweak the colors a bit.
I feel this works better, and keeps things nice and clean.
The very next commit introduces a new feature to show git hunks, which
seems to have a negative impact on performance when moving the cursor
around, or adding/removing text within lines which are highlighted by
diff-hl while diff-hl-flydiff-mode is enabled.
So for now I'm pinning diff-hl to the commit right before this was
introduced.
Packages that need to be loaded on emacs startup, should just be loaded
through use-package in a non-deferred manner.
It makes no real difference to startup, loading the packages either
slows down emacs before "startup" is complete, or right after it
completes. End result is that Emacs is unresponsive for basically the
same amount of time regardless.
forge-post-mode uses temporary files for editing, which means that
prettier can't determine the formatter to use based on the
filename. Hence we need to explicitly pass `--parser markdown` as a CLI
arg to prettier.
This module wraps around the fill-column-indicator and it's
fci-mode. This will enable easy switch-over to Emacs 27's native
display-fill-column-indicator feature.
Also create a new siren-display-line-numbers module and function that's
responsible for turning on the display of line numbers. Future changes
to how line numbers are displayed can now be done in a single place.
Latest master build of magit seems to have issues with the status
buffer, where it turns on syntax high-lighting for quoted strings and
other weirdness that leaks all over the status buffer.