Commit Graph

3516 Commits

Author SHA1 Message Date
Caio
99c45609ef Improve performance and ordering 2019-03-20 20:31:14 -03:00
bors[bot]
1eb3bf41d7 Merge #1003
1003: make Name::new private r=flodiebold a=matklad

This maybe is overengineering, but it seems cool to keep names completely opaque.

r? @flodiebold 

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-20 22:08:30 +00:00
bors[bot]
8b61ea127c Merge #1008
1008: Move extend selection to ra_ide_api r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-20 20:53:45 +00:00
Aleksey Kladov
b931a472c4 move extend selection from ra_ide_api_light to ra_ide_api 2019-03-20 23:52:55 +03:00
Aleksey Kladov
3eb56f7a6a introduce Analysis::from_single_file 2019-03-20 23:38:59 +03:00
Caio
ba6863754e Fill partial fields 2019-03-20 16:52:29 -03:00
Aleksey Kladov
f5165af9a7 make Name::new private 2019-03-20 22:33:26 +03:00
bors[bot]
90ff3ba641 Merge #1000
1000: Clean up some documentation debt r=Xanewok a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
2019-03-20 14:48:25 +00:00
bjorn3
290237d2eb
Update README.md
Co-Authored-By: matklad <aleksey.kladov@gmail.com>
2019-03-20 17:39:56 +03:00
Aleksey Kladov
86d5c32e4a describe how do we test things 2019-03-20 17:22:22 +03:00
Aleksey Kladov
d56c2f2425 explain how to launch the thing 2019-03-20 16:44:44 +03:00
Aleksey Kladov
1ad322236d remove old contributing 2019-03-20 15:34:09 +03:00
Aleksey Kladov
ac6749d18c fixes 2019-03-20 15:25:05 +03:00
Aleksey Kladov
728990a580 start dev readme 2019-03-20 15:22:05 +03:00
Aleksey Kladov
fbf35c839b kill old roadmap: it is completed 2019-03-20 14:49:06 +03:00
Aleksey Kladov
dbed0f0e99 document some nice things 2019-03-20 13:19:46 +03:00
Aleksey Kladov
07a9e5c0e1 document assists 2019-03-20 13:05:03 +03: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
Aleksey Kladov
ab9fef1ee2 sadly, we support only a single language atm 2019-03-20 12:25:03 +03:00
Aleksey Kladov
505bd45bcc fix links 2019-03-20 12:24:12 +03:00
Aleksey Kladov
56ad19ef02 fix links 2019-03-20 12:21:55 +03:00
Aleksey Kladov
192a5cd11d better user docs 2019-03-20 12:17:12 +03:00
bors[bot]
69ee5c9c5e Merge #999
999: Fixed typo in `Interner`’s name (`Intener`) r=matklad a=regexident



Co-authored-by: Vincent Esche <regexident@gmail.com>
2019-03-20 08:47:04 +00:00
Vincent Esche
21f20d5deb Fixed typo in Interner’s name (Intener) 2019-03-20 09:29:10 +01:00
Aleksey Kladov
206bbe9c93 README is short and up to the point 2019-03-20 10:00:54 +03:00
Aleksey Kladov
91203699ec introduce docs dir 2019-03-20 09:37:51 +03:00
bors[bot]
d080c8f021 Merge #998
998: import resolution is immutable r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-03-19 15:35:32 +00:00
Aleksey Kladov
5641feeddb import resolution is immutable 2019-03-19 18:35:03 +03:00
bors[bot]
5b6ad0971c Merge #996
996: Allow attributes on top level expressions r=matklad a=pcpthm

This PR modifies parser to allow outer attributes on top level expression. Here, top level expression means either
- Expression statement e.g. `foo();`
- Last expression in a block without semicolon `bar()` in `{ foo(); bar() }`.

Except for binary operation expressions and `if` expressions, which are errors (feature gated) in rustc.
Attributes on inner expressions like `foo(#[a] 1)` are not implemented.

