I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.
This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
It seems to have recently been changed to default to the same face as
comments, which I really do not like. Inheriting from
font-lock-keyword-face seems fine though.
Rails projects uses a "tmp" directory for asset compilation, which can
lead to thousands of olders, which lsp-mode will try to monitor, and
warns that you're about to monitor +1000 directories.
Hence, ignore "tmp" directories, as there shouldn't be any code in there
that needs a language server.
- Bind consult-lsp-diagnostics to C-c C-\ as it is visually less
intrusive, and scoped to only the current workspace.
- Bind helm-lsp-diagnostics to C-c \ which includes diagnostics from all
active workspaces.
When lsp-mode is enabled, use consult-lsp-file-symbols instead of
consult-imenu, as it yields a more structured list and nicer formatted
symbol results. The result list is identical as lsp-mode updates imenu
with all file symbols, but via imenu they're just not rendered as
nicely.
With it set to 0.0 suggestions would pop up instantly which is nice when
you need a suggestion, but it made using snippets really annoying. This
seems to feel like a nice middle-ground.
company-lsp is no longer supported by lsp-mode for providing completions
to company, instead company-capf should be used which it built-in to
company itself.