Commit Graph

1039 Commits

Author SHA1 Message Date
Aleksey Kladov
3cd4112bdc Finalize const&static grammar 2020-07-30 18:02:20 +02:00
Aleksey Kladov
1766aae145 Rename EnumVariant -> Variant 2020-07-30 17:56:53 +02:00
Aleksey Kladov
609680ef97 Rename EnumDef -> Enum 2020-07-30 17:52:53 +02:00
Aleksey Kladov
216a5344c8 Rename StructDef -> Struct 2020-07-30 17:50:40 +02:00
Aleksey Kladov
1ae4721c9c Finalize union grammar 2020-07-30 17:38:52 +02:00
Aleksey Kladov
0a9e3ccc26 Rename FieldDef -> Field 2020-07-30 16:49:13 +02:00
Aleksey Kladov
6f8aa75329 Rename RecordLit -> RecordExpr 2020-07-30 16:21:30 +02:00
Aleksey Kladov
28ef4c375a Rename TypeParamList -> GenericParamList 2020-07-30 15:36:21 +02:00
Aleksey Kladov
eb2f806344 Rename TypeAliasDef -> TypeAlias 2020-07-30 15:25:46 +02:00
Aleksey Kladov
1142112c70 Rename FnDef -> Fn 2020-07-30 15:16:05 +02:00
Aleksey Kladov
b1332670c7 Rename UseItem -> Use 2020-07-30 14:20:33 +02:00
Aleksey Kladov
2984da672e Split ItemList & AssocItemList 2020-07-30 11:50:56 +02:00
Aleksey Kladov
6636f56e79 Rename ModuleItem -> Item 2020-07-30 00:23:03 +02:00
Aleksey Kladov
ba585309ec Replace rand with oorandom 2020-07-29 19:49:10 +02:00
Aleksey Kladov
76202a2c73 Rename NomialDef -> AdtDef 2020-07-29 19:22:15 +02:00
bors[bot]
9a9ddcc297
Merge #5564
5564: SSR: Restrict to current selection if any r=davidlattimore a=davidlattimore

The selection is also used to avoid unnecessary work, but only to the file level. Further restricting unnecessary work is left for later.

Co-authored-by: David Lattimore <dml@google.com>
2020-07-29 09:23:33 +00:00
David Lattimore
fcb6b166fb SSR: Rename position and lookup_context to resolve_context 2020-07-29 19:20:40 +10:00
David Lattimore
cf55806257 SSR: Restrict to current selection if any
The selection is also used to avoid unnecessary work, but only to the
file level. Further restricting unnecessary work is left for later.
2020-07-29 15:06:58 +10:00
Kirill Bulatov
bb1ae85ed0 Allow running more tests at once 2020-07-29 01:03:19 +03:00
Aleksey Kladov
aa09aa36e2 Fold multiline fn parameters 2020-07-27 13:42:36 +02:00
Emil Gardström
2b8dcc15ac add completion for rustc lints 2020-07-27 02:23:21 +02:00
Jonas Schievink
92a4ec80a0 Only display experimental diagnostics when enabled 2020-07-24 17:39:44 +02:00
Jonas Schievink
6f02befee4 Add a builder for DiagnosticSink 2020-07-24 16:30:12 +02:00
David Lattimore
3dac31fe80 SSR: Allow function calls to match method calls
This differs from how this used to work before I removed it in that:
a) It's only one direction. Function calls in the pattern can match
method calls in the code, but not the other way around.
b) We now check that the function call in the pattern resolves to the
same function as the method call in the code.

The lack of (b) was the reason I felt the need to remove the feature
before.
2020-07-24 21:34:00 +10:00
David Lattimore
757f755c29 SSR: Match paths based on what they resolve to
Also render template paths appropriately for their context.
2020-07-24 21:34:00 +10:00
David Lattimore
3975952601 SSR: Pass current file position through to SSR code.
In a subsequent commit, it will be used for resolving paths.
2020-07-24 21:34:00 +10:00
David Lattimore
a45682ed96 Move iteration over all files into the SSR crate
The methods `edits_for_file` and `find_matches_in_file` are replaced with just `edits` and `matches`. This simplifies the API a bit, but more importantly it makes it possible in a subsequent commit for SSR to decide to not search all files.
2020-07-24 21:34:00 +10:00
bors[bot]
8df105b8b2
Merge #5505
5505: Cleanup CFG API r=matklad a=matklad



bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 14:55:22 +00:00
Aleksey Kladov
38e38d9b29 Cleanup CFG API 2020-07-23 16:53:12 +02:00
bors[bot]
7bada8a76d
Merge #5473
5473: Changes to rust-project.json r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-23 13:58:45 +00:00
Aleksey Kladov
b68ef1231d More Rustic API for Env 2020-07-21 17:17:21 +02:00
bors[bot]
9518e2f9d6
Merge #5451 #5463 #5465 #5466
5451: Highlight more cases of SyntaxKind when it is a punctuation r=matklad a=GrayJack

This maybe closes #5406
Closes  #5453

Separate what one expect to be a punctuation semantic token (like `,`, `;`, `(`, etc), and what is not (`&`, `::`, `+`, etc)

5463: Bump lexer r=matklad a=kjeremy

Since we're now on rust 1.45

5465: Bump chalk r=matklad a=kjeremy



5466: Do not show default types in function and closure return values r=matklad a=SomeoneToIgnore

Avoid things like 
<img width="522" alt="image" src="https://user-images.githubusercontent.com/2690773/87985936-1bbe4f80-cae5-11ea-9b8a-5383d896c296.png">


Co-authored-by: GrayJack <gr41.j4ck@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2020-07-21 09:57:46 +00:00
GrayJack
5ca3855c06
On second thought, we want to preserve the textMate here where all punctuation that are from a Attr be highlited as Attribute 2020-07-20 23:37:31 -03:00
GrayJack
04d8dc4a10
# as Attribute
- Issue  #5453
2020-07-20 23:19:29 -03:00
GrayJack
462e0158da
@ as operator 2020-07-20 23:00:13 -03:00
Kirill Bulatov
54cc3fee45 Do not show default types in closures 2020-07-20 23:50:41 +03:00
bors[bot]
21b4e9178f
Merge #5440
5440: Minor perf tweaks per clippy r=matklad a=kjeremy



Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2020-07-20 16:54:57 +00:00
GrayJack
a662228de4
Assingment semantic highlight 2020-07-20 12:36:23 -03:00
GrayJack
54ebb2ce30
Handle semantic highlight when STAR is part of the *{const, mut} 2020-07-20 11:21:40 -03:00
GrayJack
73bab32aef
Highlight more cases of SyntaxKind when it is a punctuation 2020-07-20 09:46:50 -03:00
Jeremy Kolb
17f4d27f12 Minor perf tweaks per clippy 2020-07-19 14:26:24 -04:00
Pascal Hertleif
5516476a86
Fix a typo in completion docs 2020-07-19 18:25:19 +02:00
bors[bot]
2777f8c295
Merge #5423
5423: Correctly resolve assoc. types in path bindings r=matklad a=jonas-schievink

Previously invoking goto def on `impl Iterator<Item<|> = ()>` would go to `Iterator`, not `Item`. This fixes that.

Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-07-17 17:02:28 +00:00
Aleksey Kladov
798f43da50 Fix out of bounds panic in active parameter 2020-07-17 15:44:37 +02:00
Jonas Schievink
cab360fe31 Correctly resolve assoc. types in path bindings 2020-07-17 14:58:49 +02:00
Aleksey Kladov
2c268b9a5f Move tests 2020-07-17 13:37:41 +02:00
bors[bot]
9b5ac1d82f
Merge #5417
5417: Mismatched arg count works for lambdas r=jonas-schievink a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-07-17 11:01:52 +00:00
Aleksey Kladov
d7548a36a7 Unclutter NavigationTarget API 2020-07-17 12:42:48 +02:00
Aleksey Kladov
393b7119bd Add test for fn pointers 2020-07-17 12:04:12 +02:00
Aleksey Kladov
371c5aec1c call_info works with closures 2020-07-17 12:04:10 +02:00