summary refs log tree commit diff
path: root/src/tools/rust-analyzer/editors/code
AgeCommit message (Collapse)AuthorLines
2024-08-19Improve documentation for `InvocationStrategy`Lukas Wirth-5/+5
2024-08-19chore(config): remove `invocationLocation` in favor of `invocationStrategy`Victor Song-38/+2
These flags were added to help rust-analyzer integrate with repos requiring non-Cargo invocations. The consensus is that having two independent settings are no longer needed. This change removes `invocationLocation` in favor of `invocationStrategy` and changes the internal representation of `InvocationStrategy::Once` to hold the workspace root.
2024-08-16Remove rust-analyzer.workspace.discoverProjectRunnerDavid Richey-12/+0
2024-08-07Allow rust-project.json to be hiddenAli Bektas-1/+7
2024-08-05Auto merge of #17772 - Veykril:debug.ts, r=Veykrilbors-99/+187
internal: Reorganize debug.ts
2024-08-05Reorganize debug.tsLukas Wirth-99/+187
2024-08-05feat: Load sysroot library via cargo metadataLukas Wirth-10/+0
2024-08-02Auto merge of #17705 - huntc:resolve-ra, r=Veykrilbors-16/+191
feat: Use oldest rustup rust-analyzer when toolchain override is present Selects a rust-toolchain declared RA based on its date. The earliest (oldest) RA wins and becomes the one that the workspace uses as a whole. In terms of precedence: nightly > stable-with-version > stable With stable-with-version, we invoke the RA with a `--version` arg and attempt to extract a date. Given the same date as a nightly, the nightly RA will win. Fixes #17663
2024-07-31docs: Fix JSON example for rust-analyzer.workspace.discoverConfigWilfred Hughes-1/+1
The user does not specify `{arg}` in their JSON, and be pedantic about commas in JSON sample.
2024-07-31Corrected precedence positionhuntc-4/+4
2024-07-30Formattinghuntc-6/+6
2024-07-30Outdated comment removedhuntc-7/+6
2024-07-30Further simplificationshuntc-16/+10
2024-07-30Checks date for any RAhuntc-20/+22
2024-07-29Auto merge of #17707 - Veykril:proc-macro-err-cleanup, r=Veykrilbors-13/+0
feat: Use spans for builtin and declarative macro expansion errors This should generally improve some error reporting for macro expansion errors. Especially for `compile_error!` within proc-macros
2024-07-28Determine toolchain RA on agehuntc-16/+196
Selects a rust-toolchain declared RA based on its date. The earliest (oldest) RA wins and becomes the one that the workspace uses as a whole. In terms of precedence: nightly > stable-with-version > stable With stable-with-version, we invoke the RA with a `--version` arg and attempt to extract a date. Given the same date as a nightly, the nightly RA will win.
2024-07-27feat: add trace level to client logsJosh McKinney-0/+4
2024-07-27feat: use vscode log format for client logsJosh McKinney-42/+36
This change updates the log format to use the vscode log format instead of the custom log format, by replacing the `OutputChannel` with a `LogOutputChannel` and using the `debug`, `info`, `warn`, and `error` methods on it. This has the following benefits: - Each log level now has its own color and the timestamp is in a more standard format - Inspect output (e.g. the log of the config object) is now colored - Error stack traces are now shown in the output - The log level is now controlled on the output tab by clicking the gear icon and selecting "Debug" or by passing the `--log` parameter to vscode. The `trace.extension` setting has been marked as deprecated.
2024-07-26fix: tweak hover/tooltip linksYoung-Flash-6/+11
2024-07-26Internal: Cleanup proc-macro error handlingLukas Wirth-13/+0
2024-07-23internal: remove UnindexedProject notificationDavid Barsky-215/+10
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
2024-07-23Remove lens.forceCustomCommands configPaulDotSH-10/+0
2024-07-22Auto merge of #17667 - Veykril:r-a-component-override, r=Veykrilbors-18/+44
Use rustup rust-analyzer component when there is a toolchain file override for the opened workspace Fixes https://github.com/rust-lang/rust-analyzer/issues/17663
2024-07-22Use rustup rust-analyzer component when there is a toolchain file override ↵Lukas Wirth-18/+44
for the opened workspace
2024-07-20Rename rust-analyzer commandsJosh McKinney-2/+2
The commands `editor.action.triggerParameterHints` and `editor.action.rename` are now renamed to `rust-analyzer.triggerParameterHints` and `rust-analyzer.rename` This change helps make it clear that these commands are specific to rust-analyzer and not part of the default set of commands provided by VSCode. Fixes: https://github.com/rust-lang/rust-analyzer/issues/17644
2024-07-19Auto merge of #17639 - Veykril:salsa-perf, r=Veykrilbors-1/+2
Some more small salsa memory improvements This does limit our lru limits to 2^16 but if you want to set them higher than that you might as well not set them at all. Also makes `LRU` opt-in per query now, allowing us to drop all the unnecessary LRU stuff for most queries
2024-07-19Regenerate filesLukas Wirth-1/+2
2024-07-19remove rust-analyzer.openFAQJoel Daniel Rico-19/+0
2024-07-18Auto merge of #17246 - ↵bors-0/+34
davidbarsky:david/move-rust-project-generation-to-server, r=Veykril feature: teach rust-analyzer to discover `linked_projects` This PR's been a long-time coming, but like the title says, it introduces server-side project discovery and removes the extension hooks I previously introduced. I don't think this PR is ready to land, but here are the things I'm feeling squishy about: - I don't think I like the idea of introducing the `cargo-metadata` command-but-for-everything-else in the `flycheck` module, but the progress reporting infrastructure was too convenient to pass up. Happy to move it elsewhere. Here are the things I _know_ I need to change: - For progress reporting, I'm extracting from a `serde_json::Value` that corresponds to `tracing_subsciber::fmt::Layer`'s JSON output. I'd like to make this a bit more structured/documented than the current nonsense I wrote. - The progress reporting currently hardcodes "Buck"; it should be deriving that from the previously mentioned more-structured-output. - This doesn't handle *reloading* when a corresponding buildfile is changed. It should be doing that. <details> <summary>Anyway, here's a video of rust-analyzer discovering a Buck target.</summary> https://github.com/rust-lang/rust-analyzer/assets/2067774/be6cd9b9-2c9a-402d-847f-05f860a91df1 </details>
2024-07-18feature: move `linked_projects` discovery to the rust-analyzer serverDavid Barsky-0/+34
2024-07-18Update test fixturesLukas Wirth-5/+0
2024-07-17Auto merge of #17616 - Veykril:config-param-hints, r=Veykrilbors-2/+2
Fix incorrect generic parameter hint defaults Missed this in the review but we should show const param hints, not lifetime param hints by default
2024-07-17Fix incorrect generic parameter hint defaultsLukas Wirth-2/+2
2024-07-17Add --keep-going to rust-analyzer.cargo.buildScripts.overrideCommand docsLaurențiu Nicola-1/+1
2024-07-16Set RUSTC_SYSROOT for runnablesLukas Wirth-40/+37
2024-07-12Trigger VSCode to rename after extract variable assist is appliedbors-0/+8
When the user applies the "Extract Variable" assist, the cursor is positioned at the newly inserted variable. This commit adds a command to the assist that triggers the rename action in VSCode. This way, the user can quickly rename the variable after applying the assist. Fixes part of: #17579
2024-07-10Remove faq landing page, improve main oneLukas Wirth-51/+12
2024-07-08feat: add inlay hints for generic parametersLiao Junxuan-0/+30
fixes #11091 By default, only hints for const generic parameters are shown.
2024-07-07Auto merge of #17523 - wada314:master, r=Veykrilbors-0/+10
Add an option to use "::" for the external crate prefix. Fixes #11823 . Hi I'm very new to rust-analyzer and not sure how the review process are. Can somebody take a look at this PR? thanks!
2024-07-06Auto merge of #17549 - Veykril:runnables-fix, r=Veykrilbors-113/+223
fix: Fix runnables being incorrectly constructed I've misunderstood parts of the code here which caused runnables to arbitrarily break :) (I have yet to understand the conditions that made them break though, there is some odd caching involved I feel like ...) Fixes https://github.com/rust-lang/rust-analyzer/issues/17402
2024-07-06fix: Fix runnables being incorrectly constructedLukas Wirth-113/+223
2024-07-06Auto merge of #17548 - Veykril:debug-fix, r=Veykrilbors-11/+15
fix: Fix passing `message-format` after -- in debugging Fixes https://github.com/rust-lang/rust-analyzer/pull/17495#issuecomment-2211717224
2024-07-06Fix passing message-format after -- in debuggingLukas Wirth-11/+15
2024-07-06Auto merge of #17547 - Veykril:runnables-env, r=Veykrilbors-19/+34
internal: Clean up runnable lsp extension This feels like a natural addition to me, and also allows us to drop the expect-test hardcoding from the extension. Additionally, `cargoExtraArgs` is pointless, all the client will do is merge it with `cargoArgs` so the server can do that instead of delegating that to the client.
2024-07-06Flatten cargoExtraArgs away from the runnable lsp extensionLukas Wirth-15/+7
2024-07-06Add environment to runnable lsp extensionLukas Wirth-13/+36
2024-07-06Auto merge of #17508 - jjoeldaniel:landing-page, r=Veykrilbors-0/+128
feat: Add landing/faq walkthrough pages This is a basic implementation of a landing and FAQ page; I've included the bare-bones information as well as a [recommended section on inlay hints](https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Landing.20Page/near/446135321). I've also added `rust-analyzer: Open Walkthrough` and `rust-analyzer: Open FAQ` commands for ease of access. I am hoping to create a small list of FAQ to include that might be useful as well as any other information I may have missed in the landing page. Feel free to share any suggestions! ![landing/faq page demo](https://github.com/rust-lang/rust-analyzer/assets/100006388/4644e4f0-4555-4b29-83c1-b048084ad63d) cc #13351
2024-07-02squash.Shohei Wada-0/+10
2024-07-01Auto merge of #17495 - listochkin:pass-cargo-extra-args-for-debugger, r=Veykrilbors-2/+3
pass cargo extra args when debugging fixes #17128
2024-07-01Auto merge of #17522 - Veykril:comptimes, r=Veykrilbors-6/+6
internal: Cut compiletimes slightly