Aleksey Kladov
19115e9fab
Support cross-crate marks
2020-03-04 11:55:25 +01:00
Florian Diebold
e55fc286fc
Fix completion snippet for reexported functions
...
Fixes #3356 .
2020-03-03 20:49:50 +01:00
Aleksey Kladov
53cab1cd21
Fix imports
2020-03-03 18:54:39 +01:00
Aleksey Kladov
177229bfde
Move reference classification to ra_ide_db
...
Lost some marks along the way :-(
2020-03-03 18:50:15 +01:00
Aleksey Kladov
d49a4d1863
Rename NameDefinition -> Definition
2020-03-03 18:40:27 +01:00
Aleksey Kladov
7d71cc72b5
Refactor reference search a bit
2020-03-03 18:22:52 +01:00
bors[bot]
674770ef04
Merge #3422
...
3422: Add profile call r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-03-03 16:17:38 +00:00
Aleksey Kladov
2ff2c29a1e
Add profile call
2020-03-03 17:11:25 +01:00
Aleksey Kladov
cf0ececb7a
Highlight assist tests
2020-03-03 17:03:46 +01:00
Aleksey Kladov
8f3677a94a
Remove stray dbg
2020-03-03 16:41:52 +01:00
Aleksey Kladov
1a6f51da66
Simplify: remove couple of useless functions
2020-03-02 19:03:46 +01:00
Aleksey Kladov
2716a1fa3f
More principled approach for gotodef for field shorhand
...
Callers can now decide for themselves if they should prefer field or
local definition. By default, it's the local.
2020-03-02 19:00:38 +01:00
bors[bot]
ea67e2346e
Merge #3384
...
3384: fix #2377 super::super::* r=flodiebold a=JoshMcguigan
Thanks @matklad for the detailed explanation on #2377 . I believe this fixes it.
One thing I'm not sure about is you said the fix would involve changing `crates/ra_hir_def/src/path/lower/lower.rs`, but I only changed `crates/ra_hir_def/src/path/lower/lower_use.rs`. I'm not sure what kind of test code I'd have to write to expose the issue in `lower.rs`, but I'd be happy to add it if you are able to provide additional guidance.
closes #2377
Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
2020-03-01 13:36:44 +00:00
Josh Mcguigan
0057d1e10d
fix completion for super::super::
2020-02-29 21:04:21 -08:00
Aleksey Kladov
584c8d9875
Slightly refactor inlay hints
2020-02-29 23:24:50 +01:00
Aleksey Kladov
2e0d89401a
Remove debug print
2020-02-29 23:03:49 +01:00
Aleksey Kladov
a1e1869554
Rename ast::ImplBlock -> ast::ImplDef
2020-02-29 21:33:15 +01:00
Aleksey Kladov
5f8b37563e
Cleanup editing API
2020-02-29 13:51:23 +01:00
bors[bot]
c692e07b4f
Merge #3367
...
3367: Fix highlighting of const patterns r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-28 15:56:07 +00:00
Aleksey Kladov
56ce34c6a7
Correctly flag 'lifetime definitions as definitions
2020-02-28 16:53:12 +01:00
Aleksey Kladov
5ebfcb9cb7
Fix highlighting of const patterns
2020-02-28 16:38:36 +01:00
bors[bot]
93f632ca4e
Merge #3366
...
3366: Simpilfy original_range logic r=matklad a=edwin0cheng
This PR fixed another [bug](https://github.com/rust-analyzer/rust-analyzer/issues/3000#issuecomment-592474844 ) which incorrectly map the wrong range of `punct` in macro_call and simplify the logic a little bit by introducing an `ascend_call_token` function.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-02-28 15:07:33 +00:00
Edwin Cheng
7a5ff0f37c
Simpilfy origin_range logic
2020-02-28 22:53:59 +08:00
Aleksey Kladov
209eb32796
Classify name takes const patterns into account
2020-02-28 15:27:52 +01:00
Aleksey Kladov
da40149572
Fix union classification
2020-02-28 15:03:09 +01:00
Aleksey Kladov
9464ca97c9
Fix highlighting test
2020-02-28 14:47:33 +01:00
Aleksey Kladov
701cf43606
Cleanup highlighting tags
2020-02-28 12:13:37 +01:00
Aleksey Kladov
996e18846d
add more tags
2020-02-28 10:39:31 +01:00
Edwin Cheng
cda04d2077
Fix typo
2020-02-28 15:39:34 +08:00
Edwin Cheng
5f30dd6f72
Remove hover::type_of
2020-02-28 11:37:22 +08:00
Aleksey Kladov
e74484e133
Refactor string literals
2020-02-27 17:19:53 +01:00
Aleksey Kladov
fedab39011
Merge pull request #3350 from edwin0cheng/give-up-hover-in-builtin-macro
...
Ignore hover on builtin macro
2020-02-27 16:48:22 +01:00
Aleksey Kladov
c6247f74c7
Basic injections
2020-02-27 16:16:13 +01:00
Edwin Cheng
c42bbc5e37
Ignore hover on builtin macro
2020-02-27 23:03:18 +08:00
Aleksey Kladov
8215b74032
Move tests to a new file
2020-02-27 14:20:22 +01:00
Aleksey Kladov
695460fbf5
More cleanup
2020-02-27 14:14:24 +01:00
Aleksey Kladov
a2dbdbba00
Split loop into orthogonal phases
2020-02-27 11:56:42 +01:00
Aleksey Kladov
9bb1718639
Cleanup
2020-02-27 11:39:54 +01:00
Aleksey Kladov
819bbd0864
Minor cleanup
2020-02-27 11:37:21 +01:00
bors[bot]
50956f89fc
Merge #3285
...
3285: Handle trivia in Structural Search and Replace r=matklad a=adamrk
Addresses the second point of https://github.com/rust-analyzer/rust-analyzer/issues/3186 .
Structural search and replace will now match code that has varies from the pattern in whitespace or comments.
One issue is that it's not clear where comments in the matched code should go in the replacement. With this change they're just tacked on at the end, which can cause some unexpected moving of comments (see the last test example).
Co-authored-by: adamrk <ark.email@gmail.com>
2020-02-27 08:54:18 +00:00
Aleksey Kladov
2374f8ddd8
Renam module
2020-02-27 09:46:41 +01:00
bors[bot]
2180591593
Merge #3335
...
3335: Refactor highlighting a bit r=matklad a=matklad
bors r+
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-27 08:32:44 +00:00
Aleksey Kladov
9784ab9f39
Move html highlightig to a separate module
2020-02-27 09:32:00 +01:00
Aleksey Kladov
995c46024b
Fix html tests
2020-02-27 09:32:00 +01:00
Aleksey Kladov
f7db49bfc6
Better highlightign API
2020-02-27 09:32:00 +01:00
Shotaro Yamada
33de107ed9
Remove unused dependencies
2020-02-27 14:04:13 +09:00
Edwin Cheng
61fd6c6270
Use text_range::extend_to
2020-02-27 10:06:48 +08:00
Aleksey Kladov
913cdcee8f
Merge pull request #3325 from edwin0cheng/skip-trival-token
...
Skip trival token in original_range
2020-02-26 17:58:32 +01:00
Aleksey Kladov
f38bac48e5
More type safety for highlighting
2020-02-26 17:17:15 +01:00
Edwin Cheng
553254973e
Skip trival token in original_range
2020-02-27 00:12:26 +08:00