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)
The dart layer requires the official LSP server as the
emacs mode alternative is not longer properly maintained.
Therefore I have added some more description of how to
install the server properly and let the layer load
the LSP layer automatically.
In addition I have removed the unsupported variable
`dart-server-enable-analysis-server` from the
documentation.
See https://github.com/bradyt/dart-mode/wiki/LSP for
details.
While getting the dart-server major mode key bindings to work.
Everything was moved from the `dart/init-dart-mode` function,
to the `dart/init-dart-server` function.
This revealed that an empty `dart/init-dart-mode` section causes
`M-x revert-buffer`
to switch the dart buffer to `fundamental-mode`.
The fix was to load `dart-mode` from the `dart/init-dart-mode`
function. And add `:after dart-mode` to the
`dart/init-dart-server` function.
dart-mode has been split into two packages:
- dart-mode, Provides basic syntax highlighting and indentation.
- dart-server, Factors out the features from dart-mode.el that relied on
external executables, thus improving availability, reliability, testing and
development of dart-mode.el.
This commit removes the workarounds needed on older versions of `dart-mode` library, now that many of the fixes have landed.
This commit also fixes the integration with flycheck, as there is a new function used on the `develop` branch.