Aleksey Kladov
440cd05edb
Honor snippet capability
...
closes #2518
2020-04-24 02:41:07 +02:00
Aleksey Kladov
b3050bded1
Introduce internal snippet cap
2020-04-24 02:06:12 +02:00
Aleksey Kladov
88d243c742
Don't set sortText
...
I might be reading this wrong, but it looks like we are setting it to
essentially arbitrary string at the moment, as there are no defined
order on the items in the *set* of completions.
2020-04-24 01:53:37 +02:00
bors[bot]
e833e03783
Merge #3954
...
3954: Improve autocompletion by looking on the type and name r=matklad a=bnjjj
This tweet (https://twitter.com/tjholowaychuk/status/1248918374731714560 ) gaves me the idea to implement that in rust-analyzer.
Basically for this first example I made some examples when we are in a function call definition. I look on the parameter list to prioritize autocompletions for the same types and if it's the same type + the same name then it's displayed first in the completion list.
So here is a draft, first step to open a discussion and know what you think about the implementation. It works (cf tests) but maybe I can make a better implementation at some places. Be careful the code needs some refactoring to be better and concise.
PS: It was lot of fun writing this haha
Co-authored-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-23 21:48:45 +00:00
Aleksey Kladov
27dd0086ea
Fully get rid of SyntaxNodePtr::range
2020-04-23 21:23:36 +02:00
Edwin Cheng
1627b55028
Bubble up error
2020-04-24 01:38:58 +08:00
Aleksey Kladov
ca6d7bfe61
Cleanup proc_macro config
...
In general, there should be no reason to call `.to_string_lossy`.
If you want to display the path, use `.display()`.
If you want to pass the path to an OS API (like std::process::Command)
than use `PathBuf` or `OsString`.
2020-04-23 18:55:26 +02:00
bors[bot]
0502be3bf4
Merge #4093
...
4093: Simplify config r=matklad a=Veetaha
Co-authored-by: veetaha <veetaha2@gmail.com>
2020-04-23 09:49:03 +00:00
bors[bot]
604b936ca0
Merge #4092
...
4092: feat: run ignored tests r=matklad a=hdevalke
I started making some exercices on https://exercism.io/ and a lot of test have the `#[ignore]` attribute.
The `Run Test|Debug` code lens show up, but running the test results in:
```
running 1 test
test test_one_piece ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 5 filtered out
```
This pull request adds the `--ignored` flag if needed.
Co-authored-by: Hannes De Valkeneer <hannes@de-valkeneer.be>
2020-04-23 09:24:15 +00:00
veetaha
a3a8d10191
Fix typo
2020-04-23 02:00:56 +03:00
veetaha
364fbd7fc7
Simplify config
2020-04-23 01:30:55 +03:00
Hannes De Valkeneer
380a2870c7
feat: run ignored tests
2020-04-22 23:54:09 +02:00
bors[bot]
3f1f3a835a
Merge #4090
...
4090: Fix config naming r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-22 15:26:47 +00:00
Aleksey Kladov
9e16e2b279
Align the name of proc-macro enabling flag
...
We use `enable`, not `enabled` elsewhere
2020-04-22 17:22:59 +02:00
Aleksey Kladov
d436beeb04
Match implementation of diagnostics flag to the docs
2020-04-22 17:22:18 +02:00
Andrew Chin
165f5c6577
Don't panic on rust-analyzer --help
...
Special case handling for `-h` and `--help` if no subcommand is given.
Closes #4068
2020-04-21 20:23:01 -04:00
Benjamin Coenen
da6b136ea5
Improve autocompletion by looking on the type and name
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-21 17:19:18 +02:00
Benjamin Coenen
7f143b154e
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
2020-04-21 14:32:02 +02:00
Aleksey Kladov
d9bed8aa45
Cleanup args a bit
2020-04-21 12:06:25 +02:00
bors[bot]
0ad6b6d407
Merge #4061
...
4061: ra_proc_macro: cleanups here and there r=edwin0cheng a=Veetaha
r? @edwin0cheng
Co-authored-by: veetaha <veetaha2@gmail.com>
Co-authored-by: Veetaha <veetaha2@gmail.com>
2020-04-20 20:25:33 +00:00
veetaha
d3019164dc
ra_proc_macro: cleanups here and there
2020-04-20 21:37:02 +03:00
Jeremy Kolb
d7f3d858ad
Some clippy fixes
2020-04-19 15:15:49 -04:00
Aleksey Kladov
ca61356b01
Add semantic tag for unresolved references
...
This is a quick way to implement unresolved reference diagnostics.
For example, adding to VS Code config
"editor.tokenColorCustomizationsExperimental": {
"unresolvedReference": "#FF0000"
},
will highlight all unresolved refs in red.
2020-04-18 21:28:51 +02:00
Benjamin Coenen
af3c19e85f
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
2020-04-18 17:14:24 +02:00
bors[bot]
f8016b8194
Merge #3996
...
3996: Fix path for proc-macro in nightly / stable release r=matklad a=edwin0cheng
I messed up that I forget we use different executable names for nightly / stable release, I changed to use the current executable name instead.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-04-17 09:31:57 +00:00
Benjamin Coenen
0a1585075c
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
2020-04-17 10:30:39 +02:00
Edwin Cheng
ef6ee16006
Fix path for proc-macro in nightly / stable build
2020-04-17 04:45:03 +08:00
bors[bot]
8d296be109
Merge #3995
...
3995: Separate project discovery from project loading r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2020-04-16 20:36:19 +00:00
Aleksey Kladov
422ae477ce
Unmix error handling when discovering workspaces
...
Hitting an io::Error is a legit problem. Finding more than one
Cargo.toml is not.
2020-04-16 22:35:50 +02:00
Aleksey Kladov
be2654b0ed
Decouple project loading from project discovery a bit
2020-04-16 22:02:10 +02:00
Benjamin Coenen
6ebc8bbeb0
feat: improve dot completions with scoring
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-16 18:30:08 +02:00
Edwin Cheng
177becea98
Add proc-macro cli command for rust-analyzer
2020-04-16 21:13:57 +08:00
Edwin Cheng
ca7dc69a8e
Add tests for proc_macro
2020-04-16 19:28:06 +08:00
Edwin Cheng
a4b0ce07f8
Add config for proc_macro
2020-04-16 19:28:06 +08:00
Edwin Cheng
22e33f308a
Add with-proc-macro in bench ,stats and diagnositcs
2020-04-16 19:27:44 +08:00
Josh Mcguigan
6be972770e
diagnostics cli, iterate over members
2020-04-14 16:26:03 -07:00
Benjamin Coenen
c5d18f570c
add sort_text to sort in editor view
...
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2020-04-14 19:28:33 +02:00
Josh Mcguigan
f9701efbe7
cli diagnostics walk files
2020-04-14 04:35:34 -07:00
Josh Mcguigan
f62c73a972
add diagnostics subcommand to rust-analyzer CLI
2020-04-13 18:40:41 -07:00
Aleksey Kladov
0aece75cdd
Remove dead code
2020-04-11 19:36:31 +02:00
Edwin Cheng
73e512215a
Fix non canonicallized path for crate file
2020-04-11 18:12:50 +08:00
Josh Mcguigan
8f7fceeb9c
fix cargo check config with custom command
2020-04-06 21:41:31 -07:00
Aleksey Kladov
bf569f8b29
Check for eprintln on CI
2020-04-06 17:00:18 +02:00
Aleksey Kladov
ec3fb1cdb4
Merge pull request #3853 from matklad/cf
...
Make control token modifier less ambiguous
2020-04-06 11:53:56 +02:00
Aleksey Kladov
48bc0ca745
Make control token modifier less ambiguous
...
In textmate, keyword.control is used for all kinds of things; in fact,
the default scope mapping for keyword is keyword.control!
So let's add a less ambiguous controlFlow modifier
See Microsoft/vscode#94367
2020-04-06 09:57:50 +02:00
veetaha
a1773f8a67
Remove explicit generic type parameter
2020-04-04 16:12:09 +03:00
veetaha
b5a7cb331f
Simplify config
2020-04-04 16:04:49 +03:00
veetaha
c0cf60dca2
Apply cargo xtask format
2020-04-02 21:12:28 +03:00
veetaha
6190caeeae
Migrate to privacy as per review commets
2020-04-02 21:09:03 +03:00
veetaha
b7d5172f69
Simpify workspace handling
2020-04-02 21:07:05 +03:00
veetaha
4b2bf9cf66
Don't clone where you can copy
2020-04-02 21:07:05 +03:00
Aleksey Kladov
8a788c764f
Allow fully overriding check and fmt commands
2020-04-02 14:35:51 +02:00
Aleksey Kladov
7a4ebd2c8d
Remove vscode_lldb setting
2020-04-02 12:56:14 +02:00
Aleksey Kladov
e21bf1b2b9
Siplify
2020-04-02 12:50:34 +02:00
Aleksey Kladov
48c58309cc
Lean onto default implementation of configs
2020-04-02 12:47:58 +02:00
Aleksey Kladov
e4cf40a152
New config in package.json
2020-04-02 12:27:09 +02:00
Aleksey Kladov
0dde0f92de
Reorder fields
2020-04-02 11:33:49 +02:00
Aleksey Kladov
309fc70155
Remove old syntax highlighting
2020-04-02 09:52:27 +02:00
Aleksey Kladov
1225f719fe
Fix pointer syntax
2020-04-01 19:27:45 +02:00
Aleksey Kladov
1ac345a9f6
Centralize defaults
2020-04-01 18:56:47 +02:00
Aleksey Kladov
4936abdd49
Reduce scope of deserialization
2020-04-01 18:51:16 +02:00
Aleksey Kladov
e870cbc23d
Centralize client capabilities
2020-04-01 18:46:26 +02:00
Aleksey Kladov
a97e5eb85d
Centralize all config
2020-04-01 18:41:43 +02:00
Aleksey Kladov
1e012eb991
Move all config to config
2020-04-01 17:22:56 +02:00
Aleksey Kladov
797cd34c7c
Reduce feature flags
2020-04-01 17:00:37 +02:00
Aleksey Kladov
b9bf29019d
Move config to config.rs
2020-04-01 14:32:04 +02:00
Aleksey Kladov
6ac9668998
Generalize rustfmt config
2020-04-01 14:26:08 +02:00
Aleksey Kladov
f01846b8ee
Generalize Flycheckconfig
2020-04-01 13:14:38 +02:00
Aleksey Kladov
65c89c3a20
Cleanup
2020-04-01 12:34:12 +02:00
Aleksey Kladov
3990d971e5
Crisper name
...
https://www.flycheck.org/en/latest/
2020-04-01 11:09:19 +02:00
Aleksey Kladov
dda942debe
Pull enabled check up
2020-04-01 11:06:16 +02:00
Aleksey Kladov
a4f9d966f0
Add integrated test for concat include env
2020-03-31 19:19:14 +02:00
Aleksey Kladov
70730d7655
Rename cargo_watch -> flycheck
2020-03-31 17:29:40 +02:00
Edwin Cheng
207903a1c3
Fix rebased
2020-03-31 22:29:27 +08:00
Edwin Cheng
503cbd3f4b
Implement ra_proc_macro client logic
2020-03-31 22:20:18 +08:00
Aleksey Kladov
569f47e427
Better names for config structs
2020-03-31 16:05:25 +02:00
o0Ignition0o
331d1db317
Add crate versions when running cargo -p commands.
...
Until now cargo commands with the -p flag would pass the package name only.
It doesn't play super well with the toml Renaming dependencies feature.
This commit specifies the package name and version when a cargo command is run with the -p flag,
to avoid ambiguities.
2020-03-31 14:43:39 +02:00
Aleksey Kladov
6b2f02fdfd
Ignore createProgress request in tests
...
closes #3783
2020-03-31 12:02:47 +02:00
kjeremy
d4c317320d
Simplify SemanticTokensBuilder build method
...
This matches the next stable vscode api
2020-03-30 12:07:27 -04:00
Kirill Bulatov
8e78371222
Rebase fixes
2020-03-30 13:39:14 +03:00
Kirill Bulatov
2a19459ee9
Avoid failing on incorrect settings response
2020-03-30 13:39:14 +03:00
Kirill Bulatov
fbef0127ba
Small style fix
2020-03-30 13:39:14 +03:00
Kirill Bulatov
b892a48740
Code review fixes
...
Co-Authored-By: Veetaha <veetaha2@gmail.com>
2020-03-30 13:39:14 +03:00
Kirill Bulatov
590af37bff
Small style fix
...
Co-Authored-By: Veetaha <veetaha2@gmail.com>
2020-03-30 13:39:14 +03:00
Kirill Bulatov
392eb74b5f
Remove an obsolete fixme
2020-03-30 13:39:14 +03:00
Kirill Bulatov
bbe59c7197
Reload watcher configuration
2020-03-30 13:39:14 +03:00
Kirill Bulatov
8a23bec2cd
Style fixes
2020-03-30 13:39:14 +03:00
Kirill Bulatov
332799d914
Reload only the properties that do not affect vfs
2020-03-30 13:39:14 +03:00
Kirill Bulatov
2feaef91bd
Read new config on the server side
2020-03-30 13:39:14 +03:00
Kirill Bulatov
019f269a0a
Process configuration response draft
2020-03-30 13:39:14 +03:00
Kirill Bulatov
8c4aab0c80
Client side draft
2020-03-30 13:39:14 +03:00
Aleksey Kladov
4c9272583c
Pull options outwards
2020-03-30 11:46:04 +02:00
Aleksey Kladov
12297ab675
Fix race in the tests
2020-03-30 11:33:01 +02:00
Edwin Cheng
36812b9d7b
Fix review comments
2020-03-30 02:39:03 +08:00
Edwin Cheng
dc0076de12
Move roots_to_scan to LoopState
2020-03-29 06:33:16 +08:00
Aleksey Kladov
311cbbdad5
Remove some unwraps
2020-03-28 12:27:54 +01:00
Aleksey Kladov
6596e7cddf
Nice string formatting
2020-03-28 12:27:54 +01:00
Edwin Cheng
d0b6ed4441
Add ProcMacroClient
2020-03-26 03:29:45 +08:00
Aleksey Kladov
b3665fccfb
Preserve relative ordering of grouped assists
2020-03-25 15:45:52 +01:00
Matt Hooper
a197abbc7a
Added new inlay hint kind and rules for method chaining
2020-03-24 23:18:42 +01:00