It's neat, but generally very slow to update the tree view when you
switched back and forth between projects. So I prefer just having
multiple projects visible in treemacs at the same time.
When yank-indent-mode is enabled, yanked (pasted) text is indented based
on the indent rules of the current major mode. It has a
global-yank-indent-mode too which by default excludes a long list of
known indentation sensitive modes with which this approach does not work
very well.
It is based on some random hacky snippets elisp I've been using for over
a decade. Said snippets are themselves based on some random snippets I
found online, and since morphed into the weird monster they had become.
Essentially, if accepted completion string matches a given regexp
pattern, text can be inserted both before and after point.
This is useful in certain situations where Copilot suggests the opening
line to a if statement, for loop, etc., which leads to unbalanced curly
brackets. This can help reduce the annoyance of unbalanced brackets.
Instead of stripping away curly brackets at the end of the completion
texts, simply insert a closing curly bracket after point when accepting
a completion that ends with a curly bracket.
Otherwise fall back to dockerfile-mode.
This also acts as an experiment of how to go about using the new Emacs
29.x treesit backed modes if available. This is currently not that
clean, but will do for now, and I'll keep experimenting with it.
Yet again, I'm switching highlight-indent-guides back to column mode. It
seemed that character mode performance had been improved. But I've run
into a number of files since where it tanks performance to the point key
strokes takes close to a second to render.
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.