Default on-save formatting is still done via lsp-format-buffer, but the
the C-c C-f manual formatting action is overridden to also include
stree-format-buffer.
In fact, registering them, will override existing servers. When
registering the golangci-lint server, it prevents the regular gopls
server from being used.
The field_identifier type was recently removed from tree-sitter-go here:
https://github.com/tree-sitter/tree-sitter-go/pull/71
This means that struct keys are no longer syntax highlighted as
properties, which I dislike. Hence this new query targets the first
element of a key/value pair, and marks the first element as a @property
if it contains an identifier.
I'm not sure if this undoes the goal of removing the field_identifier,
but for now, it resolves my personal annoyance of struct keys not be
highlighted as properties when creating a new instance of the struct.
Caddy can now format Caddyfiles with the "caddy fmt" command, so we use
reformatter to create a format-on-save mode for Caddyfiles.
Also there's no need for the weird whitespace-mode workaround, as we now
use tab indentation in Caddyfiles, since that's what "caddy fmt"
produces.
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.
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.
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.
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.