]>
git.lizzy.rs Git - rust.git/log
bors[bot] [Thu, 7 Mar 2019 17:35:57 +0000 (17:35 +0000)]
Merge #948
948: Fix test_missing_module_code_action_in_json_project on Windows r=matklad a=vipentti
The test would fail on Windows due to the paths not being properly escaped for
JSON.
In addition adds extra braces around the fn main to actually introduce braces in
the file.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Thu, 7 Mar 2019 16:25:35 +0000 (18:25 +0200)]
Fix test_missing_module_code_action_in_json_project on Windows
The test would fail on Windows due to the paths not being properly escaped for
JSON.
In addition adds extra braces around the fn main to actually introduce braces in
the file.
bors[bot] [Thu, 7 Mar 2019 17:23:59 +0000 (17:23 +0000)]
Merge #949
949: Specify derive feature for serde r=matklad a=pcpthm
`ra_project_model` build will fail when no dependencies are using this feature. Reproduced by creating a crate depending on `ra_batch`.
Co-authored-by: pcpthm <pcpthm@gmail.com>
pcpthm [Thu, 7 Mar 2019 16:58:29 +0000 (01:58 +0900)]
Specify derive feature for serde
bors[bot] [Thu, 7 Mar 2019 16:10:36 +0000 (16:10 +0000)]
Merge #944
944: Add support for goto definition and hover on Self r=matklad a=vipentti
This fixes #943
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Thu, 7 Mar 2019 08:32:39 +0000 (10:32 +0200)]
Add support for goto definition and hover on Self
This fixes #943
bors[bot] [Thu, 7 Mar 2019 14:48:37 +0000 (14:48 +0000)]
Merge #946
946: when loading workspace, say how many packages were loaded r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Thu, 7 Mar 2019 14:46:17 +0000 (17:46 +0300)]
when loading workspace, say how many packages were loaded
this should help to debug configuration issues, when you see `0
packages loaded` or something like that.
bors[bot] [Thu, 7 Mar 2019 11:36:04 +0000 (11:36 +0000)]
Merge #939
939: Initial implementation of project-lock.json. r=davidtwco a=davidtwco
Fixes #792.
This PR adds a initial implementation of project-lock.json, a build
system agnostic method of specifying the crate graph and roots.
Co-authored-by: David Wood <david@davidtw.co>
David Wood [Thu, 7 Mar 2019 11:28:19 +0000 (12:28 +0100)]
Remove rust-project.json test w/ dependencies.
bors[bot] [Thu, 7 Mar 2019 09:57:04 +0000 (09:57 +0000)]
Merge #942
942: Hover for associated items in patterns r=matklad a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
David Wood [Wed, 6 Mar 2019 23:53:26 +0000 (00:53 +0100)]
Add test demonstrating logic for handling deps.
David Wood [Wed, 6 Mar 2019 23:39:50 +0000 (00:39 +0100)]
Rename and change `add_roots` to return a `Vec`.
David Wood [Tue, 5 Mar 2019 21:29:23 +0000 (22:29 +0100)]
Initial implementation of project-lock.json.
This commit adds a initial implementation of project-lock.json, a build
system agnostic method of specifying the crate graph and roots.
kjeremy [Wed, 6 Mar 2019 19:40:42 +0000 (14:40 -0500)]
Use source map
kjeremy [Wed, 6 Mar 2019 16:39:11 +0000 (11:39 -0500)]
Hover for associated items in patterns
bors[bot] [Wed, 6 Mar 2019 12:21:55 +0000 (12:21 +0000)]
Merge #933
933: Check installed extension r=matklad a=c410-f3r
Fixes #918.
Edit: Windows encoding for Unicode is UTF-16 so String::from_utf8 will probably fail unless `Vec<u8>` is already UTF-8 somehow, which I don't know for sure.
Co-authored-by: Caio <c410.f3r@gmail.com>
bors[bot] [Wed, 6 Mar 2019 11:53:05 +0000 (11:53 +0000)]
Merge #941
941: :arrow_up: vfs r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Wed, 6 Mar 2019 11:52:42 +0000 (14:52 +0300)]
:arrow_up: vfs
bors[bot] [Wed, 6 Mar 2019 09:56:16 +0000 (09:56 +0000)]
Merge #940
940: Show workspace loaded notification r=matklad a=vipentti
This fixes #935
This adds support for more `InitializationOptions` which are provided by the client.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Wed, 6 Mar 2019 09:34:38 +0000 (11:34 +0200)]
Add showWorkspaceLoadedNotification to vscode client
This allows users to control whether or not they want to see the "workspace
loaded" notification.
This is done on the server side using InitializationOptions which are provided
by the client. By default show_workspace_loaded is true, meaning the
notification is sent.
Caio [Tue, 5 Mar 2019 21:19:36 +0000 (18:19 -0300)]
Check installed extension
Ville Penttinen [Tue, 5 Mar 2019 20:25:24 +0000 (22:25 +0200)]
Rename feedback to show_message
Ville Penttinen [Tue, 5 Mar 2019 20:20:11 +0000 (22:20 +0200)]
Remove InternalFeedback
Ville Penttinen [Tue, 5 Mar 2019 19:59:01 +0000 (21:59 +0200)]
Send an actual ShowMessage instead of InternalFeedback in feedback()
This now allows us to send a notification that can be shown in the UI when the
workspace has been loaded.
Additionally this removes the need for internal_mode flag.
bors[bot] [Tue, 5 Mar 2019 15:31:10 +0000 (15:31 +0000)]
Merge #938
938: Updates r=matklad a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Tue, 5 Mar 2019 15:26:36 +0000 (10:26 -0500)]
Updates
bors[bot] [Tue, 5 Mar 2019 14:11:43 +0000 (14:11 +0000)]
Merge #936
936: dont produce giant debug dumps r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 5 Mar 2019 14:09:48 +0000 (17:09 +0300)]
dont produce giant debug dumps
bors[bot] [Tue, 5 Mar 2019 13:33:32 +0000 (13:33 +0000)]
Merge #934
934: show message in client's UI if workspace fails to load r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 5 Mar 2019 13:24:59 +0000 (16:24 +0300)]
show message in client's UI if workspace fails to load
bors[bot] [Tue, 5 Mar 2019 10:28:24 +0000 (10:28 +0000)]
Merge #930
930: Add support for parsing multiple if and while-let patterns r=matklad a=vipentti
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Tue, 5 Mar 2019 09:28:53 +0000 (11:28 +0200)]
Introduce pattern_list to parse pipe separated patterns
pattern_list comes in two variants, one uses the default PAT_RECOVERY_SET as the
recovery set, while other allows the user to provide a recovery set.
bors[bot] [Tue, 5 Mar 2019 07:30:19 +0000 (07:30 +0000)]
Merge #912
912: Make goto definition/hover work for associated items r=matklad a=kjeremy
Just functions so far. Looking for comments.
Fixes #911
Towards #832
Co-authored-by: kjeremy <kjeremy@gmail.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Ville Penttinen [Mon, 4 Mar 2019 17:10:14 +0000 (19:10 +0200)]
Add support for parsing multiple if and while-let patterns
kjeremy [Mon, 4 Mar 2019 14:52:48 +0000 (09:52 -0500)]
Use impl_froms!
kjeremy [Mon, 4 Mar 2019 14:49:18 +0000 (09:49 -0500)]
Make ExpOrPatId private
bors[bot] [Mon, 4 Mar 2019 14:48:55 +0000 (14:48 +0000)]
Merge #929
929: allow `mut ident` patterns in trait methods r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 4 Mar 2019 14:47:02 +0000 (17:47 +0300)]
allow `mut ident` patterns in trait methods
closes #928
bors[bot] [Mon, 4 Mar 2019 13:40:34 +0000 (13:40 +0000)]
Merge #927
927: allow aliases in underscores r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 4 Mar 2019 13:38:54 +0000 (16:38 +0300)]
allow aliases in underscores
this helps with
use foo::Trait as _;
syntax
Jeremy Kolb [Mon, 4 Mar 2019 13:34:41 +0000 (08:34 -0500)]
Format
Jeremy Kolb [Sat, 2 Mar 2019 19:57:40 +0000 (14:57 -0500)]
Add NavigationTarget::from_impl_item
Jeremy Kolb [Sat, 2 Mar 2019 19:09:31 +0000 (14:09 -0500)]
Remove commented out code
Jeremy Kolb [Sat, 2 Mar 2019 19:05:37 +0000 (14:05 -0500)]
Use ImplItems instead of just Function
kjeremy [Fri, 1 Mar 2019 23:26:49 +0000 (18:26 -0500)]
Make goto definition/hover resolve constructors
bors[bot] [Mon, 4 Mar 2019 12:49:37 +0000 (12:49 +0000)]
Merge #926
926: allow vararg functions r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
bors[bot] [Mon, 4 Mar 2019 12:42:21 +0000 (12:42 +0000)]
Merge #925
925: improve error recovery r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 4 Mar 2019 11:24:02 +0000 (14:24 +0300)]
improve error recovery
parse the contents of error block as an expression
Aleksey Kladov [Mon, 4 Mar 2019 11:34:59 +0000 (14:34 +0300)]
allow vararg functions
Aleksey Kladov [Mon, 4 Mar 2019 11:17:31 +0000 (14:17 +0300)]
extract block contents into a function
bors[bot] [Mon, 4 Mar 2019 10:58:08 +0000 (10:58 +0000)]
Merge #916
916: Error handling for macros r=matklad a=detrumi
Part of #720
Co-authored-by: Wilco Kusee <wilcokusee@gmail.com>
bors[bot] [Mon, 4 Mar 2019 10:50:40 +0000 (10:50 +0000)]
Merge #924
924: Improve show syntax tree r=matklad a=vipentti
This implements some of the features discussed in #820.
You can now select a range of syntax in a file and then use "Show Syntax Tree" to show its syntax. In addition you can select a range of syntax that is inside a string (typically test cases) and show its syntax as well.
Previous behavior is still available, simply use "Show Syntax Tree" without a selection, and you get the live updating syntax tree. Additionally now the live updating tree will update when the active file is changed. Previously you had to type something in the new file to get the syntax tree to update.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Mon, 4 Mar 2019 07:19:46 +0000 (09:19 +0200)]
Allow syntax strings to contain test markers
We simply remove all the CUSTOM_MARKERS before attempting to parse the file.
This allows for the syntax selection to work with most of the test strings.
Ville Penttinen [Mon, 4 Mar 2019 06:54:54 +0000 (08:54 +0200)]
Implement syntax tree support for syntax inside string
This allows us to select a string or portions of it and try parsing it as rust
syntax. This is mostly helpful when developing tests where the test
itself contains some rust syntax as a string.
Ville Penttinen [Sun, 3 Mar 2019 20:03:37 +0000 (22:03 +0200)]
Allow syntax tree to update when changing files
Previously when using the file based syntax tree, it would not update until a
change had been made in the new file. Now we automatically update the syntax
tree to match the current file.
Ville Penttinen [Sun, 3 Mar 2019 19:54:51 +0000 (21:54 +0200)]
Rename syntaxtree text provider to SyntaxTreeContentProvider
Ville Penttinen [Sun, 3 Mar 2019 19:21:40 +0000 (21:21 +0200)]
Add vscode support for range in SyntaxTreeParams
This enables the client to use a command to either show the live-updating
version of the syntax tree for the current file. Or optionally when a selected
range is provided, we then provide a snapshot of the syntax tree for the range.
Wilco Kusee [Sun, 3 Mar 2019 19:33:50 +0000 (20:33 +0100)]
Add expander unit tests
Ville Penttinen [Sun, 3 Mar 2019 10:02:55 +0000 (12:02 +0200)]
Add optional range parameter to SyntaxTreeParams
When range is provided, instead of showing the syntax for the whole file, we'll
show the syntax tree for the given range.
Wilco Kusee [Sun, 3 Mar 2019 11:45:30 +0000 (12:45 +0100)]
Add parser unit tests
bors[bot] [Sun, 3 Mar 2019 11:44:01 +0000 (11:44 +0000)]
Merge #917
917: Trait tests r=flodiebold a=flodiebold
This adds a bunch of basic tests for trait functionality, just to outline what seems like the first goals for that ;)
It also changes the display of `Ty::Unknown` to `{unknown}`, since `[unknown]` could be confused with a slice, and fixes an error in the emacs runnables code.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Sun, 3 Mar 2019 11:40:36 +0000 (12:40 +0100)]
Inline type inference test snapshots
Wilco Kusee [Sun, 3 Mar 2019 09:40:03 +0000 (10:40 +0100)]
Split parse and expand errors
Florian Diebold [Sat, 2 Mar 2019 19:58:06 +0000 (20:58 +0100)]
emacs: Fix (void-variable rust-analyzer--last-runnable)
Florian Diebold [Sat, 2 Mar 2019 19:55:56 +0000 (20:55 +0100)]
Represent unknown types as {unknown} instead of [unknown]
Since the latter could actually be a real type...
Wilco Kusee [Sat, 2 Mar 2019 19:49:13 +0000 (20:49 +0100)]
Formatting
Wilco Kusee [Sat, 2 Mar 2019 19:20:26 +0000 (20:20 +0100)]
Replace option with result in mbe
Florian Diebold [Sat, 2 Mar 2019 13:53:26 +0000 (14:53 +0100)]
Add a bunch of tests for type inference involving traits
None of them works correctly yet, of course.
bors[bot] [Sat, 2 Mar 2019 14:21:44 +0000 (14:21 +0000)]
Merge #908
908: Enable markup for hover on expressions which resolve using type_of r=matklad a=vipentti
This adds highlighting when hovering over items which are resolved using
`type_of`.
This adds basic highlighting, discussed in #904.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
bors[bot] [Sat, 2 Mar 2019 14:09:46 +0000 (14:09 +0000)]
Merge #915
915: Bring BodySyntaxMapping in line with other source-map instances r=flodiebold a=matklad
* rename to SourceMap
* don't store the actual body inline, just return a pair
r? @flodiebold
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 2 Mar 2019 14:01:20 +0000 (17:01 +0300)]
remove comment
Aleksey Kladov [Sat, 2 Mar 2019 13:59:18 +0000 (16:59 +0300)]
remove second way to get the body
Aleksey Kladov [Sat, 2 Mar 2019 13:56:09 +0000 (16:56 +0300)]
rename syntax_mapping as well
bors[bot] [Sat, 2 Mar 2019 13:55:08 +0000 (13:55 +0000)]
Merge #914
914: A bit of cleanup in ty.rs r=flodiebold a=flodiebold
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Sat, 2 Mar 2019 13:53:12 +0000 (14:53 +0100)]
A bit of cleanup in ty.rs
Aleksey Kladov [Sat, 2 Mar 2019 13:49:06 +0000 (16:49 +0300)]
align lower module query names
Aleksey Kladov [Sat, 2 Mar 2019 13:38:28 +0000 (16:38 +0300)]
rename scopes
Aleksey Kladov [Sat, 2 Mar 2019 13:36:25 +0000 (16:36 +0300)]
rename to source_map
Aleksey Kladov [Sat, 2 Mar 2019 13:18:40 +0000 (16:18 +0300)]
dont store body inside source map
Aleksey Kladov [Sat, 2 Mar 2019 12:14:37 +0000 (15:14 +0300)]
rename syntax-mapping -> source-map
bors[bot] [Thu, 28 Feb 2019 19:53:15 +0000 (19:53 +0000)]
Merge #910
910: Update hover message since we do support globs r=matklad a=kjeremy
#909 drew attention to this.
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Thu, 28 Feb 2019 19:48:21 +0000 (14:48 -0500)]
Update hover message since we do support globs
Aleksey Kladov [Thu, 28 Feb 2019 19:08:17 +0000 (22:08 +0300)]
add syntax-trees video
Ville Penttinen [Thu, 28 Feb 2019 07:33:06 +0000 (09:33 +0200)]
Enable markup for hover on expressions which resolve using type_of
This adds highlighting when hovering over items which are resolved using
`type_of`.
bors[bot] [Wed, 27 Feb 2019 15:59:56 +0000 (15:59 +0000)]
Merge #906
906: Add support for goto definition and hover for struct fields r=matklad a=vipentti
This works partially towards fixing #512
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Wed, 27 Feb 2019 15:52:37 +0000 (17:52 +0200)]
Enable hover support for NamedFieldDefs
Additionally add type ascription for const and statics as well.
Ville Penttinen [Wed, 27 Feb 2019 15:22:53 +0000 (17:22 +0200)]
Allow goto-definition to work for named fields in struct initializer
Now goto definition should work when done on a named field in a struct
initializer.
bors[bot] [Wed, 27 Feb 2019 15:22:53 +0000 (15:22 +0000)]
Merge #905
905: Update deps r=kjeremy a=kjeremy
Co-authored-by: kjeremy <kjeremy@gmail.com>
kjeremy [Wed, 27 Feb 2019 14:35:04 +0000 (09:35 -0500)]
Fix the build
kjeremy [Wed, 27 Feb 2019 13:58:13 +0000 (08:58 -0500)]
Update deps
bors[bot] [Wed, 27 Feb 2019 12:18:55 +0000 (12:18 +0000)]
Merge #900
900: Add new trait ast::TypeAscriptionOwner r=vipentti a=vipentti
This trait should be implemented for nodes which have an ascribed type,
e.g. thing : Type. Such as let, const, static, param, named struct fields.
In addition, we update some places where previously we used node + node.type_ref() with `TypeAscriptionOwner` in the trait bounds.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Wed, 27 Feb 2019 12:00:08 +0000 (14:00 +0200)]
Remove `TypeRef` from item opts which implement TypeAscriptionOwner
bors[bot] [Wed, 27 Feb 2019 11:50:38 +0000 (11:50 +0000)]
Merge #901
901: Add basic support for showing fn signature when hovering r=matklad a=vipentti
This adds basic support for displaying function signature when hovering over a usage of a function.
Additionally refactored `hover` to return `HoverResult` to ease with testing and in general to be more robust.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
bors[bot] [Wed, 27 Feb 2019 11:09:47 +0000 (11:09 +0000)]
Merge #903
903: Work around for issue in vscode reporting a failure in request r=matklad a=vipentti
vscode would report "A request has failed" when it got "Content modified"
message and this would cause a pop-up to appear. This works around the issue by
returning an "empty" response that vscode can ignore.
Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
Ville Penttinen [Wed, 27 Feb 2019 10:57:59 +0000 (12:57 +0200)]
Remove RawResponse::empty()
Ville Penttinen [Wed, 27 Feb 2019 10:49:04 +0000 (12:49 +0200)]
Work around for issue in vscode reporting a failure in request
vscode would report "A request has failed" when it got "Content modified"
message and this would cause a pop-up to appear. This works around the issue by
returning an "empty" response that vscode can ignore.
Ville Penttinen [Wed, 27 Feb 2019 07:49:22 +0000 (09:49 +0200)]
Add support for hovering over the name of an item
Ville Penttinen [Tue, 26 Feb 2019 19:30:46 +0000 (21:30 +0200)]
Replace visit_fn with crate::completion::function_label
bors[bot] [Tue, 26 Feb 2019 18:04:24 +0000 (18:04 +0000)]
Merge #902
902: Fix a typo r=matklad a=dwijnand
Co-authored-by: Dale Wijnand <dale.wijnand@gmail.com>