Florian Diebold
33ff7b56ff
Use the new Resolver API in completion
2019-02-01 22:45:25 +01:00
Jeremy Kolb
76c0d0b94d
format
2019-01-31 07:44:26 -05:00
Jeremy Kolb
57899d66fa
Use "▶" for test code lens
...
I find that this makes code lenses stand out more.
2019-01-30 22:09:27 -05:00
bors[bot]
b704ce803b
Merge #702
...
702: Go to Implementation r=matklad a=kjeremy
First half of #620
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-01-30 19:19:31 +00:00
Jeremy Kolb
b88ba007cc
Pass Documentation up to LSP and add "rust" to our codeblocks there
2019-01-29 21:39:09 -05:00
Jeremy Kolb
3c17643b30
Go to Implementation for structs and enums
2019-01-29 19:13:02 -05:00
Aleksey Kladov
2ee08098a6
opt-in jemalloc
2019-01-28 15:52:21 +03:00
Aleksey Kladov
d1a67c1174
align command naming
2019-01-28 15:01:22 +03:00
Aleksey Kladov
7801f6b50f
automatically collect garbage
2019-01-27 22:57:18 +03:00
DJMcNab
9fbbb8f609
Don't use the reserved error code
2019-01-26 20:58:50 +00:00
DJMcNab
d9456c3989
Return an lsp error
2019-01-26 20:43:51 +00:00
DJMcNab
632b0f2902
Use the correct working directory for cargo metadata and rustfmt
2019-01-26 20:16:15 +00:00
Andrea Pretto
27c071f702
Fold blocks of mod items.
...
Fixes #572
2019-01-26 00:31:14 +01:00
Aleksey Kladov
f6adb85b68
add gc request
2019-01-25 19:11:58 +03:00
Hrvoje Ban
4eff8ddb8b
Fill in DocumentSymbol::detail
2019-01-24 19:05:26 +01:00
Hirokazu Hata
70a35379ab
Fix target_selection_range type
2019-01-24 02:47:30 +09:00
Hirokazu Hata
76d52be1da
Bumpup lsp-types to v0.55.0
2019-01-24 02:47:03 +09:00
Aleksey Kladov
0ba7e2eaeb
ad status command
2019-01-23 01:24:53 +03:00
Jeremy Kolb
5d110c0ee2
Teach CompletionItem about documentation
2019-01-21 21:41:39 -05:00
bors[bot]
f133702f72
Merge #574
...
574: refactor completions to use TextEdit instead of InsertText r=matklad a=gfreezy
1. migrate from `insertText` to `TextEdit` from `CompleteItem`
2. use `insta` to test completions
Co-authored-by: gfreezy <gfreezy@gmail.com>
2019-01-20 18:27:23 +00:00
Aleksey Kladov
73836cdbbc
extend selection expands macros and can totally panic
2019-01-20 21:05:01 +03:00
Aleksey Kladov
171f6e6d00
somewhat better name
2019-01-20 21:01:11 +03:00
Aleksey Kladov
1ec1bd8139
make matching brace consistent
2019-01-20 20:59:46 +03:00
gfreezy
2a43638052
use a combination of source_change
and text_edit
for CompleteItem
2019-01-20 12:02:00 +08:00
gfreezy
94d96b60f3
refactor to use remove_range
and replace_range
instead of TextEdit
2019-01-20 00:38:34 +08:00
gfreezy
d08e81cdd8
refactor completions to use TextEdit instead of InsertText
2019-01-19 22:02:50 +08:00
gfreezy
99e8499957
more idiomatic code
2019-01-19 15:36:58 +03:00
gfreezy
6ab6d1eaa0
fix comments
2019-01-19 15:36:58 +03:00
gfreezy
bc0f79f74a
rename mod
2019-01-19 15:36:58 +03:00
Aleksey Kladov
b028472481
⬆️ update rust
2019-01-19 15:36:58 +03:00
Aleksey Kladov
db43b44f71
update cargo_metadata
2019-01-14 16:15:25 +03:00
Aleksey Kladov
7e5ab9b78c
switch to lsp-types
2019-01-14 14:32:03 +03:00
Aleksey Kladov
5498a202b6
target_selection_range is not nullable in the implementation
2019-01-13 22:42:42 +03:00
bors[bot]
0199572a3d
Merge #517 #518
...
517: gracefully handle cycles in crate graph r=matklad a=matklad
518: Add an explanatory message when we use the Query fallback r=matklad a=DJMcNab
Fixes https://github.com/rust-analyzer/rust-analyzer/issues/269 .
There is no good way to explain it for go_to_def, so I've just fallen back on to_vec.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2019-01-13 10:41:47 +00:00
Aleksey Kladov
77f67ca7e2
gracefully handle cycles in crate graph
...
rust-lang/rust has absolutely weird setup with rustc-workspace-shim,
which leads to real cycles.
2019-01-13 13:39:48 +03:00
Jeremy Kolb
5d273f10cd
Add bench runnable and code lens
2019-01-12 18:40:54 -05:00
bors[bot]
eb931c0d9e
Merge #505
...
505: Inherent methods r=matklad a=flodiebold
This adds resolution, type checking and completion for inherent methods.
The main open question here is the caching, I think. I'm not sure whether we should be caching method resolutions in a more fine grained way (currently we just build a hash map of types -> impl blocks, and iterate through all potential impl blocks when looking for a method).
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2019-01-12 21:18:14 +00:00
bors[bot]
e56072bfa3
Merge #500
...
500: Code lens support for running tests r=matklad a=kjeremy
Supports running individual and mod tests.
I feel like this kind of abuses the `Runnables` infrastructure but it works. Maybe later on down the line we should introduce a struct that is really just a tuple of binary, arguments, and environment and pass that back to the client instead. `run_single.ts` is just a paired down version of `runnables.ts` and there is duplication because I think run_single will probably change independent of runnables.
Co-authored-by: Jeremy A. Kolb <jkolb@ara.com>
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-01-12 18:56:11 +00:00
Jeremy Kolb
72d48b08fb
Move CargoTargetSpec
and friends to cargo_target_spec module
2019-01-12 13:00:58 -05:00
Florian Diebold
d0bdaa6c00
Complete inherent methods
2019-01-12 15:01:27 +01:00
Jeremy Kolb
f42f70b1d5
Switch hover to use MarkupContent
...
MarkedString is deprecated
2019-01-11 21:45:16 -05:00
Jeremy A. Kolb
faf0037635
Code lens support for running tests
2019-01-11 15:16:55 -05:00
Aleksey Kladov
f60153ee9e
warn louder on mising sysroot
2019-01-11 20:55:56 +02:00
Aleksey Kladov
f193fbcbae
actually produce missing def kinds
2019-01-11 21:02:12 +03:00
bors[bot]
aad1bf877e
Merge #496
...
496: Include two element ranges into the nav. r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-01-11 15:35:41 +00:00
Aleksey Kladov
dda916bc4d
fix tests
2019-01-11 18:32:22 +03:00
Aleksey Kladov
4089db1e0d
prioritize event handing over indexing
...
If we index gazillion libraries simultaneously, we fill the threadpool
and so the main loop fails to turn, although there isn't really any
significant blocking inside the loop itself.
2019-01-11 17:08:49 +03:00
Aleksey Kladov
8a5f74a24f
use location link in goto def
2019-01-11 16:06:22 +03:00
Aleksey Kladov
3aaf20bd6e
return ref ranges from gotodef
2019-01-11 16:06:08 +03:00
Aleksey Kladov
d9e70e3160
fix on-type offset
2019-01-11 15:05:40 +03:00
Aleksey Kladov
66d7adf1cb
force serde in ra_syntax
2019-01-11 13:21:18 +03:00
Aleksey Kladov
4bf6b91b9d
minor
2019-01-11 00:51:34 +03:00
Aleksey Kladov
cd00158b1d
wire sysroot into crate graph
2019-01-11 00:51:34 +03:00
Aleksey Kladov
e35374ec7c
special case std
2019-01-11 00:51:34 +03:00
Aleksey Kladov
8852408bfb
use arena for sysroot
2019-01-11 00:51:34 +03:00
Aleksey Kladov
66fba88534
split module
2019-01-11 00:51:34 +03:00
Aleksey Kladov
e8923713c5
add sysroot boilerplate
2019-01-11 00:51:34 +03:00
Aleksey Kladov
4196b65f21
dont depend on tools from lsp-server
2019-01-11 00:46:32 +03:00
Aleksey Kladov
cbeaa541aa
switch CargoWorkspace to arena
2019-01-10 21:26:43 +03:00
Aleksey Kladov
ddf2a8a948
add completion detail
2019-01-09 19:40:11 +03:00
Marcus Klaas de Vries
0b8fbb4fad
Fix typos in ARCHITECTURE.md and a number of crates
...
specifically: gen_lsp_server, ra_arena, ra_cli, ra_db, ra_hir
2019-01-09 01:17:09 +01:00
Marcus Klaas de Vries
f8261d611a
Fix typo defenition -> definition
2019-01-08 23:38:51 +01:00
Aleksey Kladov
5b573deb20
fix usages after rename
2019-01-08 22:33:36 +03:00
Aleksey Kladov
f553837c1c
upstream text-utils to text_unit
2019-01-08 21:50:04 +03:00
Aleksey Kladov
1b82084a5f
dont depend on ra_editor directly
2019-01-08 21:01:41 +03:00
Aleksey Kladov
141ab166cf
switch to newer cargo-metadata
2019-01-08 19:36:09 +03:00
Aleksey Kladov
256ec6e8d4
introduce CallInfo
2019-01-08 18:27:44 +03:00
Aleksey Kladov
d62ede8262
migrate ra_lsp_server to new rowan
2019-01-08 11:56:17 +03:00
Simon Vandel Sillesen
b0ffa98a00
add "." as a trigger char on type formatting
2019-01-06 09:56:00 +01:00
Simon Vandel Sillesen
2e52b27e71
refactor
2019-01-06 09:41:11 +01:00
Simon Vandel Sillesen
f99398d9d5
indent on typing dot. fixes #439
2019-01-06 00:58:03 +01:00
Aleksey Kladov
4551155073
introduce separate goto_defenition
2019-01-05 19:30:49 +03:00
Aleksey Kladov
3ad0037f90
move hover implementation to ra_analysis
2019-01-05 17:24:17 +03:00
bors[bot]
8d51b02362
Merge #414
...
414: textDocument/hover returns both type name and doc_text r=matklad a=h-michael
implement #389
Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
2019-01-05 13:12:41 +00:00
Hirokazu Hata
341eb4ae87
Use both type_of and doc_text_for
2019-01-05 11:28:16 +09:00
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
7d9e02e5a2
fix tests
2019-01-03 14:43:47 +01:00
Bernardo
3ab328b49a
use lsp WorkspaceEdit instead of custom source_file_edits and file_system_edits
2019-01-03 14:20:15 +01:00
Hirokazu Hata
6ee7788513
Return type name when doc_text_for returns nothing
2019-01-03 21:15:23 +09: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
dependabot[bot]
96ecd73a5c
Bump serde_json from 1.0.33 to 1.0.34
...
Bumps [serde_json](https://github.com/serde-rs/json ) from 1.0.33 to 1.0.34.
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.33...v1.0.34 )
Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-31 09:48:16 +00:00
dependabot[bot]
51ce71686a
Bump failure from 0.1.3 to 0.1.4
...
Bumps [failure](https://github.com/rust-lang-nursery/failure ) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/rust-lang-nursery/failure/releases )
- [Changelog](https://github.com/rust-lang-nursery/failure/blob/master/RELEASES.md )
- [Commits](https://github.com/rust-lang-nursery/failure/compare/0.1.3...0.1.4 )
Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-31 08:53:49 +00:00
dependabot[bot]
2d9428b54a
Bump failure_derive from 0.1.3 to 0.1.4
...
Bumps [failure_derive](https://github.com/withoutboats/failure_derive ) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/withoutboats/failure_derive/releases )
- [Commits](https://github.com/withoutboats/failure_derive/commits )
Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-31 05:36:03 +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
bors[bot]
f9b58454a4
Merge #378
...
378: migrate-to-tempdir r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-30 20:33:32 +00:00
Aleksey Kladov
f0edb93df2
⬆️ tempdir
2018-12-30 23:33:04 +03: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
Aleksey Kladov
0e90e0436a
remove runtime dependency on tools
2018-12-30 15:28:54 +03:00
Aleksander Vognild Burkow
0cb270e75d
Simplify failure bail code
2018-12-30 00:21:15 +01:00