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.
There was recently a great tidy-up commit in the Emacs master
branch (commit 1f29ee2d21b57e81a28550a1b31bc8a39406d17b), which removed
a lot legacy stuff. Dired's dired-pop-to-buffer function was among them.
However dired+ plus seems to heavily depend on it, so for now, I've
simply copied the source of the function from the legacy cleanup commit.
It sometimes causes a long lock-up of Emacs. I believe this is due to a
known issue where the mode can cause excessive garbage collection while
scrolling, combined with my use of gcmh which prevents GC while actively
using Emacs.
Hence my theory is that pixel scrolling is causing tons of memory to be
consumed, but gcmh prevents the GC from running, until it hits a tipping
point where it GCs hundreds of megabytes of memory.
Or, that's my theory at least :P