diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-09-09 09:04:00 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-09 09:04:00 +0100 |
commit | 1db08a54c20c244718e2378272c72ae5c6651f06 (patch) | |
tree | 90fe99eb39d045d9bac34cc200a74d0410d51763 /crates/ra_lsp_server/src/main_loop | |
parent | 72259b67bf2393bec1faf6a9f95a575d6fe9cfea (diff) | |
parent | 9ed21d65fb6727f6de4961dfa440981864451af6 (diff) |
Merge #1784
1784: Support textual scoped macros r=matklad a=uHOOCCOOHu
Refactor the old simulation with `global_macro_scope`.
Now it is quite accurate to resolve textual scoped macros.
- Expand textual scoped macros in item and non-item place.
- Support `#[macro_use]` on `mod`.
- Textual scoped macros are collected into `nameres::ModuleScope`, so I think it makes #1727 easier to fix.
- It is implemented in a simple way to `clone()` current scoped macro ids into sub-modules. Though only indices are cloned, it will still increase some resolving time. Well, I've not bench-marked yet.
In my test with vscode extension, it can now successfully expand `dbg!` from `std` without `std::` prefix. "Goto definition" also works. Screenshot here:
<img width="281" alt="Screenshot_20190907_043442" src="https://user-images.githubusercontent.com/14816024/64458794-ddb47900-d128-11e9-95e3-1c8569978825.png">
Co-authored-by: uHOOCCOOHu <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop')
0 files changed, 0 insertions, 0 deletions