rust-analyzer/crates
Wilfred Hughes fcecbc5467 fix: Highlight unlinked files consistently with inactive files
Currently, rust-analyzer highlights the entire region when a `cfg` is
inactive (e.g. `#[cfg(windows)]` on a Linux machine). However,
unlinked files only highlight the first three characters of the file.

This was introduced in #8444, but users have repeatedly found
themselves with no rust-analyzer support for a file and unsure
why (see e.g. #13226 and the intentionally prominent pop-up added in
PR #14366).

(Anecdotally, we see this issue bite our users regularly, particularly
people new to Rust.)

Instead, highlight the entire inactive file, but mark it as all as
unused. This allows users to hover and run the quickfix from any line.

Whilst this is marginally more prominent, it's less invasive than a
pop-up, and users do want to know why they're getting no rust-analyzer
support in certain files.
2024-06-05 17:44:07 -07:00
..
base-db Push macro-parsing error calculation out of fundamental queries 2024-05-13 16:56:26 +02:00
cfg fix: Fix doc comment desugaring for proc-macros 2024-04-27 13:30:51 +02:00
flycheck Auto merge of #17315 - hamirmahal:style/simplify-string-interpolation, r=Veykril 2024-06-03 12:29:27 +00:00
hir Resolve #17344 by using .get(…) instead of […] in TypeOrConstParam::source(…) 2024-06-05 11:03:56 +02:00
hir-def Try caching macro calls more aggressively 2024-06-04 15:23:00 +02:00
hir-expand Cache parse trees in Semantics 2024-06-04 15:29:24 +02:00
hir-ty Simplify 2024-06-03 19:06:58 +02:00
ide Use dyn cache for Semantics macro resolution 2024-06-04 16:25:38 +02:00
ide-assists Auto merge of #17315 - hamirmahal:style/simplify-string-interpolation, r=Veykril 2024-06-03 12:29:27 +00:00
ide-completion Auto merge of #17315 - hamirmahal:style/simplify-string-interpolation, r=Veykril 2024-06-03 12:29:27 +00:00
ide-db Auto merge of #17282 - jkelleyrtp:jk/filter-by-underscorte, r=Veykril 2024-06-04 08:37:56 +00:00
ide-diagnostics fix: Highlight unlinked files consistently with inactive files 2024-06-05 17:44:07 -07:00
ide-ssr internal: refactor prefer_no_std/prefer_prelude bools into a struct 2024-05-22 20:46:30 +02:00
intern Fix new clippy lints 2024-04-01 17:55:56 +02:00
limit Simplify 2024-04-06 13:12:07 +02:00
load-cargo Hash file contents to verify whether file actually changed 2024-05-14 11:55:12 +02:00
mbe Cleanup some inert attribute stuff 2024-06-04 12:38:20 +02:00
parser style: simplify string interpolation 2024-05-30 16:18:49 -07:00
paths Auto merge of #17315 - hamirmahal:style/simplify-string-interpolation, r=Veykril 2024-06-03 12:29:27 +00:00
proc-macro-api style: simplify string interpolation 2024-05-30 16:18:49 -07:00
proc-macro-srv Auto merge of #16257 - lnicola:rustc-check-cfg, r=Veykril 2024-04-18 12:13:06 +00:00
proc-macro-srv-cli Auto merge of #16257 - lnicola:rustc-check-cfg, r=Veykril 2024-04-18 12:13:06 +00:00
profile Fix typos 2024-05-15 18:55:27 +02:00
project-model style: simplify string interpolation 2024-05-30 16:18:49 -07:00
rust-analyzer Add debug info to invalid offset error 2024-06-05 10:20:05 +02:00
salsa Cleanup some inert attribute stuff 2024-06-04 12:38:20 +02:00
sourcegen Fix new clippy lints 2024-04-01 17:55:56 +02:00
span style: simplify string interpolation 2024-05-30 16:18:49 -07:00
stdx Track hashes for file contents 2024-05-14 11:21:04 +02:00
syntax Auto merge of #17315 - hamirmahal:style/simplify-string-interpolation, r=Veykril 2024-06-03 12:29:27 +00:00
test-fixture style: simplify string interpolation 2024-05-30 16:18:49 -07:00
test-utils style: simplify string interpolation 2024-05-30 16:18:49 -07:00
text-edit Merge commit 'ddf105b646c6749a2de2451c9a499a354eec79c2' into sync-from-ra 2024-02-11 08:40:19 +02:00
toolchain internal: Enforce utf8 paths 2024-03-19 15:39:00 +01:00
tt Cleanup some inert attribute stuff 2024-06-04 12:38:20 +02:00
vfs Hash file contents to verify whether file actually changed 2024-05-14 11:55:12 +02:00
vfs-notify discard when the path is invalid utf8 symbol. 2024-04-30 15:39:05 +08:00