Commit Graph

49 Commits

Author SHA1 Message Date
Lucius Hu 49d1eaed50 rust and lsp: better integration of lsp-rust-analyzer-reload-workspace
- Introduced a new command cargo-process-outdated
- Certain commands are known to change Cargo.toml and needs to reload workspace,
  wrapper functions that automatically reload workspace are added.
  - spacemacs/cargo-process-add
  - spacemacs/cargo-process-rm
  - spacemacs/cargo-process-outdated
- Added a layer variable for rust layer, cargo-process-reload-on-modify,
  which toggle the aforementioned behaviour.
- Added a new utility function in LSP layer, which returns server ID associated
  with current project.
  - spacemacs//lsp-client-server-id
- Rearranged keybindings for rust layers (see table below for details)

Commands wrapped with auto-reload functionality:

|Command                  |Binding      |
|-------------------------|-------------|
|`cargo-process-repeat`   |`SPC m c .`  |
|`cargo-process-add`      |`SPC m c a`  |
|`cargo-process-rm`       |`SPC m c r`  |
|`cargo-process-upgrade`  |`SPC m c U`  |

Commands with new bindings:

|Command                            |Old Binding |New Binding |
|-----------------------------------|------------|------------|
|`cargo-process-search`             |`SPC m c s` |`SPC m c /` |
|`cargo-process-fmt`                |`SPC m c f` |`SPC m c =` |
|`cargo-process-current-file-tests` |`SPC m c o` |`SPC m t b` |
|`cargo-process-current-test`       |`SPC m c t` |`SPC m t t` |
|`cargo-process-test`               |`SPC m t`   |`SPC m t a` |
2021-04-09 21:56:22 +02:00
Teo Klestrup Röijezon 170e4a9852 Add keybind to reload Rust-Analyzer workspace
Allows you to pick up new Cargo dependencies without a (slooow)
full server restart.

See https://github.com/emacs-lsp/lsp-mode/pull/2728

Add diagnostic messages when trying to reload RA workspace

No point restarting when trying to reload RLS
2021-03-20 20:14:40 +00:00
Lucius Hu d6eb0f9fe6 rust: Improved LSP Rust server switch functionality
Currently, when `lsp` backend is used for `rust` layer, `SPC m s s` is bound to
`lsp-rust-switch-server`, which temporarily changes the preferred LSP server
for `rust-mode`, but it DOES NOT switch the running LSP server. Users need to
call `lsp-workspace-restart` to finish the switching.

This PR introduced a new function `spacemacs//lsp-rust-switch-server`, which is
a wrapper for the two aforementioned functions
2021-03-19 12:54:41 +01:00
duianto c6dc8fad47 [rust] Fix .ron support
Missing parentheses around:
"\\.ron\\'" . ron-mode

in the line:
:mode "\\.ron\\'" . ron-mode

Updated the rust readme to mention the .ron support.

