Commit Graph

2377 Commits

Author SHA1 Message Date
Johann Hemmann
fad4fa163c cargo clippy --fix 2024-01-18 13:59:49 +01:00
roife
04ce4ce440 internal: speedup LineEndings calculation using 'memchr' 2024-01-18 17:03:29 +08:00
Lukas Wirth
0bdbf497b6 fix: Fix progress reporting getting stuck 2024-01-17 13:23:00 +01:00
Lukas Wirth
21723cb051 Run metadata on sysroot for CI metrics 2024-01-17 09:43:04 +01:00
bors
2d5ce888de Auto merge of #16366 - Veykril:transp-queries, r=Veykril
internal: Make data queries transparent over their diagnostics variant

And a few other QoL things
2024-01-16 10:09:05 +00:00
Lukas Wirth
f675b5ead8 Don't early exit on panics in rustc_tests command 2024-01-16 11:05:50 +01:00
bors
c9afd41219 Auto merge of #15636 - 9999years:show-which-roots-are-scanned, r=Veykril
Show which roots are being scanned in progress messages

This changes the `Roots Scanned` message to include the directory being scanned.

Before: `Roots Scanned 206/210 (98%)`
After: `Roots Scanned 206/210: .direnv (98%)`

This makes it a lot easier to tell that `rust-analyzer` isn't crashed, it's just trying to scan a huge directory.

See: #12613
2024-01-16 09:44:56 +00:00
Lukas Wirth
398150827f Rename Message::Progress::file field to dir 2024-01-16 10:43:33 +01:00
bors
87e609aa9c Auto merge of #15868 - wasd96040501:fix/symlink2, r=Veykril
fix: failed to infer OUT_DIR when workspace root contains symlink

fix #15867
2024-01-16 09:23:54 +00:00
Lukas Wirth
c7eb52dd7b internal: Add unstable config for loading the sysroot sources via cargo metadata 2024-01-15 09:59:32 +01:00
YangzeLuo
22cda959b3 fix: failed to infer OUT_DIR when workspace root contains symlink 2024-01-12 13:35:53 +08:00
Rebecca Turner
1ceb2ea414
Show which roots are being scanned in progress messages
See: #12613
2024-01-09 09:16:26 -08:00
bors
9e34e643a1 Auto merge of #16319 - Veykril:no-double-load, r=Veykril
fix: Differentiate between vfs config load and file changed events

Kind of fixes https://github.com/rust-lang/rust-analyzer/issues/14730 in a pretty bad way. We need to rethink the vfs-notify layer entirely. For a decent fix.
2024-01-09 10:24:23 +00:00
bors
25f71469f1 Auto merge of #16311 - Veykril:rustc-deps, r=Veykril
internal: Remove `rustc_dependencies ` crate

The crate serves no purpose really
2024-01-09 09:37:48 +00:00
Lukas Wirth
e1c67485bf fix: Differentiate between vfs config load and file changed events 2024-01-09 10:30:16 +01:00
Laurențiu Nicola
4413aeb9e8 Temporarily disable resolve_proc_macro test 2024-01-09 10:27:36 +02:00
Laurențiu Nicola
f52f2f9c3c Merge branch 'master' into sync-from-rust 2024-01-09 08:46:16 +02:00
Lukas Wirth
f972da70d4 Remove rustc_dependencies crate 2024-01-08 15:39:35 +01:00
Lukas Wirth
1c40ac79c8 VFS no longer stores all source files in memory 2024-01-08 12:51:16 +01:00
Laurențiu Nicola
3afeb24198 Merge commit 'af40101841c45aa75b56f4e9ca745369da8fb4ba' into sync-from-ra 2024-01-08 11:29:25 +02:00
riverbl
3c378b9c70 Add inlay hint for exclusive ranges
Adds an inlay hint containing a '<' character to exclusive range expressions and patterns that specify an upper bound.
2024-01-07 09:33:56 +00:00
Lukas Wirth
2666349392 Remove limit from symbol_index::Query 2024-01-04 19:20:10 +01:00
Lukas Wirth
d480525ce8 Add extern crate rustc_driver to proc-macro-srv-cli 2024-01-04 11:02:23 +01:00
Nicolas Guichard
73d9c77f2a scip: Populate SymbolInformation::kind
SymbolInformation::kind is finer-grained than the SCIP symbol suffix.
This also fixes a bug where all type aliases where treated like type
parameters.

