Commit graph

140 commits

Author SHA1 Message Date
Florian Diebold
fe6c4115f6 Rename ImplItem to ImplBlock
rustc uses the name ImplItem for items in impls, not the impl {} block itself,
which could lead to confusion.
2019-01-04 18:28:36 +01:00
Aleksey Kladov
291d578938 extract area to a crate 2019-01-04 16:58:10 +03:00
Bernardo
3ab328b49a use lsp WorkspaceEdit instead of custom source_file_edits and file_system_edits 2019-01-03 14:20:15 +01:00
Aleksey Kladov
03ea6bcbff use LocalPtr in navigation target 2019-01-03 12:26:40 +03:00
Aleksey Kladov
830abe0c1b use navigation target in API 2019-01-02 17:09:39 +03:00
Aleksey Kladov
d25c89f760 introduce navigation target 2019-01-02 16:53:40 +03:00
bors[bot]
2a65020442 Merge #165
165: Make modules with tests runnable r=farodin91 a=farodin91

Fixes #154

I having problems to traverse the path to module. The main problem is that module_tree only supports `FileId` and not `Module` in files. Any idea?

I need to clean up the code a bit later.

Co-authored-by: Jan Jansen <farodin91@googlemail.com>
2018-12-31 14:15:34 +00:00
Jan Jansen
05daa86634 Make modules with tests runnable
Fixes #154
2018-12-31 15:00:04 +01:00
Aleksey Kladov
a3ee07ac14 fix icons in completion 2018-12-31 16:06:14 +03:00
bors[bot]
2746dacac0 Merge #385
385: Implement DocumentHighlight r=matklad a=DJMcNab

Fixes #80.

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-31 12:37:05 +00:00
DJMcNab
be75e547ce Use TryConv for conversion 2018-12-31 12:17:05 +00:00
DJMcNab
79941a9e70 Implement DocumentHighlight 2018-12-31 11:08:44 +00:00
Aleksey Kladov
0a8d085619 remove backtraces from Cancelled
Hopefully we won't need them for debugging. If we do need them, it
should be easy to add back.
2018-12-31 00:38:50 +03:00
bors[bot]
acc61cc284 Merge #375
375: Move renames into ra_analysis and rename the correct range r=DJMcNab a=DJMcNab

Fixes #230. Supersedes #235.

TODO: add some tests for this

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-30 20:43:58 +00:00
Aleksey Kladov
c2c10b9014 ⬆️ crossbeam
closes #189
2018-12-30 23:23:31 +03:00
DJMcNab
c402b007a3 Move renames into ra_analysis 2018-12-30 18:14:55 +00:00
Aleksander Vognild Burkow
0cb270e75d Simplify failure bail code 2018-12-30 00:21:15 +01:00
Aleksander Vognild Burkow
09c20c8fcf Add better error message for Command failure 2018-12-29 23:38:26 +01:00
Aleksander Vognild Burkow
8b24f158f7 Add support for formatting entire document with rustfmt
Attempting to format a document when rustfmt isn't installed will result
in an error being returned to the frontend. An alternative
implementation would be returning zero replacements.
2018-12-29 21:57:46 +01:00
Aleksey Kladov
11122e29b7 completion for enum variants 2018-12-28 21:07:47 +03:00
Aleksey Kladov
fd33c89207 switch to FileRange 2018-12-28 18:17:43 +03:00
bors[bot]
e422c2e2f4 Merge #325
325: implement translate_offset_with_edit r=matklad a=vemoo

- Implement `translate_offset_with_edit` to resolve #105 
- Add proptest impls for text, offsets and edits and use them in tests for `translate_offset_with_edit` and `LineIndex`
- Added benchmark for `translate_offset_with_edit`

Co-authored-by: Bernardo <berublan@gmail.com>
2018-12-27 12:19:19 +00:00
bors[bot]
1d6dcef5c5 Merge #332
332: Struct types r=matklad a=flodiebold

Infer types for struct fields, and add basic field completions. There's also some code for enums, but I focused on getting structs working.

