Ali Bektas
0347f81244
Update tests
2024-01-19 15:01:46 +01:00
Lukas Wirth
507448652a
Fix rename test fixtures not accounting for multi file edits
2024-01-18 10:47:02 +01:00
Ali Bektas
9bd9a17ce5
Add a new config to allow renaming of non-local items
...
With #15656 we started disallowing renaming of non-local items.
Although this makes sense there are some false positives that
impacted users' workflows. So this config aims to mitigate this
by giving users the liberty to disable this feature.
2024-01-18 00:26:22 +01:00
Johann Hemmann
656ac104c9
Do not extract FileId for file_system_edits
2024-01-04 14:29:41 +01:00
Johann Hemmann
ea675ab888
Insert newline at the end
2024-01-04 14:01:03 +01:00
Johann Hemmann
f2b872a3c5
Switch to Vec, because we do want to have duplicate keys
2024-01-04 14:01:03 +01:00
Johann Hemmann
dea149d733
Switch to BTreeMap for stable ordering
2024-01-04 14:01:03 +01:00
Johann Hemmann
05a3c2ff20
Make filtering a function
2024-01-04 14:01:03 +01:00
Johann Hemmann
d1f4171bb6
Refactor to iterators
2024-01-04 14:01:03 +01:00
Johann Hemmann
084acc287a
Extract relevant information into hashmaps
2024-01-04 14:01:02 +01:00
Lukas Wirth
d2cd30007c
Implicit format args support
2023-12-05 17:07:00 +01:00
Lukas Wirth
890eb17b4e
Replace ID based TokenMap with proper relative text-ranges / spans
2023-11-28 10:55:39 +01:00
Ali Bektas
6dc7fa9423
v3
2023-09-10 23:19:58 +02:00
Ali Bektas
43edb51b21
Generalize disallowing of definition renaming
2023-09-10 23:19:58 +02:00
Ali Bektas
7ae70a06ce
Disallow renaming of non-local structs
2023-09-10 23:19:58 +02:00
Lukas Wirth
bcff166b3a
Add ExternCrateDecl to HIR
2023-08-02 11:52:55 +02:00
DropDemBits
89f7bf7411
Add SnippetEdit
to be alongside source changes
...
Rendering of snippet edits is deferred to places using source change
2023-07-12 00:43:41 -04:00
hkalbasi
ac04bfd7a7
Add View Mir
command and fix some bugs
2023-03-06 21:09:09 +03:30
Ryo Yoshida
098d9d77b4
Search raw identifiers without prefix
2023-02-14 17:34:14 +09:00
Ryo Yoshida
57f0e9c100
Disallow invalid raw ident names
2023-02-13 18:45:19 +09:00
Ryo Yoshida
9b0daf20c9
fix: don't include r#
prefix in filesystem changes
2023-02-13 18:44:53 +09:00
Alex Vasilev
5d013a79d6
exclude '
2023-01-24 13:19:20 +05:30
Alex Vasilev
5f1796f837
uncomment check
2023-01-24 12:45:51 +05:30
Alex Vasilev
8678b92218
Allow renaming lifetiems and labels without leading apostrophe
2023-01-24 12:43:13 +05:30
Daniel Eades
efd2c20e96
remove useless conversions
2023-01-02 15:02:54 +00:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Lukas Wirth
17619de711
fix: Fix reference searching only accounting substrings instead of whole identifiers
2022-11-05 13:00:02 +01:00
Amos Wenger
7e285e1ef5
Run cargo fmt
2022-07-20 15:06:15 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
harpsword
4b3164f129
fix: ignore renames for crate root
2022-07-10 10:45:03 +08:00
Nikita Podoliako
d98c04aac1
fix(ide-db): correct single-file module rename
2022-05-28 15:07:22 +03:00
bors[bot]
49847a25ae
Merge #11883
...
11883: fix(ide): move moudle directory when rename r=rainy-me a=rainy-me
fix : #10992
Added `FileSystemEdit::MoveDir` variant for move dirs. Original implemented as recursively move child mod files but had many issues like
1. left empty dir after rename file
2. only affect rust file
3. not performant
so changed to current version
Co-authored-by: rainy-me <github@yue.coffee>
2022-04-12 15:17:00 +00:00
rainy-me
3dd581b97d
fix: move dir on rename mod
2022-04-12 23:01:53 +09:00
Lukas Wirth
15e7112da3
fix: Check whether a parameter can be converted to a local
2022-04-09 00:55:45 +02:00
Lukas Wirth
32bf7af83e
Support locals with multiple declaration sites
2022-03-04 19:49:08 +01:00
Tianyi Song
e62e926a8a
Use text range of name after macro expansion
2022-02-11 14:17:12 +08:00
TheDoctor314
add80bccfc
Add test
...
The rename function should not change any path segments that refer to a
module by super.
2022-02-08 21:19:14 +05:30
Lukas Wirth
7776aad166
internal: Flatten Definition::ModuleDef
variant
2021-11-11 00:05:53 +01:00
Lukas Wirth
439a8194b0
Replace more Name::to_string usages with Name::to_smol_str
2021-11-04 18:12:05 +01:00
Anatol Ulrich
83927e08a8
Update crates/ide/src/rename.rs
...
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-11-03 15:44:32 +01:00
Anatol Ulrich
9bce4d6696
accept identical Indels when merging; add rename test case
2021-11-02 21:38:38 +01:00
Anatol Ulrich
1ac35532c4
remove TODO comment
2021-10-27 17:26:38 +02:00
Anatol Ulrich
df9fb9b159
re-introduce always!
2021-10-27 17:25:42 +02:00
Anatol Ulrich
28c73f8374
unwrap--
2021-10-27 17:23:23 +02:00
Anatol Ulrich
4a1a5ff54e
fix logic error: alias detection was too lenient
2021-10-27 17:20:12 +02:00
Anatol Ulrich
6cd15c296d
wip
2021-10-27 15:40:49 +02:00
Anatol Ulrich
8d3ac328ee
remove resolved TODO questions
2021-10-27 15:40:30 +02:00
Anatol Ulrich
f244ed6a1a
doxx
2021-10-27 04:46:02 +02:00
Anatol Ulrich
2e0610e64e
one down
2021-10-27 04:42:58 +02:00
Anatol Ulrich
95199ac30b
make imports less odd
2021-10-27 04:36:32 +02:00