Commit Graph

303 Commits

Author SHA1 Message Date
kjeremy
7125192c1e Basic resolution for ADT 2019-04-23 14:32:47 -04:00
Aleksey Kladov
47672726d8 ⬆️ lsp 2019-04-21 15:17:22 +03:00
Aleksey Kladov
fa12ed2b8f switch to official extend selection API 2019-04-21 12:13:48 +03:00
Aleksey Kladov
f75feb6724 cleanup cancellation
Now that we explicitelly exit the reading loop on exit notification,
we can assume that the sender is always alive
2019-04-17 11:47:38 +03:00
Aleksey Kladov
c4a5aa45dc add a couple of profiling points 2019-04-15 01:10:07 +03:00
Aleksey Kladov
5b7012318c filter by time 2019-04-15 01:10:07 +03:00
Aleksey Kladov
b228947b68 cleanup syntax 2019-04-15 01:10:07 +03:00
Aleksey Kladov
30a4099ea7 switch to modern paths 2019-04-15 01:10:07 +03:00
Roberto Vidal
c2dfc8a229 Modifies runnables test to use multi-workspace root 2019-04-14 10:04:38 +02:00
Roberto Vidal
7c7cfc5f04 Sends cwd info for runnables and code lenses 2019-04-14 10:04:38 +02:00
Roberto Vidal
3507bcb97a Adds support for multiple editor workspaces on initialization
This is a quick, partial fix for #1104
2019-04-14 10:04:38 +02:00
Ville Penttinen
0e49abb7fb Refactor CallInfo function signatures to new FunctionSignature type
This is used by CallInfo to create a pretty printed function signature that can
be used with completions and other places as well.
2019-04-09 14:45:04 +03:00
Edwin Cheng
ce3d78335d Remove checking file exists 2019-04-07 18:26:02 +08:00
Edwin Cheng
e92740c28b fix formatting 2019-04-07 12:46:45 +08:00
Edwin Cheng
333feb3869 Add warning when open file outside workspace 2019-04-07 01:20:33 +08:00
Sergey Parilin
9b73f80959 PR issuse resolved 2019-04-02 17:52:04 +03:00
Ville Penttinen
c6d6e6c625 Move actual include logic to ProjectRoot
This way the two IncludeRustFiles implementations can simply call the
ProjectRoots' methods, so that the include logic is in one place.
2019-03-21 10:43:47 +02:00
Ville Penttinen
e32462c6d5 Improve filtering of file roots
`ProjectWorkspace::to_roots` now returns a new `ProjectRoot` which contains
information regarding whether or not the given path is part of the current
workspace or an external dependency. This information can then be used in
`ra_batch` and `ra_lsp_server` to implement more advanced filtering. This allows
us to filter some unnecessary folders from external dependencies such as tests,
examples and benches.
2019-03-20 11:55:38 +02:00
Ville Penttinen
e70e2361b6 Upgrade ra_vfs to use new Filtering
Currently this matches the previous filtering, meaning all roots are filtered
using the same rules.
2019-03-18 20:53:08 +02:00
kjeremy
31b69e685d LSP: Support EnumMember and Field 2019-03-11 13:58:38 -04:00
Florian Diebold
c30c5fb4dd Don't default publishDecorations to true on the server
If the client doesn't specify this explicitly, that very likely means it doesn't
know about it and so we shouldn't send decorations. In particular, the recent
change to this default caused decorations to be sent to emacs, resulting in a
lot of warning spam.
2019-03-09 12:55:15 +01:00
bors[bot]
4ce962f64e 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>
2019-03-07 17:35:57 +00:00
Ville Penttinen
84e1d50a2a 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.
2019-03-07 19:27:06 +02:00
pcpthm
d4108cdd60 Specify derive feature for serde 2019-03-08 01:58:29 +09:00
Aleksey Kladov
1aa11eb7e9 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.
2019-03-07 17:46:17 +03:00
David Wood
4cd757c1e3
Remove rust-project.json test w/ dependencies. 2019-03-07 12:28:19 +01:00
David Wood
3bc33ae712
Add test demonstrating logic for handling deps. 2019-03-07 01:06:46 +01:00
David Wood
614dd3c347
Rename and change add_roots to return a Vec. 2019-03-07 01:05:07 +01:00
David Wood
00d927a188
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.
2019-03-07 01:05:03 +01:00
Ville Penttinen
0dcb1cb569 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.
2019-03-06 11:34:38 +02:00
Ville Penttinen
ce118da149 Rename feedback to show_message 2019-03-05 22:25:24 +02:00
Ville Penttinen
80347b8187 Remove InternalFeedback 2019-03-05 22:20:11 +02:00
Ville Penttinen
9063dabcca 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.
2019-03-05 21:59:01 +02:00
kjeremy
eb3ee7b8e5 Updates 2019-03-05 10:26:36 -05:00
Aleksey Kladov
73b892aaa3 show message in client's UI if workspace fails to load 2019-03-05 16:33:05 +03:00
Ville Penttinen
ac52d9a1f1 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.
2019-03-03 19:49:50 +02:00
kjeremy
7463f5debb Fix the build 2019-02-27 09:35:04 -05:00
bors[bot]
1927eb088a 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>
2019-02-27 11:50:38 +00:00
Ville Penttinen
6eb45c1c2b Remove RawResponse::empty() 2019-02-27 12:57:59 +02:00
Ville Penttinen
33cebe1724 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.
2019-02-27 12:49:04 +02:00
Ville Penttinen
6f5fd6c9de Add new type HoverResult to contain the results of hovering
This makes testing hovers easier as well as allows us to do more things with the
results if needed.
2019-02-26 19:30:17 +02:00
Aleksey Kladov
78f10fcdc4 rename type to type_alias in the AST as well 2019-02-25 13:49:32 +03:00
Aleksey Kladov
ef442b8682 Assign IDs to assists 2019-02-24 14:00:00 +03:00
kjeremy
56f48ac42a Update lsp-types and backtrace 2019-02-21 10:07:14 -05:00
Aleksey Kladov
1bdd935e91 switch to crates.io vfs 2019-02-18 16:43:16 +03:00
Aleksey Kladov
5823d3d042 drop unused deps 2019-02-18 12:46:08 +03:00
Aleksey Kladov
92aa0f9c87 Don't use additional_text_edits API internally 2019-02-18 12:24:20 +03:00
Ville Penttinen
85a6bf3424 Refactor find_all_refs to return ReferenceSearchResult 2019-02-17 13:40:43 +02:00
Aleksey Kladov
bf352cd251 automatically wait for worker threads
closes #817
2019-02-14 21:11:07 +03:00
Ville Penttinen
dd6307ddc4 Add support for container_name in workspace/symbol query 2019-02-12 22:06:14 +02:00