currently toggle `:if` for meghanada with `use-package` only tells `use-package`
not to load `meghanada` but spacemacs still downloads `meghanada`.
also we shouldn't care about emacs 25 anymore.
- Moved backend determination to `config.el`
- Replaced unnecessary backquote construct with simple quotation
- Replaced `pcase` form with only one-arm with `when` or `unless` form
After using Java mode, Gradle keybindings infect or even clobber keybindings of
any subsequently used major-mode. For example, the critical Agda major mode
keybinding of `l` as `agda2-load` gets with a Gradle menu!
The cause, found by @duianto, is that `emacs-gradle-mode` sets itself to a
[global](e4d665d578/gradle-mode.el (L176-L183))
minor mode. The docs for `define-minor-mode` say about `:global:`
> If non-nil specifies that the minor mode is not meant to be
> buffer-local, so don't make the variable MODE buffer-local.
> By default, the mode is buffer-local.
I don't know why `gradle-mode` is doing this; presumably there is some reason or
need for it. But the author of that package hasn't been on GitHub since 2017,
and the last update of the package itself is from early 2015.
To seal the deal, `gradle-mode` hasn't been working anyway (at least, I've never
got it to work). I've been running Gradle by launching a terminal within Emacs.
Fixes#13750.
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.
- Fixed setting dap-java shortcuts - ATM the shortcuts were not enabled due to
the fact that dap-mode configuration was overriding them since it was running
after this piece of code
- removed configuration code about lsp-java since it was either about
missing properties or about setting defaults already set by lsp-mode/lsp-java
(e. g. lsp-eldoc-render-all is now nil by default)
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)
* use local-vars-hook coupled to setup function for dap
* define new private layer variable `spacemacs--dap-supported-modes` to
configure key bindings. This allows to move the key bindings definition from
`funcs.el` to `packages.el`
* remove duplication of DAP key bindings in READMEs by pointing to the dap layer
documentation
* alphabetically sort package configuration
"pu" for lsp backends called a lsp-java function which has
been deactivated in the `lsp-java` package. Replaced it with
the closest match from the same package, updating the
project settings instead.
- I had some issues related to finding the corresponding shortcuts for each of
the commands and I am looking for suggestions for improvements.
- updated the lsp-java readme since the server installation is now automatic. If
you already have jdt server installation, please run lsp-java-update-server
which will download the related dap-mode related stuff.
- Make sure that you have latest melpa versions of lsp-java, lsp-ui and dap-mode
since several issues related to the java integration were fixed lately.
- dap-mode is pretty young package and it is not extensively tested
- dap-hydra which will be used as a transient state for the breakpoints and
debugging, in general, is not synched with the shortcuts in the layer. I will sync
them once there is agreement on the shortcuts configuration. Also, I have not
updated lsp-java README.org with the corresponding shortcuts for the same
reason.
- The debug integration with the python lsp layer will be implemented in
separate PR.
- There will be few more functions that are going to be added to the dap-mode at
some point and they would require shortcuts too:
* suspend/kill thread I guess - "m d t s" "m d t k"?
* watches - "m d l w"
* exception breakpoints - I have to figure out how it will look like on emacs
side.
* goto point "m d H"?