Commit Graph

101 Commits

Author SHA1 Message Date
Aleksey Kladov
2544abbf86 Make config.rs a single source of truth for configuration.
Configuration is editor-independent. For this reason, we pick
JSON-schema as the repr of the source of truth. We do specify it using
rust-macros and some quick&dirty hackery though.

The idea for syncing truth with package.json is to just do that
manually, but there's a test to check that they are actually synced.

There's CLI to print config's json schema:

    $ rust-analyzer --print-config-schema

We go with a CLI rather than LSP request/response to make it easier to
incorporate the thing into extension's static config. This is roughtly
how we put the thing in package.json.
2020-12-08 19:25:41 +03:00
Florian Diebold
bc65200105 Fix indentation of inserted use statements 2020-10-24 18:25:23 +02:00
Pavan Kumar Sunkara
335add49db Add description for crates that will be published 2020-08-24 13:07:22 +02:00
Pavan Kumar Sunkara
a8fa5cd42e Add version to deps in cargo.toml 2020-08-24 11:10:41 +02:00
Aleksey Kladov
1b0c7701cc Rename ra_ide -> ide 2020-08-13 17:58:27 +02:00
Aleksey Kladov
be49547b44 Use split_once polyfill 2020-07-30 22:23:12 +02:00
Aleksey Kladov
abeb003df4 Allow multiline annotations 2020-07-14 14:58:10 +02:00
Aleksey Kladov
0b0865ab22 Generaize annotation extraction 2020-07-14 14:01:54 +02:00
bors[bot]
0f8af1b824
Merge #5355
5355: Add a license field to all the crates r=matklad a=JohnTitor

Some are unnecessary but it's okay to have it, I think.
cc https://github.com/rust-lang/rust/issues/74269

Co-authored-by: Yuki Okushi <huyuumi.dev@gmail.com>
2020-07-14 09:18:17 +00:00
Aleksey Kladov
c6f3540121 Use relaxed ordering for marks
We dont' need this for perf. `Relaxed` ordering is enough here, as we
only have one location. I prefer to use minimal ordering, because that
makes it easier to reason about the code.
2020-07-14 09:04:11 +02:00
Yuki Okushi
6f423466d1
Add a license field to all the crates 2020-07-14 10:57:26 +09:00
kjeremy
ebdee366b0 Clippy perf warnings
Removes redundant clones
2020-07-06 17:13:55 -04:00
Aleksey Kladov
8295dc42a0 Fold multiline calls 2020-07-01 18:27:58 +02:00
Aleksey Kladov
7b0113b3d5 Move parser specific tests utils to parser tests 2020-07-01 12:30:17 +02:00
Aleksey Kladov
442c13ba17 Simplify most of the inlay hints tests 2020-06-30 18:04:25 +02:00
Aleksey Kladov
d21c84abd4 Generalize annotations 2020-06-30 12:13:08 +02:00
Aleksey Kladov
bbc4dc9956 Update the rest of the tests 2020-06-29 17:23:01 +02:00
Aleksey Kladov
e805e8c1d5 (T): make typification tests more data driven 2020-06-29 17:23:01 +02:00
Aleksey Kladov
08e2149eab Simplify 2020-06-24 10:28:28 +02:00
Aleksey Kladov
e5101ae150 Centralize fixture parsing for assists 2020-06-24 00:30:34 +02:00
Aleksey Kladov
aa69757a01 More principled indentation trimming in fixtures 2020-06-23 23:33:41 +02:00
Aleksey Kladov
f2f69e75c8 Minor, rename 2020-06-23 22:51:33 +02:00
Aleksey Kladov
ff687453a8 Slightly better name 2020-06-23 21:29:50 +02:00
Aleksey Kladov
295c8d4f7f Complicate
Fixing test fallout unfortunately requires more work, we need to do
it, but let's merge something at least!
2020-06-23 20:38:36 +02:00
Aleksey Kladov
a34f9b7fb3 Docs for Fixture 2020-06-23 18:58:45 +02:00
Aleksey Kladov
84cd28fddc Cut problematic dependency 2020-06-23 18:56:26 +02:00
Aleksey Kladov
fdf86aee18 Nicer API 2020-06-23 18:46:56 +02:00
Aleksey Kladov
3486b47e5c Simplify 2020-06-23 18:43:55 +02:00
Aleksey Kladov
21f751a0e5 Simplify 2020-06-23 18:37:26 +02:00
Aleksey Kladov
30748161f0 Simplify 2020-06-23 18:37:26 +02:00
Aleksey Kladov
6996ec860b Drop rarely used fixture functionality 2020-06-23 18:37:26 +02:00
Aleksey Kladov
f304874c8c Move fixtures to a separate file 2020-06-23 18:37:26 +02:00
Aleksey Kladov
676e82bb83 Remove relative-path dependency 2020-06-23 17:04:10 +02:00
Aleksey Kladov
6a6098d4c3 Remove RelativePathBuf from fixture
The paths in fixture are not really relative (the default one is
`/main.rs`), so it doesn't make sense to use `RelativePathBuf` here.
2020-06-23 00:14:44 +02:00
Aleksey Kladov
b5c4f2faa2 Update parser tests with env var 2020-06-15 11:02:17 +02:00
Aaron Loucks
f06b2bcd91 Use split1 when formatting function signature params 2020-06-03 07:26:15 -04:00
Aleksey Kladov
f26b7928e0
Merge pull request #4495 from vsrs/fixture_meta
Test fixtures parsing improvements
2020-05-24 15:32:52 +02:00
Aleksey Kladov
ecac5d7de2 Switch to new magic marks 2020-05-20 13:02:53 +02:00
Aleksey Kladov
5258c817f7 Remove cross-crate marks
They create quite a bit of friction. Really, we should just move the
tests to the same crate, rather than paper over existing split.
2020-05-20 13:00:50 +02:00
Aleksey Kladov
d18d1c0594 Significantly more glorious marks 2020-05-20 13:00:50 +02:00
vsrs
cd45c73b66 JFF, ra_fixture arg name for a code highlighting 2020-05-16 17:27:23 +03:00
vsrs
7e9c7ac4ee smoke test 2020-05-16 16:56:41 +03:00
vsrs
2c00bd8c6a Propogate fixture meta to AnalysisHost
Except crate name.
2020-05-16 15:23:43 +03:00
vsrs
2dde9b1994 Use FixtureMeta in MockAnalysis 2020-05-16 13:17:21 +03:00
vsrs
256fb7556e Remove temporary FixtureEntry parsed_meta field. 2020-05-16 12:25:26 +03:00
vsrs
d901e0e709 Reimplement ra_db::fixture::ParsedMeta
in terms of test_utils::FixtureMeta
2020-05-16 11:57:41 +03:00
vsrs
eeb98237d1 parse fixture meta in test_utils crate 2020-05-16 11:16:32 +03:00
Aleksey Kladov
5c04d8544c unindent -> dedent 2020-05-09 14:48:43 +02:00
Timo Freiberg
86fa80e5b3 Allow fixture strings with unindented first line
This allows fixtures like
        "//- /lib.rs
         ...
         //- /foo.rs
         ...
"
2020-05-06 18:09:28 +02:00
Aleksey Kladov
e873469500 text-size 1.0.0 2020-04-25 12:15:32 +02:00