Commit Graph

1953 Commits

Author SHA1 Message Date
roife
3521089985 fix: use lldb when debugging with C++ extension 2024-03-28 14:38:23 +08:00
Laurențiu Nicola
662ea73e4e Revert debug extension priorities 2024-03-28 07:58:36 +02:00
Young-Flash
d81148a009 expose config for hover struct field display 2024-03-25 19:55:19 +08:00
hkalbasi
92300e8f86 Use --workspace and --no-fail-fast in test explorer 2024-03-19 01:46:41 +03:30
bors
f6e2895ee6 Auto merge of #16839 - Wilfred:extension_refactor_for_shell, r=Veykril
Refactor extension to support arbitrary shell command runnables

Currently, the extension assumes that all runnables invoke cargo. Arguments are sometimes full CLI arguments, and sometimes arguments passed to a cargo subcommand.

Refactor the extension so that tasks are just a `program` and a list of strings `args`, and rename `CargoTask` to `RustTask` to make it generic.

(This was factored out of #16135 and tidied.)
2024-03-18 08:48:57 +00:00
dependabot[bot]
64c12e665b
Bump follow-redirects from 1.15.4 to 1.15.6 in /editors/code
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 06:57:29 +00:00
hkalbasi
eeff20d172 Show compilation progress in test explorer 2024-03-15 16:28:59 +03:30
Wilfred Hughes
4422a90b11 refactor: Store the CLI command directly in RustTargetDefinition 2024-03-14 16:41:49 -07:00
Wilfred Hughes
2e109c7da8 refactor: Use a single CLI args array rather than a separate subcommand field 2024-03-14 16:41:49 -07:00
Wilfred Hughes
d472fd932b refactor: Rename CargoTask to RustTask in extension 2024-03-14 16:41:49 -07:00
Laurențiu Nicola
cb6c26ba82 Don't auto-close block comments in strings 2024-03-12 14:44:35 +02:00
hkalbasi
dc99ad912a Some minor changes in the test explorer lsp extension 2024-03-09 01:21:27 +03:30
Lukas Wirth
1c6d1b4f2a fix: Add config and capability for test explorer 2024-03-06 19:20:58 +01:00
hkalbasi
44be2432f5 Add test explorer 2024-03-06 00:05:29 +03:30
Lukas Wirth
8844640c6f fix: Put style lints behind disabled-by-default config 2024-03-05 11:43:23 +01:00
bors
ce3216e0ae Auto merge of #15938 - Young-Flash:display_trait_item_when_hover, r=Veykril
feat: add hover display for trait assoc items

This PR enable preview assoc items when hover on `trait`

![image](https://github.com/rust-lang/rust-analyzer/assets/71162630/d9c3949c-33cf-4a32-aa97-3af46b28033a)

inspired by https://github.com/rust-lang/rust-analyzer/pull/15847
2024-03-05 08:26:53 +00:00
bors
d444acdb19 Auto merge of #16719 - lnicola:native-debug, r=lnicola
fix: Add basic support for Native Debug

Native Debug doesn't work very well and passing command-line arguments is nasty (https://github.com/rust-lang/rust-analyzer/issues/9815), but I guess it's a start.

Closes #9815
2024-03-04 08:16:01 +00:00
Young-Flash
dba67b46a1 update for review 2024-03-02 10:01:04 +08:00
Lukas Wirth
ed7e9aa5d8 Simplify 2024-03-01 13:25:24 +01:00
Laurențiu Nicola
a01e4f8b72 Add basic support for Native Debug 2024-02-29 16:14:58 +02:00
Lukas Wirth
30ad0ae209 internal: Revert #16541 2024-02-27 15:48:30 +01:00
Young-Flash
2e87f31fe9 add HoverDisplayConfig 2024-02-22 17:37:40 +08:00
Young-Flash
35ec5955eb add config item for hover display 2024-02-21 11:08:45 +08:00
bors
60982dc8fc Auto merge of #16475 - DropDemBits:native-vscode-snippet-text-edit, r=Veykril
feat: Support multiple tab stops for completions in VSCode

Uses the native VSCode support for `SnippetTextEdit`s. Fixes #13229 and fixes #8531.

https://github.com/rust-lang/rust-analyzer/assets/13354275/a2d2c033-bb30-4f34-92ca-bf3f4f744cdc

This is done in a slightly hacky way, as `vscode-languageclient` can't convert RA's `SnippetTextEdit`s into vscode `SnippetTextEdit`s and will appear to use a [different format](295aaa393f/types/src/main.ts (L1501-L1516)) in the future.

---

~~Marked as draft since as-is, this will cause completions to double-indent any multi-line code generated.~~
**Update:** This also fixes up edits so that any multi-line code won't be double-indented.
2024-02-19 10:58:44 +00:00
Lukas Wirth
ead369117a CrateOrigin::Local means local to the project workspace, not cargo workspace 2024-02-16 16:28:17 +01:00
DropDemBits
bcf14e27ce
Work around snippet edits doubling up extra indentation
We can't tell vscode to not add in the extra indentation, so we instead opt to remove it from the edits themselves, and then let vscode add it back in.
2024-02-15 18:39:17 -05:00
DropDemBits
d846586bc9
fix: Support multiple tab stops in completions in VSCode
Uses the native VSCode support for `SnippetTextEdit`s, but in a semi-hacky way as it's not fully supported yet.
2024-02-15 18:13:04 -05:00
bors
3bb8d3a32f Auto merge of #16247 - Veykril:opqueues, r=Veykril
fix: Fix build scripts not being rebuilt in some occasions

Also makes proc-macro changed flag setting async, we don't wanna block `process_changes` on the database as that is on the main thread!
2024-02-14 14:33:16 +00:00
Lukas Wirth
1e6cef94df fix: Fix build scripts not being rebuilt in some occasions 2024-02-14 15:20:45 +01:00
bors
113f054274 Auto merge of #16558 - Wilfred:json_project_ts, r=lnicola
Update JsonProject to include optional fields

These were documented in #15014 in the manual, but this definition wasn't updated to match.
2024-02-14 06:24:56 +00:00
Wilfred Hughes
931f563a89 Update JsonProject to include optional fields
These were documented in #15014 in the manual, but this definition
wasn't updated to match.
2024-02-13 14:29:20 -08:00
Davis Vaughan
45e05abf7b Activate on top level Cargo.toml and rust-project.json files 2024-02-12 18:14:10 -05:00
bors
35b0d66875 Auto merge of #16541 - Veykril:highlight-rustdoc, r=Veykril
Highlight rustdoc

Updated version of https://github.com/rust-lang/rust-analyzer/pull/16340
2024-02-12 15:20:33 +00:00
Lukas Wirth
c6bb35269c Remove autoclosing pair <> in rustdoc 2024-02-12 16:01:14 +01:00
bors
1811210339 Auto merge of #15476 - Wilfred:implement-saved-file3, r=Veykril
Substitute $saved_file in custom check commands

If the custom command has a $saved_file placeholder, and we know the file being saved, replace the placeholder and run a check command.

If there's a placeholder and we don't know the saved file, do nothing.

This is a simplified version of #15381, which I hope is easier to review.
2024-02-12 14:59:37 +00:00
Lukas Wirth
d24db9f2c3 Run npm run format 2024-02-12 15:58:17 +01:00
Wilfred Hughes
cdbf54f4bd flycheck: initial implementation of $saved_file
If the custom command has a $saved_file placeholder, and we know the
file being saved, replace the placeholder and then run a check command.

If there's a placeholder and we don't know the saved file, do nothing.
2024-02-12 15:45:48 +01:00
Tavo Annus
125791386d Cleanup term search related changes 2024-02-11 14:35:54 +02:00
Tavo Annus
88964c0b6a Optionally disable term search for autocompletion 2024-02-11 13:33:29 +02:00
bors
13707845f7 Auto merge of #15863 - davidbarsky:davidbarsky/start-of-monorepo-mode, r=Veykril
feature: Create `UnindexedProject` notification to be sent to the client

(Note that this branch contains commits from https://github.com/rust-lang/rust-analyzer/pull/15830, which I'll rebase atop of as needed.)

Based on the discussion in https://github.com/rust-lang/rust-analyzer/issues/15837, I've added a notification and off-by-default toggle to send that notification from `handle_did_open_text_document`. I'm happy to rename/tweak this as needed.

I've been using this for a little bit, and it does seem to cause a little bit more indexing/work in rust-analyzer, but it's something that I'll profile as needed, I think.
2024-02-08 19:36:09 +00:00
David Barsky
6330b028b3 feature: Add a UnindexedProject notification and a corresponding setting. 2024-02-08 14:23:00 -05:00
Lukas Wirth
0258f60cfe feat: Allow cargo check to run on only the current package 2024-02-08 10:40:42 +01:00
Young-Flash
bec1e0f616 minor: polish warning msg 2024-02-04 18:37:09 +08:00
bors
135a8d9841 Auto merge of #16416 - Young-Flash:cargo_ext_detect, r=lnicola
internal: VS Code: report conflict with `panicbit.cargo`

<img width="359" alt="notification" src="https://github.com/rust-lang/rust-analyzer/assets/71162630/420b9f34-ba73-4436-b868-6cd87c62287d">

related to https://github.com/rust-lang/rust-analyzer/issues/16392
2024-02-01 13:00:05 +00:00
Young-Flash
4facb6253e minor: update warning msg 2024-01-30 20:33:15 +08:00
Young-Flash
6f303f49fe feat: enable excluding refs search results in test 2024-01-28 18:28:13 +08:00
Young-Flash
96ebad0409 minor: update conflict extension detect logic 2024-01-26 20:12:13 +08:00
Young-Flash
56f54c87e7 fix lint and fmt 2024-01-22 19:33:26 +08:00
Young-Flash
e15f40e842 feat: add conflict ext (panicbit.cargo) detect 2024-01-22 18:49:39 +08:00
bors
3f4c6dac3d Auto merge of #16372 - davidsemakula:import-granularity-one, r=Veykril
feat: Add "One" import granularity

Adds a new import granularity option "One" that merges all imports into a single use statement as long as they have the same visibility and attributes.

This is similar to [rustfmt's `imports_granularity = "One"`](https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=import#imports_granularity).

Fixes: #11361
2024-01-18 15:40:12 +00:00