Aleksey Kladov
d4ef07b235
use completions in API
2018-12-21 15:50:07 +03:00
Aleksey Kladov
ba0072401c
use Completions to collect completions
2018-12-21 15:46:01 +03:00
Aleksey Kladov
052e20162a
docs
2018-12-21 15:34:11 +03:00
Aleksey Kladov
0ce82516c1
introduce Completions
2018-12-21 15:32:29 +03:00
Aleksey Kladov
4092b8d0b5
make compleion item details private
2018-12-21 15:19:46 +03:00
Aleksey Kladov
b5c5995bf1
use builder interface for completion item
2018-12-21 14:38:41 +03:00
Aleksey Kladov
b0ff6176ed
flip params
2018-12-21 14:02:51 +03:00
Aleksey Kladov
74406ca8ea
introduce completion_item module
2018-12-21 14:02:14 +03:00
bors[bot]
463e5af3f2
Merge #306
...
306: Finish weird exprs r=DJMcNab a=DJMcNab
Fix #290 .
Note that I'm not certain my use of `p.nth(1) == Ident` is entirely consistent with `libsyntax` - in the original, [`is_union_item`](9622f9dc47/src/libsyntax/parse/parser.rs (L4593-L4596)
) uses `t.is_ident() && !t.is_reserved_ident()`, whereas we effectively only do `is_ident`. However, I cannot find the definition of `is_reserved_ident` (even searching the rust repository only gives uses, no definitions), so this will have to do unless someone else can find it :|.
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-21 10:04:00 +00:00
DJMcNab
9beee92500
Add comment about the source of the weird_exprs test
2018-12-21 10:03:02 +00:00
Aleksey Kladov
fd927ea3a9
use root-relative paths
2018-12-21 12:30:28 +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
Aleksey Kladov
164d53b22f
better debug impls
2018-12-21 11:49:18 +03:00
Aleksey Kladov
aa628f4749
fix SourceFileEdit name
2018-12-21 11:15:23 +03:00
Aleksey Kladov
b7d8bf1262
tweak canceled message
2018-12-21 11:08:43 +03:00
bors[bot]
f1fafeee02
Merge #305 #307
...
305: Fold curly blocks r=matklad a=matklad
307: ⬆️ 1.31.1 r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-20 19:58:10 +00:00
Aleksey Kladov
2956e81295
⬆️ 1.31.1
2018-12-20 22:57:38 +03:00
DJMcNab
da6be9fdda
Add weird_exprs test
2018-12-20 19:47:29 +00:00
DJMcNab
55ebe449c9
Fix parsing of contextual_keyword union
2018-12-20 19:46:03 +00:00
Aleksey Kladov
23b040962f
fold curly blocks
2018-12-20 22:43:06 +03:00
Aleksey Kladov
8d7e8a175e
generalize folding tests
...
By using xml-like tags, we will be able to test nested foldings.
2018-12-20 22:30:30 +03:00
DJMcNab
a349db7178
Run gen-tests
2018-12-20 19:10:37 +00:00
DJMcNab
1d1950336f
Use a better way of skipping SEMIs
2018-12-20 19:07:11 +00:00
DJMcNab
dc1c64f5b9
Support a blank expression before a semicolon
2018-12-20 19:07:11 +00:00
DJMcNab
0ffba1e896
Fix broken test is deleted comment
2018-12-20 17:29:26 +00:00
DJMcNab
134fe4f566
Fix the tests and fix the precommit hook
2018-12-20 16:45:54 +00:00
DJMcNab
466885aa5b
Fix missing DOTDOTEQs
2018-12-20 16:22:13 +00:00
DJMcNab
f35151afed
Don't require a command before EQ in a where clause
2018-12-20 15:50:42 +00:00
DJMcNab
84ff52390d
Rename test_fail to test_err
2018-12-20 15:09:57 +00:00
DJMcNab
63ca8bc91a
Change parser tests dir to inline/ok and inline/err
2018-12-20 15:09:22 +00:00
DJMcNab
e2a7e94518
Ensure that the parser tests pass or fail correctly
2018-12-20 13:33:00 +00:00
bors[bot]
346456f59f
Merge #301
...
301: Fix break in a condition r=matklad a=DJMcNab
The part of fixing #290 .
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-20 12:41:55 +00:00
DJMcNab
27e814e182
Simplify NO_BLOCK testing
2018-12-20 12:28:59 +00:00
Aleksey Kladov
c96011833c
extend comment
2018-12-20 14:35:37 +03:00
DJMcNab
5205c016e9
Fix ambiguity with if break
...
Brought up by #290
2018-12-20 11:35:02 +00:00
Aleksey Kladov
bb2bafb606
docs for input queries
2018-12-20 14:12:47 +03:00
bors[bot]
d8c6b8d999
Merge #297
...
297: Use ContentModified error code r=matklad a=matklad
25679c2e4b
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2018-12-20 09:23:27 +00:00
Aleksey Kladov
b2f2621c17
Use ContentModified error code
...
25679c2e4b
2018-12-20 12:20:28 +03:00
Aleksey Kladov
a084412f06
set symbol index as const
2018-12-20 12:15:38 +03:00
Aleksey Kladov
6782fe2a5b
Treat
2018-12-20 12:15:38 +03:00
Aleksey Kladov
97812c192a
Restore library symbols
2018-12-20 12:15:38 +03:00
Aleksey Kladov
2d4582bfc6
fixme comment
2018-12-20 12:15:38 +03:00
Aleksey Kladov
2caac99ef3
resolve paths across crates
2018-12-20 12:15:38 +03:00
Aleksey Kladov
590bd5f849
workaround across-crate resolve bugs
2018-12-20 12:15:38 +03:00
Aleksey Kladov
2fe41574a1
fix tests
2018-12-20 12:15:38 +03:00
Aleksey Kladov
e6465e7e2a
index all local crates
2018-12-20 12:15:38 +03:00
Aleksey Kladov
51fec4ef84
fix the test
2018-12-20 12:15:38 +03:00
Aleksey Kladov
1b946ef8a6
File can be opened before the root is scanned
2018-12-20 12:15:38 +03:00
Aleksey Kladov
7b6bafa631
fix syc
2018-12-20 12:15:38 +03:00
Aleksey Kladov
a5ef8ad05b
swtich lsp server to vfs
2018-12-20 12:15:38 +03:00
Aleksey Kladov
6a755ed83a
remove more imports
2018-12-20 12:15:38 +03:00
Aleksey Kladov
79596abcaf
dead import
2018-12-20 12:15:38 +03:00
Aleksey Kladov
26dcc70129
fix hir mock
2018-12-20 12:15:38 +03:00
Aleksey Kladov
18aac1df45
kill file resolver
2018-12-20 12:15:38 +03:00
Aleksey Kladov
85290bc134
switch analysis to vfs
2018-12-20 12:15:38 +03:00
Aleksey Kladov
815a0e5778
doc comment
2018-12-20 12:15:38 +03:00
Aleksey Kladov
d0bab735c8
add root & path info to remove event
2018-12-20 12:15:38 +03:00
Aleksey Kladov
b6ce7a6d34
make it compile
2018-12-20 12:15:38 +03:00
Aleksey Kladov
dea1a69e1c
remove relpath from input
2018-12-20 12:15:38 +03:00
Aleksey Kladov
cb6205c09d
use relpaths for module resolve
2018-12-20 12:15:38 +03:00
Aleksey Kladov
a422d480a1
implement vfs events handling
2018-12-20 12:15:38 +03:00
Aleksey Kladov
e69b05781f
add io::Task
2018-12-20 12:15:23 +03:00
Aleksey Kladov
99561cf2f2
Add type alias
2018-12-20 12:15:23 +03:00
Aleksey Kladov
2ae05a6163
vfs crate scaffold
2018-12-20 12:15:23 +03:00
Aleksey Kladov
7509901fa0
wip
2018-12-20 12:15:23 +03:00
Jeremy A. Kolb
93cf39d968
Bump languageserver-types to 0.53.0 to support LSP 3.14.0
...
See: https://microsoft.github.io/language-server-protocol/specification#version_3_14_0
2018-12-19 17:32:44 -05:00
bors[bot]
ef1e107df1
Merge #273
...
273: Add a test to ensure that we can parse each file r=matklad a=DJMcNab
Note that this has a non-spurious failure in ra_analysis/src/mock_analysis.
Probably fixes #195 .
If my understanding is correct, fixes #214 and fixes #225 .
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-19 21:22:00 +00:00
DJMcNab
a3b842fb8b
Add tests and only traverse in the crates directory
2018-12-19 21:19:32 +00:00
DJMcNab
db67741430
Move is_block to lower in the call tree
2018-12-19 20:55:24 +00:00
DJMcNab
def0a95d35
Revert "Revert to f6f7c5"
...
This approach is correct, but it needs an addition to Restrictions too
This reverts commit ad00d0c8a5f64142e6636e8b048204c8f8982f4a.
2018-12-19 20:12:18 +00:00
DJMcNab
4dce66ad31
Fix handling of structs in match arms
2018-12-19 20:12:18 +00:00
DJMcNab
cd8e33fb7e
Revert to f6f7c5
2018-12-19 20:12:18 +00:00
DJMcNab
7a8560ba38
Fix expression parsing by bailing out upon a macro block being found
...
TODO: Fix this when the block like macro is in expression position
E.g. `test(test!{})` currently parses
2018-12-19 20:12:18 +00:00
DJMcNab
97e70bf50f
Possibly fix #225
2018-12-19 20:12:18 +00:00
DJMcNab
29bf389034
Actually fix at_ts doc comment (committed wrong file :P)
2018-12-19 20:12:18 +00:00
DJMcNab
012537bd6c
Fix at_ts doc comment
2018-12-19 20:12:18 +00:00
DJMcNab
20bbe0127c
Fix parsing of inclusive ranges ( #214 )
...
I'm not certain that this is correct, so extra eyes would be good
2018-12-19 20:12:18 +00:00
DJMcNab
0b77eec922
Add a test to ensure that we can parse each file
...
Note that this has a non-spurious failure in ra_analysis/src/mock_analysis
2018-12-19 20:12:18 +00:00
Aleksey Kladov
1c5ce7a868
File module source does not depend on syntax
2018-12-19 01:51:05 +03:00
Aleksey Kladov
d20d788571
disable gc for now
2018-12-19 01:10:03 +03:00
Aleksey Kladov
e7aa17b560
Gc syntax trees after every modification
2018-12-19 00:35:13 +03:00
Aleksey Kladov
d05790b947
Work around a bug
...
cc #288
2018-12-18 14:58:54 +03:00
Aleksey Kladov
193992fd14
move thread worker to a separate crate
2018-12-18 12:52:17 +03:00
Andrew Chin
8b1e667077
By default, log only to stderr, and not to disk.
...
This fixes a common problem when running under VS Code, the user
doesn't have permissions to create a `log` directory in the CWD.
The old behavior can be re-enabled by setting RA_INTERNAL_MODE=1
2018-12-17 17:22:30 -05:00
Roland Ruckerbauer
d0f1334226
Fixed cast expression parsing in ra_syntax.
...
The cast expression expected any type via types::type_() function,
but the language spec does only allow TypeNoBounds (types without direct extra bounds
via `+`).
**Example:**
```rust
fn test() {
6i8 as i32 + 5;
}
```
This fails, because the types::type_() function which should parse the type after the
as keyword is greedy, and takes all plus sign after path types as extra.
My proposed fix is to replace the not implemented `type_no_plus()` just calls (`type_()`)
function, which is used at several places. The replacement is `type_with_bounds_cond(p: &mut Parser, allow_bounds: bool)`, which passes the condition to relevant sub-parsers.
This function is then called by `type_()` and the new public `type_no_bounds()`.
2018-12-17 17:26:24 +01:00
Aleksey Kladov
8d42deeac3
fix installation on windows
2018-12-17 11:26:41 +03:00
Bernardo
0527e3b283
rename Edit to TextEdit and AtomEdit to AtomTextEdit
2018-12-11 19:07:17 +01:00
Bernardo
7344d28768
extract AtomEdit and Edit into new ra_text_edit crate
2018-12-10 22:09:12 +01:00
Bernardo
a062d844c2
use \b as word boundary
2018-12-09 15:50:56 +01:00
bors[bot]
3725276554
Merge #271
...
271: Implement format hook r=matklad a=DJMcNab
Tentatively: fixes #155 .
However, this does add all changes in staged files, which might not be desirable. However, I think we can't solve that without explicit support in rustfmt for it, so it should be fine.
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
2018-12-09 12:44:58 +00:00
DJMcNab
cbce28a348
Reimplement format-hook using a rust binary
2018-12-09 12:27:13 +00:00
Aleksey Kladov
b9c17a6001
Answer canceled requests
2018-12-09 14:43:02 +03:00
Aleksey Kladov
5004cb928b
verbose assertions in SourceFileItems
2018-12-09 14:21:54 +03:00
Aleksey Kladov
7784c7a701
resolve extern crates propertly
2018-12-09 13:49:54 +03:00
DJMcNab
279ff4927a
Update hook to not add unstaged files
2018-12-09 10:37:04 +00:00
Aleksey Kladov
e89da32bb7
move tests to separate file
2018-12-09 13:33:16 +03:00
Aleksey Kladov
6a16d3fb0b
WIP: resolve across crates
2018-12-09 13:33:16 +03:00
Aleksey Kladov
8b9ff46b37
make resolver fields private
2018-12-09 13:33:16 +03:00
Aleksey Kladov
74fe581061
return dependencies with names
2018-12-09 13:33:16 +03:00