And added a changelog.develop entry.
2020-08-09 11:30:00 +02:00
Robert Roland d98cccaa2f [rust] Small typo fix
This fixes a small typo, switching ` for =
2020-07-24 10:54:02 +02:00
Lucius Hu 82e5387cd9
rust: Updated README for external dependencies
Instructoins on the following external dependencies required by certain
functions are added/updated to the README file:
- `cargo-edit`
- `cargo-audit`
- `rustfmt`
- `clippy`

Signed-off-by: Lucius Hu <lebensterben@users.noreply.github.com>
2020-03-01 00:16:35 +01:00
emacspace 7536239f9e
documentation formatting: Wed Feb 26 16:43:02 UTC 2020 2020-02-26 19:14:35 +01:00
Lucius Hu 70efaaae59
[rust] Added key bindings for cargo-edit, cargo-audit and Clippy
This is a squashed commit it contains:
- Added new sections on `cargo-edit`, `cargo-audit`, and `Clippy`,
which are used for several key-bindings in this layer.
- Re-ordered the `Key bindings` section, added entries for new bidings,
and improved description.
- ~SPC m c a~ for =cargo add=
- ~SPC m c r~ for =cargo rm=
- ~SPC m c U~ for =cargo upgrade=
- ~SPC m c A~ for =cargo audit=
- ~SPC m c X~ is for =cargo run --bin= now, instead of =cargo run --example=,
which is bound to ~SPC m c E~
2020-02-26 16:40:12 +00:00
emacspace 546f626be9
documentation formatting: Sat Feb 22 10:39:46 UTC 2020 2020-02-22 11:44:35 +01:00
Lucius Hu 24d9c3f7ee
[rust] Add key binding to switch lsp rust server
`lsp-mode` supports two LSP server backend for Rust language, i.e.
`rls` and `rust-analyzer`.

`rust-analyzer` is experimental and lacks certain functionalities
such as `DAP` support.

`lsp-mode` provides a function `lsp-rust-switch-server` that changes
the priority of LSP server backend for *new* LSP session.

This commit adds a key binding `SPC m s s` to `lsp-rust-switch-server`.
2020-02-13 19:27:32 +00:00
Keiichi Watanabe 0e48bac272 rust: Fix a broken code block in README 2020-01-31 23:23:53 +09:00
emacspace 75cfd40d3c
documentation formatting: Mon Jan 27 22:19:54 UTC 2020 2020-01-27 23:35:09 +01:00
syl20bnr 52d1b0f323 Revert "[clojure] Add sesman keybindings"
This breaks Spacemacs convention:
https://github.com/syl20bnr/spacemacs/blob/develop/doc/CONVENTIONS.org#repls

Need to add session management under an unused prefix, I suggest SPC m S

This reverts commit e47494229b.
2020-01-25 10:17:08 -05:00
emacspace ff5b3ae291 documentation formatting: Thu Jan 23 11:14:51 UTC 2020 2020-01-23 12:18:03 +01:00
Lucius Hu d7e9a803fd rust: Guides to use rust-analyzer; fix link 2020-01-20 15:59:28 +01:00
syl20bnr ac30247811 [lsp] When used, make LSP the default backend for all supported lang
* Added a new function to each language to select the backend
* Use these new functions in all `pcase`.
2019-09-30 00:49:44 -04:00
syl20bnr 9606dd344e [dap] Refactor configuration dap config in 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
2019-09-30 00:34:26 -04:00
Anton-Latukha f6660f82d4
Switch to the new layers generator 2019-05-15 21:08:21 +03:00
Anton-Latukha ba074bc908 layers: lang: new structure: general: add pure, multi-paradigm (&js) 2019-05-15 21:04:48 +03:00
JAremko 77c680160e Add placeholder tags 2019-05-05 20:40:47 +03:00
Ivan Yonchovski e80a4fa0ab [rust] dap layer integration 2019-04-18 21:32:32 +02:00
Justin f8bb6997a9 Remove lsp-javascript-typescript package for lsp built in.
Remove lsp-go package for lsp built in.
Changed go/react/typescript lsp-*-enable hooks to lsp
Update go/typescript/rust layer docs for lsp-mode installation command.
Remove unused rust layer variable
2019-01-15 00:41:30 +02:00
JAremko c5ae487b89 Fix links 2019-01-13 20:27:35 +02:00
emacspace 45276bd96f documentation formatting: Wed Dec 5 03:03:03 UTC 2018 2018-12-04 22:06:14 -05:00
Justin f70ebe6f9e Add: rust-lsp
Add rust lsp completion with company and bindings
2018-11-05 22:58:28 +00:00
JAremko cd39f80c24 Reformat documentation 2018-10-11 00:13:43 +03:00
syl20bnr af625a9499 rust: revert SPC m c c and move cargo-process-check to SPC m c v
SPC m c c is a convention.
2018-01-17 23:17:50 -05:00
seemyvest 6da75c4055 Rust: Fix cargo-process-current-test keybinding, update documentation 2018-01-09 23:58:07 -05:00
CeleritasCelery e32acfbf3b Fixed feature header 2017-08-29 20:00:44 +03:00
syl20bnr 82220fce3a Remove old wording "contribution layer" 2017-08-28 11:33:55 -04:00
Michael Kohl 9a9d9a0feb
Add shortcut for cargo clippy 2017-07-27 22:35:33 +03:00
JAremko 6c5a0b2b14 update docs to the new toc-org format 2017-05-22 18:35:37 +03:00
JAremko f805d0ebd9 Fix spacefmt test on deleted files
Also fix some links
[ci skip]
2017-04-28 23:29:43 -04:00
NJBS f786c1fa88 Rust: Add binding for describing symbol at point 2016-11-12 16:20:28 +02:00
Kevin van Rooijen 0bbb88814e New add cargo package to rust layer 2016-08-17 20:05:37 +02:00
Fabien Dubosson 39eebef067 [rust] Sort keybindings alphabetically 2016-04-11 20:45:47 +02:00
Dmitri Melnikov 8c6d154ffb Add key binding for `cargo fmt` 2016-04-11 20:43:03 +02:00
syl20bnr 3b0c1fd93d Convert org doc files with doc-fmt 2016-03-30 22:59:55 -04:00
Fredrik Bergroth 48d05d3182 rustfmt: Remove obsolete package
This package was merged into rust-mode.
2016-02-23 20:42:25 +01:00
isphinx aaa94b012e rust: format rust code using rustfmt 2016-01-11 22:01:48 -05:00
Fredrik Bergroth c9e459fd14 Clean up rust layer 2016-01-11 01:13:10 -05:00
syl20bnr cddf18ff1e Update install layer section in REAMDE.org files 2016-01-06 00:21:55 -05:00
isphinx 9b0ae1d214 rust: add a keybinding for `jump to definition` 2016-01-03 22:23:11 -05:00
Fabien Dubosson 3e570dd595 Fix markup and justification in Rust auto-completion documentation 2016-01-03 14:32:03 +01:00
Immortalin 66402eb406 Add rust auto-completion documentation 2016-01-03 14:26:39 +01:00
Eivind Fonn c3866382b2 Documentation update
- Add #+HTML_HEAD_EXTRA options to all org files
- HTMLize published documentation via CSS
2015-11-13 14:23:13 +01:00
Eivind Fonn 13c5b1d24b Convert documentation to publishable format 2015-11-01 23:40:29 -05:00
Severen Redwood 7924a782a2 Add a function and keybinding for `cargo clean` 2015-10-07 15:51:40 -04:00
justbur 6eab954afe Use + instead of ! for layer categories
Helm seems to treat "!" specially in pattern matching, so having a ! in
the pattern string when traversing directories is problematic. This
change fixes #2737, because as far as I can tell "+" has no special
meaning in a helm pattern.

Of course, we can choose a different character, but I'm fond of "+" as
representing "more layers here".
2015-09-11 00:13:51 -04:00
Renamed from layers/!lang/rust/README.org (Browse further)