I have:
- Revised the documentation to be more clear about the possible backends
- Simplified the lsp setup code
- Removed redundant loading of company-lsp (is done by lsp-mode already)
- Made lsp the default backend for dart and mentioned that the analyser is
deprecated
An older PR reintroduced a dependency on lexical let.
There is no proper replacement for this in cl-lib therefore
I have changed it to a normal let which works the same
way.
In future we should think of making the entire file lexically bound
and only mark the exceptions to be dynamically bound.
I have tried to integrate flow-js2-mode into flow-type in addition
I have fixed a couple of issues in the layer and replaced obsolete
react-mode bindings with rjsx-mode bindings.
This allows to use quick run when the default shell is not bash-compatible.
I also fixed the output name by using a digest of the filename rather
than always a new file as I noted that my /tmp got cluttered with 4MiB
files pretty quickly, and I was just using a hello-world like file.
Make LSP be used as default backend
Request DAP layer when LSP is used as backend
Update README.org with latest pyls package dependencies
Remove obsolete getter functions
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.
- lsp-mode supports defining remote versions of each clients(e. g. clangd which
works over tramp). Before this change the language server will be disabled
because it has different server-id.
Add a full/minified transient state toggle.
Grouped backend transient state key bindings by column.
Moved the html/init-web-mode :init section before the :config section.
The helpful layer delivers more sophisticated help buffers,
at least for elisp and emacs specific objects. Therefore
it makes sense to replace the existing help functions for
these bindings silently if this layer is loaded.
Make doc more clearly describe which tools belong to which backend.
Change keybindings to be consistent with spacemacs conventions.
Simplify LSP layer code.
This environment variable is used by python LSP to determine
the pyenv virtual environment to use. When switching to a different
project using projectile 'switch-to-project', it should only be
necessary to restart the LSP server but a restart will only
work if this VIRTUAL_ENV changes value too.
Improve documentation to be clear about the choices of backends.
Remove obsolete functions.
Make sure that company-lua is only loaded when the right backend is used.
Make keybindings conform to conventions.
To activate javascript-eslint all lsp layers where
running eslint during lsp-ui flycheck phase. This
caused a lot of side effects and has been deactivated
for now. Eslint shall be called by the lsp server instead.
Removed org verbatim emphasis around link descriptions.
Moved up a paragraph before the julia-mode-enable-lsp code snippet,
because it ended with "then install this layer with:".
Removed the link from the same paragraph, it linked to it's own section.
Loaded lsp-julia from melpa
And fixed#12852
spacemacs/go-setup-backend was incorrectly added to the hook:
julia-mode-local-vars-hook
The correct function is now added: spacemacs/julia-setup-lsp
correct a tick
The variable clojure-enable-linters can now be set to a list of linters:
'(clj-kondo joker)
or
'(joker squiggly)
or any other combination of the available linters.
In which case, all linters in the list will be active if they are
available to be. In that flycheck is configured so that each linter
in the list has as next-checker the next linter in the list.
The variable can also now be set to:
'joker
If only the newly added joker linter should be used.
This will pull down flycheck-joker and add Joker as a checker for
Clojure modes.
--
Implementation Details
The way it works is that for each Clojure linting mode, clj, cljc,
cljs and edn, a primary linter is chosen based on the order the
user specifies in clojure-enable-linters which support that mode.
It is made the primary linter for flycheck to use by being promoted
to the front of the flycheck-checkers list. All other linters specified
by the user which the mode also supports get added to it as a
next-checker.
Tested with clj-kondo, joker and squiggly. The only issue I saw was that
the way flycheck-clojure works, and the way I currently have setup the
logic for multiple checkers mean that we can't add to a mode multiple
checkers for the same linter. flycheck-clojure has eastwood, kibit and
core.typed. If you have it configured to use eastwood linter, then it
will all work, as eastwood gets added as the next-checker. But if you
have it disabled in flycheck-clojure, there won't be any
flycheck-clojure linters to activate. I'm not sure as of now how to best
support that. Ideally, we would not clubber linters into a single packge
like that, and so the layer would have instead of squiggly: eastwood,
kibit, core.typed. But that's not how flycheck-clojure works. Future
commit might be able to do something smarter about this.
Conda layer needed some additions to be spacemacs
conform. In detail I did:
* Add missing features block and TOC declaration in README
* Change bindings to extent the existing python bindings
rather than adding new general bindings.
* Make conda layer require python layer
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
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.
When send form/region/buffer to repl without focus - repl buffer is
not scrolling and result not visible.
Added scrolling to the end of the repl-buffer after eval.
On systems where IPython executable path contains whitespace
(e.g, if IPython is under Local Appdata and your Windows username has
whitespace), the shell command was invalid, quoting the executable is required.
"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.
- declare lsp layer dependency if elixir-backind is lsp
- "C-j" now properly indents line
- add toggle breakpoint for elixir-mode
update CHANGELOG.develop
- Consolidate pre-requisites
- Revise document structure
- Clarify setup instructions
- Link key bindings to their supporting tools
- Remove ancient notes on go-oracle
- Fix typos
- Style fixes
- Apply suggestions from code review by @duianto
Thanks to @duianto for the comprehensive review!
Co-Authored-By: duianto <otnaiud@gmail.com>
gometalinter¹ was deprecated on 2019-02-28, in favor of the more advanced
golangci-lint.
. Drop references to gometalinter from README.org
. Update reference to available meta-linter (golangci-lint) in LAYERS.org
. Add attribution in CHANGELOG.develop
¹: https://github.com/alecthomas/gometalinter
Previously, if a user set `python-backend` to `'lsp`, it would not do anything
unless the user also manually added the `lsp` layer to the spacemacs `init.el`
file. This commit updates the `python` layer to correctly add the dependency
when needed, like the `c-c++` layer does.
Enhancement to Clojure layer documentation for the clj-kondo linter added via
pul request #12611
Moved instructions to install section as clj-kondo and squiqgly can be added as
Clojure layer variables, just like clj-refactor and sayid.
Changed the install instructions to make them specific and to use clojure layer
variables, which is consistent with other Clojure layer options.
Elaborated on the install instructions to clarify requirements, constraints and
recommended linting tool.
Added credits to the changelog.