Lukas Wirth
81410ab500
Cleanup FileId stuff
2023-12-02 19:32:53 +01:00
Lukas Wirth
890eb17b4e
Replace ID based TokenMap with proper relative text-ranges / spans
2023-11-28 10:55:39 +01:00
Young-Flash
e0276dc5dd
fix: find Self
reference
2023-11-10 19:54:43 +08:00
Lukas Wirth
712e67cf11
fix: Fix lens location "above_whole_item" breaking lenses
2023-09-13 22:01:04 +02:00
Lukas Wirth
ca6ddd8ea3
Enable rust_analyzer
for cfgs when code is being analyzed by rust-analyzer
2023-09-08 10:49:12 +02:00
Lukas Wirth
53b292478d
internal: Add offset param to token descending API
2023-08-16 10:07:18 +02:00
Josiah Bills
b9cef03230
Updated search to expose some more functions and to make search take the search scope by reference.
2023-07-09 17:30:21 -04:00
Ryo Yoshida
4e793e7859
Use anonymous lifetime where possible
2023-06-29 23:27:28 +09:00
Lukas Wirth
58ac823864
Less eager parsing for module sources
2023-06-17 10:58:52 +02:00
hkalbasi
a481e004b0
Lower const params with a bad id
2023-06-11 00:39:28 +03:30
Lukas Wirth
dc7c6d43c7
Slightly shrink DefMap
2023-06-01 14:46:36 +02:00
Ariel Davis
4a1922fd1a
Depend on nohash-hasher individually
2023-05-06 00:49:23 -07:00
Laurențiu Nicola
7197a27028
Use triomphe Arc
2023-05-02 20:02:43 +03:00
Lukas Wirth
f00dcf9a69
internal: Arc<String> -> Arc<str>
2023-04-22 09:48:37 +02:00
Lukas Wirth
3427d36d0e
fix: Fix search not searching bodies of attributed items
2023-03-09 15:30:17 +01:00
Lukas Wirth
e158dc7246
Remove unnecessary special local handling in search
2023-03-09 15:10:26 +01:00
hkalbasi
61ad6a96ad
Add BindingId
2023-03-06 21:09:08 +03:30
Ryo Yoshida
29c957f973
Lower and handle trait aliases in HIR
2023-03-04 00:24:07 +09:00
Ryo Yoshida
60fa8fefa6
refactor: reduce nesting
2023-02-14 17:34:19 +09:00
Ryo Yoshida
098d9d77b4
Search raw identifiers without prefix
2023-02-14 17:34:14 +09:00
Lukas Wirth
951ee3d0b5
fix: Fix assoc item search finding unrelated definitions
2023-01-24 14:11:02 +01:00
Lukas Wirth
bb4e272d8a
Refine search for const and function assoc items
2023-01-11 17:10:04 +01:00
Daniel Eades
ac3844a0bb
a number of code simplifications
2023-01-10 18:48:51 +00:00
Daniel Eades
cc80c5bd07
remove unnecessary lazy evaluations
2023-01-02 15:02:54 +00:00
Lukas Wirth
17619de711
fix: Fix reference searching only accounting substrings instead of whole identifiers
2022-11-05 13:00:02 +01:00
bors
817a6a8609
Auto merge of #12966 - OleStrohm:master, r=Veykril
...
feat: Display the value of enum variant on hover
fixes #12955
This PR adds const eval support for enums, as well as showing their value on hover, just as consts currently have.
I developed these two things at the same time, but I've realized now that they are separate. However since the hover is just a 10 line change (not including tests), I figured I may as well put them in the same PR. Though if you want them split up into "enum const eval support" and "show enum variant value on hover", I think that's reasonable too.
Since this adds const eval support for enums this also allows consts that reference enums to have their values computed now too.
The const evaluation itself is quite rudimentary, it doesn't keep track of the actual type of the enum, but it turns out that Rust doesn't actually either, and `E::A as u8` is valid regardless of the `repr` on `E`.
It also doesn't really care about what expression the enum variant contains, it could for example be a string, despite that not being allowed, but I guess it's up to the `cargo check` diagnostics to inform of such issues anyway?
2022-09-20 14:01:16 +00:00
Lukas Wirth
b73fa0be9c
Use memmem when searching for usages in ide-db
2022-09-16 16:26:54 +02:00
Lukas Wirth
cadb01c315
Move reference imports filtering into to_proto layer
2022-09-13 14:58:50 +02:00
OleStrohm
997fc46efa
Implemented basic enum const eval
2022-09-12 20:19:13 +01:00
Lukas Wirth
d025c5d8d6
Make use of NoHash hashing for FileId and CrateId
2022-08-25 20:41:49 +02:00
Ryo Yoshida
a3409c3a83
fix: escape keywords used as names in earlier editions
2022-08-17 18:46:17 +09:00
KaDiWa
232176b46a
remove imports that are also in edition 2021's prelude
2022-08-09 01:16:32 +02:00
Lukas Wirth
ddad2847ab
Allow name querying for derive helpers
2022-07-26 09:27:22 +02:00
Lukas Wirth
4e60db2d07
feat: Downmap tokens inside derive helpers
2022-07-26 09:26:47 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
Lukas Wirth
bb4bfae422
fix: Fix search for associated trait items being inconsistent
2022-07-20 13:59:31 +02:00
bors
22e53f1d33
Auto merge of #12549 - bitgaoshu:goto_where_trait_m_impl, r=Veykril
...
feat: Go to implementation of trait methods
try goto where the trait method implies, #4558
2022-07-18 16:29:23 +00:00
Lukas Wirth
38c11bea21
Move convert_to_def_in_trait
into ide-db
2022-07-18 18:28:02 +02:00
Lukas Wirth
976d07e53e
fix: Fix unresolved proc macro diagnostics pointing to macro expansions
2022-07-05 12:46:09 +02:00
bitgaoshu
900b4208fd
rename "trait_def" to "def_in_trait"
2022-06-24 23:04:35 +08:00
bitgaoshu
9e6bff79f4
fix some test due to resolve to where trait m impl
2022-06-24 19:15:16 +08:00
Peh
1f011fa4a3
style: rename crates to kebab case
2022-05-01 10:48:58 +00:00