When working long hours with Metals and saving and moving between buffers. This feature of automatically showing and writing in buffers breaks HELM, and buffer management stops, rendering Emacs useless. Furthermore, this feature is not that useful. In VIM LSP is off by default. The purpose of this is to make the experience of Scala Developers with Metals a nice one, rather than having Emacs breaking all the time, as has been happening to me. This has saved me hours.
PR-comments
According to its website, the Ensime project has been shut down since 2019. We
have been supporting both Ensime and Metals for [a year and a
half](https://github.com/syl20bnr/spacemacs/pull/12234#issuecomment-524916394).
Ensime's GitHub repositories, including its Emacs integration, are archived.
Meanwhile, Metals has been developed actively, regularly releasing new versions.
It has stabilized significantly, and supports an increasingly full set of
features. Scala 3 is just around the corner, and the community is poised to make
the transition smoothly and relatively quickly. Metals supports it already,
whereas of course Ensime does not and never will. In fact, Scala 2 has had
several import minor versions released since Ensime died. Now that it's 2021,
it's time to cut the baggage we are carrying around for Ensime.
This feels like the natural place to put it, though we could also extend this
with other values in the future. I defaulted this behavior to off in order to
not impact folks' current setup.
Having an explicit dependency on lsp-treemacs for post-init-lsp-treemacs is no
longer necessary in the Scala layer, as lsp-metals superseeds it.
Removed lsp-metals-treeview-enable as it no longer exists.
As of Scala 2.13, Unicode arrows are deprecated:
* https://github.com/scala/scala/pull/7540
* https://github.com/scala/scala-dev/issues/585
* https://github.com/scala/bug/issues/11210
Using one will give a deprecation warnings like so:
> The unicode arrow `⇒` is deprecated, use `=>` instead. If you still wish to
> display it as one character, consider using a font with programming ligatures
> such as Fira Code.
As such the Scala layer's version slick capability to replace ASCII arrows with
Unicode ones is no longer useful, and I have removed it.
Based on my tests it doesn't seem that there is a need for a more graceful way
to deprecate this: i.e. nothing fails if there is extra junk in `:variables`.
The previous way of adding dap to a layer did add the mode
unconditionally to `spacemacs--dap-supported-modes` causing
dap bindings to be added also when no lsp backend was used.
Ensime seems to be finally dead, as ensime-mode is not longer
available on melpa. The same applies to ob-scala the package
which delivered scala support for org babel.
I have changed the layers default to metals and took care that
ensime is not tried to be installed until it is really selected
as a package.
In addition I have also fixed some smaller issues in the layer
which caused ensime specific settings to be forced even when
metals was selected as a backend.
I have also removed the not longer existing org-babel support
for scala as it requires ob-scala which in turn is based on ensime.
See https://github.com/hvesalai/emacs-scala-mode/issues/155 for details.
Update the version of metals referenced in the metals installation
instructions, so that an old version of the metals binary doesn't get installed
by accident.
There was a edge case with the declaration of the `lsp` layer in `layers.el`
files.
The `hy` layer depends on the `python` layer which in turn depends on the `lsp`
layer if and only if the `python-backend` layer variable is set to `lsp`.
When the `hy` layer was declared first then it declares the `python` layer
without its layer variables, thus the `lsp` layer was not declared because the
`python-backend` variable was not set.
The fix is to gather all the layer dependencies and resolve them only after all
the used layers have been declared.
* new function `configuration-layer/declare-layer-dependencies`
* replace all calls to `configuration-layer/declare-layer` by the new function
except for distribution layers (we declare layer dependencies right away in
distribution layers)
problem:
some layer packages lists have the open and closing parentheses on the same line
as the first and last listed package, but most seem to have them on a separate
lines.
solution:
put the open and close parentheses on separate lines, except for lists with only
a single package, they are written on the same line as the variable name and
parentheses.
fix the lists indentation
Replace push with add-to-list in layer init functions and related code.
Modify spacemacs|add-toggle to check for and update an existing toggle in
spacemacs-toggles and only create a new toggle if none already existed.
Replace a conditional push onto erc-packages with use of :toggle.
When initializing which-key, set which-key-replacement-alist to its default
or customized setting before adding all the Spacemacs replacements. We
want to keep the stock replacements but avoid adding duplicates of the
Spacemacs replacements.
Replace the emacs-lisp-mode-hook lambda with a named function to avoid
adding duplicate hooks (which can add duplicate definitions of the
evil-surround pair).
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.
The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.