There's still ways to go before this becomes useful: There's no autoderef (or even reference types) and no inference for `self`, for example.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2018-12-27 10:08:34 +00:00
Aleksey Kladov
93996fecdc add cancelation module & cancelation backtraces 2018-12-27 13:03:32 +03:00
Bernardo
e9c186e48a change to TextEdit to avoid allocation and sort
rename newline to step where applicable
2018-12-25 20:49:18 +01:00
Bernardo
6b2da4e547 use new translate_offset_with_edit for TryConvWith
doc comments
2018-12-25 20:06:49 +01:00
Bernardo
8c9df62c1c move translate_offset_with_edit to ra_editor 2018-12-25 19:59:02 +01:00
Bernardo
881c29192d initial newline translation working
todo:
cleanup, simplify
handle columns
2018-12-25 19:55:05 +01:00
Bernardo
d951979159 test translate_offset_with_edit against simple impl for single edits 2018-12-25 19:49:55 +01:00
Florian Diebold
e5a8089b08 Add . to trigger characters 2018-12-25 15:27:15 +01:00
Florian Diebold
ab0b63992b Implement basic completion for fields 2018-12-25 15:27:15 +01:00
Florian Diebold
4ff1618520 Do name resolution by namespace (types/values) 2018-12-25 15:16:42 +01:00
Aleksey Kladov
21293d0533 fix warning conversion 2018-12-25 02:07:30 +03:00
bors[bot]
b65ba8f1d6 Merge #326
326: resolved #324: remove unnecessary braces in use statement. r=matklad a=gfreezy

Add inspection for unnecessary braces in use statement

Co-authored-by: gfreezy <gfreezy@gmail.com>
2018-12-24 18:39:31 +00:00
gfreezy
29798c763c remove option from Diagnostic 2018-12-24 23:00:18 +08:00
bors[bot]
b052059f86 Merge #302
302: WIP: Support tracing lsp requests. r=DJMcNab a=DJMcNab

EDIT: We need to work out a better way to handle settings before this can be merged. Help wanted

TODO: Debug why decorations are sent even when highlightingOn is disabled
This makes the log volume so high its impossible to work with anyway.
(Continuation of #84 [#99 only disabled using it, not making sure we don't send it]).

These logs can be used in https://microsoft.github.io/language-server-protocol/inspector/

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-24 13:47:27 +00:00
gfreezy
346638c809 add serverity to vscode diagnostics 2018-12-24 00:39:33 +08:00
DJMcNab
a0e8538129 Improve comment 2018-12-23 11:10:12 +00:00
Aleksey Kladov
5c7e8f47a8 less chatty logging 2018-12-22 15:09:08 +03:00
Aleksey Kladov
90f20f8c53 less verbose debug 2018-12-22 12:38:24 +03:00
Aleksey Kladov
2639997973 log times 2018-12-22 11:53:20 +03:00
Aleksey Kladov
498e3a6846 binding icon 2018-12-22 02:24:59 +03:00
Aleksey Kladov
97cb463c9b moar icons 2018-12-22 02:20:14 +03:00
Aleksey Kladov
238b52358d more icons 2018-12-22 02:03:18 +03:00
Aleksey Kladov
f1f2804c71 move completion items to conv 2018-12-22 01:59:32 +03:00
Aleksey Kladov
2351308d92 remove explicit serde_derive 2018-12-21 22:39:59 +03:00
DJMcNab
380733d6d0 Undo the previous mistaken change and make publish_decorations optional
See https://github.com/Microsoft/language-server-protocol/issues/567
for motivations to not require `InitializationOptions`

TODO: Check if there are any other protocol extensions
which should be disabled if not implemented on the client
2018-12-21 17:00:31 +00:00
Aleksey Kladov
4092b8d0b5 make compleion item details private 2018-12-21 15:19:46 +03:00
Aleksey Kladov
b5b44659a4 edits use source-root API 2018-12-21 12:18:14 +03:00
Aleksey Kladov
0063f03e86 hide atom edits a bit 2018-12-21 11:52:32 +03:00