```
trait SomeTrait {
  type AssociatedType; // ← this is SomeTrait#[AssociatedType]
}

type MyTypeAlias = u8; // ← this used to be [MyTypeAlias]
                       //   and now is MyTypeAlias#
```
2024-01-03 13:05:36 +01:00
Nicolas Guichard
566bb77f91 scip: Populate SymbolInformation::signature_documentation 2024-01-03 10:56:12 +01:00
Nicolas Guichard
495a55689b scip: Populate SymbolInformation::enclosing_symbol
For local variables, this gets the moniker from the enclosing
definition and stores it into the TokenStaticData.
Then it builds the scip symbol for that moniker when building the
SymbolInformation.
2024-01-03 10:54:57 +01:00
Nicolas Guichard
62663e6d4b scip: Refactor token_to_symbol to moniker_to_symbol
This is meant to implement SymbolInformation::enclosing_symbol, so we
can build the enclosing symbol from the enclosing moniker without
having the full enclosing token's TokenStaticData.
2024-01-03 10:54:57 +01:00
Nicolas Guichard
375f1cca4f scip: Populate SymbolInformation::display_name 2024-01-03 10:54:57 +01:00
Laurențiu Nicola
932d85b529 Merge commit '426d2842c1f0e5cc5e34bb37c7ac3ee0945f9746' into sync-from-ra2 2024-01-03 11:35:07 +02:00
bors
86e559bf3f Auto merge of #16211 - tetsuharuohzeki:update-lint, r=Veykril
Use Cargo's [workspace.lints.*] to config clippy

This change begin to use [`[workspace.lints.*]`](https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table) that is stabilized since [Rust 1.74](https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html).

By this change, we make the configure more readable and simplify `xargo lint` more.
2024-01-02 14:53:22 +00:00
bors
1a0b772a43 Auto merge of #16153 - Veykril:err-msg, r=Veykril
fix: Notify user that linkedProjects is set when failing to discover projects

Fixes https://github.com/rust-lang/rust-analyzer/issues/15171
2024-01-02 14:42:03 +00:00
Lukas Wirth
8136e739f5 fix: Notify user that linkedProjects is set when failing to discover projects 2024-01-02 15:24:21 +01:00
bors
9f46ff501d Auto merge of #16062 - davidbarsky:david/fix-references-to-removed-settings, r=Veykril
fix: Correct references from `rust-analyzer.cargo.check` to `rust-analyzer.check`

When reading the manual, I noticed that the documentation referenced configurations that have since been renamed. This PR updates those references to their new names.
2024-01-02 09:57:48 +00:00
bors
f1de7d7273 Auto merge of #16011 - ClSlaid:feat/settings/proc-macro/rebuild-on-save, r=Veykril
feat: add proc-macro rebuild on save option

Related: #15033

I need some advice on how to test it.
2024-01-02 09:46:21 +00:00
Lukas Wirth
c99089c2b3
Update crates/rust-analyzer/src/handlers/notification.rs 2024-01-02 10:27:41 +01:00
Lukas Wirth
3c8dd9e89e Expose whether a channel has been dropped in lsp-server errors 2024-01-01 14:10:46 +01:00
Martin Huschenbett
b9933fdaaa minor: Simplify implementation of apply_document_changes
While reading through the code base, I stumbled across a piece of code that I found hard to read despite its simple purpose. This is my attempt at making the code easier to understand for future readers.

I won't be offended if this is too minor and not worth your time.
2023-12-30 19:21:35 +01:00
Tetsuharu Ohzeki
efc87092b3 Use Cargo's [workspace.lints.*] to config clippy 2023-12-29 23:51:32 +09:00
Lukas Wirth
2a5b60b186 internal: Update world symbols request definiton, prefer focus range for macros 2023-12-22 11:42:08 +01:00
Lukas Wirth
2e52aa1615 Clean up 2023-12-21 17:24:00 +01:00
Lukas Wirth
7b804552a5 Remove Delimiter::DUMMY_INVISIBLE 2023-12-20 14:00:14 +01:00
Lukas Wirth
f49a2fed3f internal: Move out WithFixture into dev-dep only crate 2023-12-18 15:24:08 +01:00
Lukas Wirth
35620306a6 internal: Move proc-macro knowledge out of base-db 2023-12-18 12:37:18 +01:00
Laurențiu Nicola
e37cf75791 Merge commit '21b06c1beb9bb59369ffd652f5d617bcf6952e05' into sync-from-ra 2023-12-18 09:21:55 +02:00
Lukas Wirth
4c45d23948 fix: Syntax fixup now removes subtrees with fake spans 2023-12-15 13:52:49 +01:00
hkalbasi
7b9595a5ab Run rust-analyzer on rustc tests in metrics 2023-12-15 02:10:25 +03:30
Lukas Wirth
7cc6b0f2e9 Partially revert #16101 2023-12-12 22:53:40 +01:00
Lukas Wirth
ca995d765d fix: Fix import_map::search_dependencies getting confused by assoc and non assoc items with the same name 2023-12-12 15:45:42 +01:00
Kirill Bulatov
8ae42b55e7 Search for parent blocks and items when resolving inlay hints 2023-12-11 15:16:55 +02:00
Kirill Bulatov
be6d34b810 Query for nearest parent block around the hint to resolve
This way, parameter hints will be found for resolution
2023-12-11 14:53:51 +02:00