Commit graph

26 commits

Author SHA1 Message Date
Tavo Annus
efecb90b7f Fix suggestions of unstable constants 2024-06-22 21:33:58 +03:00
bors
17f2596bbe Auto merge of #17438 - jjoeldaniel:toggle_lsp_logs, r=Veykril
feat: add `toggleLSPLogs` command

Implement client-side command to toggle LSP logs in VSCode.

The command replaces the need to add/remove the `"rust-analyzer.trace.server": "verbose"` setting each time one wants to display logs. I've also updated the docs/ instances that reference the now outdated manual method.

The command labeled `rust-analyzer: Toggle LSP Logs` enables the setting project-wide and opens the relevant trace output channel.

Closes #8233
2024-06-19 08:39:42 +00:00
Joel Daniel Rico
5934eeda55 feat: add toggleLSPLogs command
add `toggleLSPLogs` command
update docs to reflect new command
2024-06-17 04:08:32 -07:00
Lunaphied
0257394d4c docs: fix manual generation instructions
To generate all the requisite files, you need to run `cargo xtask codegen` not
`cargo test -p xtask`.
2024-06-16 15:25:42 -06:00
bors
a97aef8466 Auto merge of #16840 - Wilfred:shell_runnable, r=Veykril
Allow rust-project.json to include arbitrary shell commands for runnables

This is a follow-up on #16135, resolving the feedback raised :)

Allow rust-project.json to include shell runnables, of the form:

```
{
  "build_info": {
    "label": "//project/foo:my-crate",
    "target_kind": "bin",
    "shell_runnables": [
      {
        "kind": "run",
        "program": "buck2",
        "args": ["run", "//project/foo:my-crate"]
      },
      {
        "kind": "test_one",
        "program": "test_runner",
        "args": ["--name=$$TEST_NAME$$"]
      }
    ]
  }
}

```

If these runnable configs are present for the current crate in rust-project.json, offer them as runnables in VS Code.

This PR required some boring changes to APIs that previously only handled cargo situations. I've split out these changes as commits labelled 'refactor', so it's easy to see the interesting changes.
2024-06-11 16:13:10 +00:00
Wilfred Hughes
1e9e86c655 feature: add build system info; runnables to rust-project.json 2024-06-11 11:55:17 -04:00
Lukas Wirth
34d273b5be Simplify some config serialization stuff 2024-06-11 10:45:17 +02:00
Lukas Wirth
59002b3828 Fix processing of ratoml files 2024-06-07 12:31:50 +02:00
roife
c10bda5577 Update docs 2024-05-24 03:53:36 +08:00
Lukas Wirth
f93256ca42 Allow sysroots to only consist of the source root dir 2024-05-23 20:12:31 +02:00
Adam Szkoda
9099862687
Correct Neovim 0.10 inlay hints config example 2024-05-17 12:42:17 +02:00
Tavo Annus
8ef19e777a Make term search fuel configurable 2024-05-08 19:46:33 +03:00
Wilfred Hughes
76fd22e8c4 docs: Fix typo in VS Code setting description 2024-04-30 11:17:57 -07:00
bors
f7de09415c Auto merge of #17144 - cbiffle:patch-1, r=Veykril
manual: remove suggestion of rust-project.json example

The manual has been linking to the repo

https://github.com/rust-analyzer/rust-project.json-example/tree/master

This repo does not contain a rust-project.json, does not appear to have _ever_ contained a rust-project.json, and my bug report about this has gone untouched: https://github.com/rust-analyzer/rust-project.json-example/issues/4

Since I can't figure out an example, this commit removes the link pending better documentation.
2024-04-29 08:16:11 +00:00
Lukas Wirth
001c387150 Don't retry position relient requests and version resolve data 2024-04-28 17:02:38 +02:00
Cliff L. Biffle
0daa8915cf
manual: remove suggestion of rust-project.json example
The manual has been linking to the repo

https://github.com/rust-analyzer/rust-project.json-example/tree/master

This repo does not contain a rust-project.json, does not appear to have _ever_ contained a rust-project.json, and my bug report about this has gone untouched: https://github.com/rust-analyzer/rust-project.json-example/issues/4

Since I can't figure out an example, this commit removes the link pending better documentation.
2024-04-26 08:23:50 -07:00
Lukas Wirth
3bc103ad88 Show workspace info in the status bar 2024-04-26 11:28:33 +02:00
bors
d00de38599 Auto merge of #17021 - roife:add-hover-limits-for-adts, r=Veykril
Support hovering limits for adts

Fix #17009

1. Currently, r-a supports limiting the number of struct fields displayed when hovering. This PR extends it to support enum variants and union fields. Since the display of these three (ADTs) is similar, this PR extends 'hover_show_structFields' to 'hover_show_adtFieldsOrVariants'.
2. This PR also resolved the problem that the layout of ADT was not restricted by display limitations when hovering on the Self type.
3. Additionally, this PR changes the default value of display limitations to `10` (instead of the original `null`), which helps users discover this feature.
2024-04-25 07:23:27 +00:00
bors
a200391f54 Auto merge of #17025 - lnicola:josh, r=lnicola
internal: Use josh for subtree syncs
2024-04-21 16:39:18 +00:00
Lukas Wirth
7c39263450 Allow rust files to be used linkedProjects 2024-04-21 16:26:55 +02:00
Laurențiu Nicola
8f2138102f Use josh for subtree syncs 2024-04-21 10:07:08 +03:00
roife
0e9d845fc7 Add hovering limitations support for variants 2024-04-20 09:14:00 +08:00
roife
c1a4ba55d7 fix: add a separate setting for enum variants 2024-04-19 21:45:56 +08:00
roife
a1136121b8 fix: adjust the limitation for ADTs' fields to 5 2024-04-16 16:28:23 +08:00
roife
3994fcb245 Update tests and docs for hover_show_adtFieldsOrVariants 2024-04-16 16:27:56 +08:00
roife
3a4a69a510 Add config hover_show_adtFieldsOrVariants to handle hovering limitation for ADTs 2024-04-16 16:26:23 +08:00