I first tried to implement this by passing `Maker` to expression parsers. However, this implementation couldn't parse `#[attr] foo()` correctly as `CallExpr(Attr(..), PathExpr(..), ArgList(..))` and instead parsed incorrectly as `CallExpr(PathExpr(Attr(..), ..), ArgList(..))` due to the way left recursion is handled.
In the end, I introduce `undo_completion` method. Which is not the suggested approach, but it seems not very bad.

Fix #759.


Co-authored-by: pcpthm <pcpthm@gmail.com>
2019-03-19 10:36:17 +00:00
pcpthm
4cf179c089 Replace contract_child to a less ad-hoc API 2019-03-19 18:44:23 +09:00
pcpthm
e2ed813e89 Mark non-code block as text 2019-03-19 18:12:05 +09:00
pcpthm
2fb110e1fa Error about attributes on
unallowed types of expression statement
2019-03-19 17:37:08 +09:00
pcpthm
ffed132e52 Allow attributes on top level expression
A top level expression is either
- a expression statement or
- the last expression in a block
2019-03-19 17:24:02 +09:00
bors[bot]
91576afc7e Merge #995
995: Install and run `cargo watch` if user agrees r=matklad a=Xanewok

This isn't a glorious patch but hopefully is useful 👍 This introduces a default background `cargo watch` task and (separately from that) asks the user on every startup if they want to run `cargo watch` (installs it if it's not available).

r? @matklad does it fit the what you've been thinking about?

Co-authored-by: Igor Matuszewski <xanewok@gmail.com>
2019-03-18 21:52:27 +00:00
Igor Matuszewski
34b428cc5e Appease CI 2019-03-18 22:51:01 +01:00
Igor Matuszewski
7c2595c268 Guard auto cargo watch behind a config option 2019-03-18 22:35:47 +01:00
Igor Matuszewski
60cac29964 Separate out the interactive cargo watch procedure 2019-03-18 22:30:23 +01:00
Igor Matuszewski
5c3cc8c95f Reformat using Prettier 2019-03-18 22:15:03 +01:00
Igor Matuszewski
7d2378ed7d Remove unused imports 2019-03-18 21:16:20 +01:00
Igor Matuszewski
4bd6143062 Prefer installing cargo-watch via Task API
This gives us much more fine-grained stdout buffering and ANSI terminal colors.
2019-03-18 21:13:49 +01:00
Igor Matuszewski
21b73f9844 Respect the user-provided label when creating task 2019-03-18 21:04:41 +01:00
Igor Matuszewski
afe9cea640 Ask the user to install and start cargo watch 2019-03-18 20:50:52 +01:00
Igor Matuszewski
9f1ae658db Define a cargo watch task 2019-03-18 20:47:52 +01:00
bors[bot]
7fc35d391c Merge #993
993: Fix installing vscode extension on MacOS r=matklad a=funkill

VSCode often installed in MacOS as `Visual Studio Code.app` package and `code` binary located at `Contents/Resources/app/bin` in package. This path not exists in `$PATH` variable and we can't run `code`.

In previous version of `do_run` function all before space was command and all after - arguments. If path or command has spaces, extracting command breaks. To fix this i extracted command to separated argument of function.

All packages can be placed in system app dir (`/Applications`) or user app dir (`~/Applications`). I created helper function for find app in this directories.



Co-authored-by: funkill2 <funkill2@gmail.com>
2019-03-18 19:26:45 +00:00
funkill2
69edc10f35
set code less generic 2019-03-18 22:18:54 +03:00
bors[bot]
132b207a22 Merge #994
994: Upgrade ra_vfs to use new Filtering r=matklad a=vipentti

Upgrade `ra_vfs` to `0.2.0` that includes the filtering.

Currently this matches the previous filtering, meaning all roots are filtered
using the same rules.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
2019-03-18 19:08:32 +00: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
funkill2
9c2177026f
added setup environment 2019-03-18 20:27:31 +03:00
funkill2
d8f3b0d01d
added helper module for appending vscode path 2019-03-18 20:27:11 +03:00
Igor Matuszewski
bc560a2f5b Remove redundant Runnable.range 2019-03-18 17:53:07 +01:00