Aleksey Kladov
8ed7e751b6
Ensure that semantic tokens are single-line
2020-02-27 16:06:46 +01: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
a8e68ff814
Color constants
2020-02-27 09:32:00 +01: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
kjeremy
bc1985037f
Update lsp-types
2020-02-26 16:50:47 -05:00
Aleksey Kladov
c88ba9c4bd
Fix
2020-02-26 22:10:23 +01:00
Aleksey Kladov
d1e7a20c00
Merge pull request #3327 from matklad/bitsetoops
...
Fix bitset ops
2020-02-26 18:32:13 +01:00
Aleksey Kladov
2a2d289e5f
Fix bitset ops
2020-02-26 18:09:49 +01: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
Edwin Cheng
871dc2bd3c
Remove duplicate comment
2020-02-26 20:55:11 +08:00
Edwin Cheng
ffdc740446
Add recursive support in original_range
2020-02-26 20:53:00 +08:00
Aleksey Kladov
ade0176c20
Remove dead code
2020-02-26 13:26:53 +01:00
Aleksey Kladov
09bc7ca74d
Reduce visibility
2020-02-26 13:22:46 +01:00
Aleksey Kladov
c3a4c4429d
Refactor primary IDE API
...
This introduces the new type -- Semantics.
Semantics maps SyntaxNodes to various semantic info, such as type,
name resolution or macro expansions.
To do so, Semantics maintains a HashMap which maps every node it saw
to the file from which the node originated. This is enough to get all
the necessary hir bits just from syntax.
2020-02-26 12:55:50 +01:00
Aleksey Kladov
04deae3dba
Merge pull request #3317 from matklad/no-unicase
...
Actually drop unicase dependency
2020-02-26 12:00:33 +01:00
Aleksey Kladov
8046622871
Actually drop unicase dependency
2020-02-26 11:38:33 +01:00
Aleksey Kladov
52fd19621c
Remove code duplication in tests
2020-02-26 11:25:07 +01:00
adamrk
b1ee6d17a4
get matches from code.descendants
2020-02-25 23:53:29 +01:00
adamrk
94603d9848
save comments as ra_syntax::ast::Comment
2020-02-25 23:35:16 +01:00
kjeremy
fa355d6339
Rename back to highlight and check event's again highlight range
2020-02-25 14:44:47 -05:00
Jeremy Kolb
8f6f864547
Semantic Ranges
2020-02-25 11:37:43 -05:00
bors[bot]
d3040c0deb
Merge #3305
...
3305: Simplify r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-02-25 13:59:44 +00:00
Aleksey Kladov
d7da42bd40
Simplify
2020-02-25 14:59:13 +01:00
Aleksey Kladov
469011169b
⬆️ rowan
2020-02-25 14:44:51 +01:00
Aleksey Kladov
6542ab89ce
Simplify
2020-02-25 13:49:34 +01:00
bors[bot]
3853a3b643
Merge #3298
...
3298: Bump chalk and replace TypeFamily with Interner r=flodiebold a=lnicola
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-02-25 11:59:47 +00:00
Aleksey Kladov
136151515a
Replace generic with a concrete type
2020-02-25 12:43:08 +01:00
Jeremy Kolb
17ffdf9c27
Add docs
2020-02-24 21:17:20 -05:00
kjeremy
9f0cfb7ad2
Teach the server about Semantic Tokens proposed LSP
2020-02-24 20:59:58 -05:00
Laurențiu Nicola
ed69482d90
Bump chalk and replace TypeFamily with Interner
2020-02-24 22:36:57 +02:00
Aleksey Kladov
f551e50c16
When joining lines, unwrap trivial diverging blocks
2020-02-24 17:17:05 +01:00
Kirill Bulatov
7f3c0e8564
Omit type hints for enum variant bind pats
2020-02-24 10:32:46 +03:00
adamrk
4f1d90e73b
Handle trivia in strucural search and replace
2020-02-23 22:14:47 +01:00
Yoshua Wuyts
b4970b0fe9
Add suggestion for failed path resolution
...
This adds https://github.com/rust-analyzer/rust-analyzer/issues/3245 as an inline help text for when path resolution fails.
2020-02-23 15:51:32 +01:00
Kirill Bulatov
b2a7b29bb9
Style fixes
2020-02-23 13:02:00 +03:00
Kirill Bulatov
c200dba167
Add basic parameter name hints heuristics
2020-02-23 12:49:53 +03:00
Kirill Bulatov
ca4557ac52
Fix the tests
2020-02-23 01:44:15 +03:00