Ensure language servers only start when a buffer is visible. This helps
with desktop restore speed, as various language servers do not start all
at the same time.
Also tweak a couple of other gopls settings, and set a others to their
defaults for the purpose of ensuring they stay that way, and also to
make it more obvious within emacs what options are available.
The highlight-indent-guides package seems to have a cursor movement bug
with some modes, and makefile-mode is one of them.
Also Makefiles are tab indented, and the indentation highlight replaces
the tab character symbol, making it difficult to properly understand the
indentation level.
A recent change (https://github.com/raxod502/straight.el/pull/558) to
straight.el's use-package integration led to some of my :straight
definitions throwing errors.
When overriding the package name, do not wrap the real name in parens,
for example:
;; bad (no longer works)
(use-package helm-global-bindings
:straight (helm))
;; good (worked before, still works)
(use-package helm-global-bindings
:straight helm)
It seems when native-comp is used, the kill-buffer-hook in json-snatcher
is registered, even though the library itself isn't registered. And the
`jsons-remove-buffer` function does not have a autoload declaration.
Hence we use use-package to manually create a autoload for the function.
This allows specific major-modes to disable hl-line-mode, which is
desired some terminal/shell modes like vterm where the hl-line flickers
constantly while typing.
Enable polymode within code-blocks in Markdown files. Effectively, it
allows code-blocks of various languages to be handled by their
respective major modes, allowing correct syntax highlighting, snippets,
and other features to work as you would expect.
Terraform-mode already comes with it's own
terraform-format-on-save-mode, but the way it inserts the corrected
source into the buffer often causes weird cursor movement which is
annoying.
This means that each project gets a separate solargraph server, rather
than one server handles all projects. This does mean more memory is
consumed, but it overall it makes lsp-mode perform much faster, and be
more stable.
On my 2016 MacBook Pro correction times are around 200ms with the
daemon, compared to around 3-4 seconds without.
There might be some issues if bundler depends heavily on gems included
in the project, but we'll see how that goes.
This allows editing code blocks within markdown files in a separate
buffer with the proper language major-mode applied.
Also integrate it with recursive-narrow, so it can be triggered with via
narrowing commands.
Instead of directly using the my current favorite indentation
highlighting package in various places, only use the
siren-display-indentation function. This lets me control it from a
single central place.
Setting company-echo-delay to 0.5 instead of 0 will help reduce unneeded
and intrusive code-completion popups while in the middle of typing. It
seemed like a good idea when I first set it, but after some use, no
thanks.
The whitespace-style tweak, effectively removes "indentation" from the
list of items whitespace-cleanup deals with on save. Indentation is
already being fixed by lsp-mode's before-save hooks, and
whitespace-cleanup was not very intelligent about it. It specifically
replaced all instances of four consecutive spaces in raw string
literals with a tab, which caused issues with multi-line raw strings
containing JSON.