Aleksey Kladov
21f4588fc8
internal: fix slightly broken test
2021-04-19 18:57:47 +03:00
Aleksey Kladov
06a633ff42
feat: improve performance by delaying computation of fixes for diagnostics
2021-04-13 12:09:04 +03:00
Aleksey Kladov
460f0ef669
internal: unfork code paths for unresolved and resolved assist
2021-04-13 10:59:15 +03:00
Aleksey Kladov
186c5c47cb
feat: avoid checking the whole project during initial loading
2021-04-12 15:29:31 +03:00
Aleksey Kladov
8fe20b19d4
More robust status notifications
2021-04-06 15:45:31 +03:00
Edwin Cheng
f41ae64722
Ignore proc-macro stdout to prevent IPC crash
2021-03-24 03:44:28 +08:00
Matthias Krüger
202b51bc7b
a lot of clippy::style fixes
2021-03-21 16:15:41 +01:00
Lukas Wirth
a9a7c5cb1f
Don't return a SourceChange on WillRenameFiles when nothing gets refactored
2021-03-20 13:57:58 +01:00
Aleksey Kladov
da73c93c7f
Don't punish every crate with serde-json
2021-03-08 20:37:20 +03:00
Aleksey Kladov
4d14617636
Speedup heavy tests
...
We used to skip sysroot, but this logic got bitrotted, reinstalling.
2021-03-01 12:14:16 +03:00
Dániel Buga
cb39f2df94
Clean up unused field warning
2021-03-01 09:12:42 +01:00
Aleksey Kladov
30b8468c7e
Simplify heavy tests
...
Progress notifications are edge triggered, while status is level
triggered. This makes it a hared to misuse signal for the readiness of
the server.
2021-01-28 19:15:49 +03:00
Aleksey Kladov
a44f6c18fb
Use RA_LOG in tests
2021-01-28 16:49:07 +03:00
Aleksey Kladov
a58fa29dc2
Easier to debug timeouts in tests
2021-01-28 16:00:33 +03:00
bors[bot]
42e00032c6
Merge #7220
...
7220: same level folder rename for will_rename_files r=kjeremy a=ShuiRuTian
use tricky way to support folder rename.
Another step after #7009 and for #4471
Co-authored-by: ShuiRuTian <158983297@qq.com>
Co-authored-by: Song Gao <158983297@qq.com>
2021-01-13 17:40:45 +00:00
ShuiRuTian
727a7827fd
fix windows test.
2021-01-13 22:56:31 +08:00
ShuiRuTian
76e6589016
unwrap.
2021-01-13 12:10:45 +08:00
ShuiRuTian
6a15876fc4
skip slow tests.
2021-01-13 00:58:28 +08:00
ShuiRuTian
5f8fa66b77
use path rather than hard code.
2021-01-13 00:53:17 +08:00
ShuiRuTian
e1c9c9b604
fix and add tests.
2021-01-13 00:30:49 +08:00
Aleksey Kladov
edf03548e3
More readable test
2021-01-06 18:36:13 +03:00
Aleksey Kladov
f7a15b5cd1
More maintainable config
...
Rather than eagerly converting JSON, we losslessly keep it as is, and
change the shape of user-submitted data at the last moment.
This also allows us to remove a bunch of wrong Defaults
2021-01-06 15:39:28 +03:00
Aleksey Kladov
624eb1ee54
More maintainable caps config
...
The idea here is that we preserve client's config as is, without
changes. This gets rid of state!
2021-01-05 17:46:57 +03:00
Jesse Bakker
f355a6d831
Split textDocument/formatting TextEdit with diff
2020-12-31 15:33:20 +01:00
kjeremy
233fdb12ce
Latest LSP 3.16 protocol
...
Pulls in https://github.com/gluon-lang/lsp-types/pull/186
2020-11-16 15:10:13 -05:00
Aleksey Kladov
4dfda64b39
Cleanup workspace loading a tiny bit
2020-11-13 17:38:26 +01:00
Aleksey Kladov
ba8d6d1e4e
Remove more unreachable pubs
2020-11-02 16:58:33 +01:00
Igor Aleksanov
4ebacf9024
Fix failing test
2020-10-02 12:35:25 +03:00
Josh Stone
29c3421391
Don't return any TextEdit if formatting is unchanged
...
I found that `textDocument/formatting` was always returning a full
`TextEdit` replacement, even when there are no changes, which caused Vim
(w/ vim-lsp) to always indicate a modified buffer after formatting. We
can easily compare whether there were changes and return `null` if not,
so the client knows there's nothing to do.
2020-09-16 10:05:41 -07:00
Aleksey Kladov
c6dffe479b
Cleanup heavy tests
2020-08-25 19:26:45 +02:00
Zac Pullar-Strecker
7bbca7a1b3
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
2020-08-24 21:20:13 +12:00
Aleksey Kladov
6cff076513
Revive cache cleaning
...
The idea here is that, on CI, we only want to cache crates.io
dependencies, and not local crates. This keeps the size of the cache
low, and also improves performance, as network and moving files on
disk (on Windows) can be slow.
2020-08-18 11:07:21 +02:00
Pavan Kumar Sunkara
eac24d52e6
Rename ra_project_model -> project_model
2020-08-13 12:05:30 +02:00
Aleksey Kladov
208b7bd7ba
Rename ra_prof -> profile
2020-08-12 16:35:29 +02:00
Zac Pullar-Strecker
b34ad4bc8a
update & configure cmark to render three backticks
2020-08-02 20:32:09 +12:00
Zac Pullar-Strecker
f05d7b41a7
Merge remote-tracking branch 'upstream/master' into 503-hover-doc-links
...
Hasn't fixed tests yet.
2020-07-31 14:12:44 +12:00
Kirill Bulatov
85d71f4dff
Run package-specific cargo check and test for all targets
2020-07-29 15:35:27 +03:00
Aleksey Kladov
97d309ea4b
Bump test timeout for macs
2020-07-28 10:31:08 +02:00
Aleksey Kladov
be06aaecde
Lighter weight tempdir
2020-07-23 22:26:25 +02:00
Aleksey Kladov
7c0743293e
Require quotes around key-value cfg flags in rust-project.json
...
This matches rustc command-line flags, as well as the build.rs format.
2020-07-23 19:03:17 +02:00
Jeremy Kolb
d7cd88b1a2
Mark machine applicable fixes as preferred
...
This allows us to run the auto fix command from vscode to automatically
fix all diagnostics in the file.
They are also distinguished in the UI.
2020-07-16 10:51:25 -04:00
Aleksey Kladov
7ae696ba76
Remove unwanted dependency
2020-07-08 18:26:31 +02:00
Aleksey Kladov
6c7578bd7a
Move cargo metadata off the main loop
2020-07-02 17:39:51 +02:00
Aleksey Kladov
4f26a3734e
Indicate when project needs a reload
2020-07-02 15:34:12 +02:00
Zac Pullar-Strecker
73d5a31450
Update missed heavy test
2020-06-30 20:10:23 +12:00
Laurențiu Nicola
b4420626fb
Add support for include_str
2020-06-27 19:34:48 +03:00
Aleksey Kladov
154cb8243b
Be more explicit about absolute paths at various places
2020-06-24 14:39:34 +02:00
Aleksey Kladov
a0b76161ab
Disable file watching when running slow tests
...
This should rid us of the intermittent test failure
https://github.com/rust-analyzer/rust-analyzer/pull/5017#issuecomment-648717983
2020-06-24 12:27:13 +02:00
Aleksey Kladov
7ce122b1df
Remove useless test code
2020-06-23 23:45:40 +02:00
Aleksey Kladov
aa69757a01
More principled indentation trimming in fixtures
2020-06-23 23:33:41 +02:00
Aleksey Kladov
a34f9b7fb3
Docs for Fixture
2020-06-23 18:58:45 +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
dad1333b48
New VFS
2020-06-23 17:51:06 +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
c9a41bd92d
Actually test include!(concant!(env!()));
...
It triggered index-based goto definition before :-(
2020-06-05 15:49:12 +02:00
Aleksey Kladov
cb9d9040f7
Cleanup test
2020-06-05 15:14:47 +02:00
Jeremy Kolb
9e71fc0314
Mark fixes from diagnostics as quick fixes
2020-06-03 09:31:32 -04:00
Aleksey Kladov
2e7d12d2f3
Drop test for old format
2020-06-03 12:39:11 +02:00
Aleksey Kladov
8baa4c5d07
Groundwork for specifying the set of projects via config
2020-06-03 12:22:01 +02:00
Aleksey Kladov
ee181cf683
Drop no-project test
...
Eventually, we should support "just open random rust file" use case,
we don't really do this now, so let's avoid spending time on it until
we fix it properly.
2020-06-03 11:07:04 +02:00
Aleksey Kladov
ac4782ef11
Merge pull request #4382 from woody77/json_cfgs
...
Begin transition to new fields for JsonProject crate cfgs
2020-06-03 10:28:15 +02:00
Aleksey Kladov
bc3db7c1de
Fix tests
2020-06-02 18:09:12 +02:00
veetaha
d605ec9c32
Change Runnable.bin -> Runnable.kind
...
As per matklad, we now pass the responsibility for finding the binary to the frontend.
Also, added caching for finding the binary path to reduce
the amount of filesystem interactions.
2020-05-31 05:21:45 +03:00
veetaha
a419cedb1c
Fix tests, apply code review proposals
2020-05-31 03:10:23 +03:00
Aaron Loucks
a047f10839
Hover tooltip module name is monospace once again
...
The line separator is moved below the function signature to split
regions between the docs. This is very similar to how IntelliJ
displays tooltips. Adding an additional separator between the module
name and function signature currently has rendering issues.
Fixes #4594
Alternative to #4615
2020-05-25 23:18:45 -04:00
Aleksey Kladov
76e170c3d0
Less rust-analyzer specific onEnter
2020-05-25 14:28:47 +02:00
Aleksey Kladov
f26b7928e0
Merge pull request #4495 from vsrs/fixture_meta
...
Test fixtures parsing improvements
2020-05-24 15:32:52 +02:00
Galilée 'Bill' Enguehard
6197a960df
Fix resolve_proc_macro heavy test
2020-05-23 08:59:51 +02:00
Aleksey Kladov
4b495da368
Transition OnEnter to WorkspaceSnippetEdit
...
This also changes our handiling of snippet edits on the client side.
`editor.insertSnippet` unfortunately forces indentation, which we
really don't want to have to deal with. So, let's just implement our
manual hacky way of dealing with a simple subset of snippets we
actually use in rust-analyzer
2020-05-21 15:08:03 +02:00
Aleksey Kladov
3e9bf7ebab
Update test data
2020-05-19 20:29:18 +02:00
vsrs
256fb7556e
Remove temporary FixtureEntry parsed_meta field.
2020-05-16 12:25:26 +03:00
Jeremy Kolb
d4471dccfe
Check client capabilities before sending progress notifications
...
Fixes #4384
2020-05-11 13:16:46 -04:00
Aleksey Kladov
3bec2be9de
req -> lsp_ext
2020-05-10 19:27:12 +02:00
Aaron Wood
beb79ed104
Begin transition to new fields for JsonProject crate cfgs
...
This starts the transition to a new method of documenting the cfgs that are
enabled for a given crate in the json file. This is changing from a list
of atoms and a dict of key:value pairs, to a list of strings that is
equivalent to that returned by `rustc --print cfg ..`, and parsed in the
same manner by rust-analyzer.
This is the first of two changes, which adds the new field that contains
the list of strings. Next change will complete the transition and remove
the previous fields.
2020-05-08 16:59:52 -07:00
bors[bot]
1b136aae0b
Merge #4296
...
4296: Support cargo:rustc-cfg in build.rs r=matklad a=robojumper
Fixes #4238 .
Co-authored-by: robojumper <robojumper@gmail.com>
2020-05-07 18:50:00 +00:00
Aleksey Kladov
3908fad1fe
Normalize naming of diagnostics
2020-05-05 21:35:30 +02:00
robojumper
059fc86963
Merge heavy tests
2020-05-05 14:53:18 +02:00
robojumper
2980ba1fde
Support build.rs cargo:rustc-cfg
2020-05-04 13:29:09 +02:00
Aleksey Kladov
247d32cbfd
Test/check the whole package
...
Closes #4255
2020-05-02 10:57:37 +02:00
kjeremy
e3ee61f5e8
Filter out CodeActions if a server only support commands.
2020-05-01 13:44:32 -04:00
kjeremy
61f1c0a990
lsp-types 0.74
...
* Fixes a bunch of param types to take partial progress into account.
* Will allow us to support insert/replace text in completions
2020-04-26 16:05:22 -04:00
Aleksey Kladov
5ef0f44499
Add cargo test
to the list of Run commands
2020-04-26 10:40:34 +02:00
Aleksey Kladov
7623db1106
minor clenup
2020-04-25 19:30:00 +02: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
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
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
a4f9d966f0
Add integrated test for concat include env
2020-03-31 19:19:14 +02:00
Aleksey Kladov
6b2f02fdfd
Ignore createProgress request in tests
...
closes #3783
2020-03-31 12:02:47 +02:00
Aleksey Kladov
12297ab675
Fix race in the tests
2020-03-30 11:33:01 +02:00
bors[bot]
5bdc249b2c
Merge #3587
...
3587: Use WorkDoneProgress LSP API for initial load r=matklad a=slyngbaek
Addresses #3283
Rather than using custom UI for showing the loaded state. Rely
on the WorkDoneProgress API in 3.15.0
https://microsoft.github.io/language-server-protocol/specification#workDoneProgress .
No client-side work was necessary. The UI is not exactly what is
described in the issue but afaict that's how VS Code implements the LSP
API.
- The WorkDoneProgressEnd does not appear to display its message
contents (controlled by vscode)
Co-authored-by: Steffen Lyngbaek <steffenlyngbaek@gmail.com>
2020-03-16 11:48:46 +00:00
Steffen Lyngbaek
5a1e531176
Fix broken tests
...
- Properly wait for workspace loading to be done
2020-03-13 22:06:49 -07:00
Hannes De Valkeneer
e9d025b618
fixup! feat: add debug code lens
...
avoid repetition of `--no-run`
2020-03-12 21:28:26 +01:00
Hannes De Valkeneer
e903fd0d97
feat: add debug code lens
...
Refs #3539
2020-03-11 22:26:47 +01:00
Kirill Bulatov
b8ddcb0652
Run cargo +nightly fix --clippy -Z unstable-options
2020-02-18 16:03:08 +02:00
Aleksey Kladov
865759925b
Rename folder
2020-02-18 12:37:45 +01:00