Emil Lauridsen
6af4bf7a8d
Configuration plumbing for cargo watcher
2019-12-25 17:37:40 +01:00
Emil Lauridsen
66e8ef53a0
Initial implementation of cargo check watching
2019-12-25 17:37:40 +01:00
Jeremy Kolb
019fab2261
lsp-types 0.67
2019-12-23 09:33:49 -05:00
John-John Tedro
700e74df4a
Bump lsp-types to 0.66.0 ( fixes #2651 )
2019-12-23 11:03:41 +01:00
Aleksey Kladov
6acef5a7c0
Don't fire no-op changes after files are saved to disk
2019-12-22 13:56:19 +01:00
Jeremy Kolb
4ef5cd9a89
Add some module docs
2019-12-21 15:27:38 -05:00
bors[bot]
b902d4403a
Merge #2627
...
2627: Use SelectionRange from LSP 3.15 r=matklad a=kjeremy
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-12-21 10:01:42 +00:00
Jeremy Kolb
429199d481
Use SelectionRange from LSP 3.15
2019-12-20 18:57:31 -05:00
kjeremy
0d5d63a80e
Clippy lints
2019-12-20 15:14:30 -05:00
Omer Ben-Amram
6fba427bf3
remove unnecessary turbofish.
2019-12-15 18:15:24 +02:00
Omer Ben-Amram
40116af598
cfg gated tests that only work on windows.
2019-12-15 17:54:24 +02:00
Omer Ben-Amram
2e2fae32df
improved path checking to consider only paths that may contain a windows drive.
2019-12-15 17:46:00 +02:00
Omer Ben-Amram
ebf302d261
move import inside cfg block
2019-12-15 17:03:39 +02:00
Omer Ben-Amram
324cbe839f
Lowercase drive letters on windows before sending to extension.
2019-12-15 16:51:57 +02:00
bors[bot]
7238037de4
Merge #2548
...
2548: Support setting cargo features and resolve `default` features by default r=matklad a=oxalica
Fixes #2524
Co-authored-by: oxalica <oxalicc@pm.me>
2019-12-14 11:57:49 +00:00
kjeremy
a234b5a3ca
LSP 3.15 supports the deprecated tag on completions
2019-12-13 16:08:47 -05:00
oxalica
af4eb26645
Support setting cargo features
2019-12-13 18:16:34 +08:00
Jeremy Kolb
b4c8e5b9e9
Do not trigger signature help on close
2019-12-12 07:55:05 -05:00
Aleksey Kladov
6c6e6978eb
Update lsp-types more
2019-12-11 18:34:36 +01:00
Aleksey Kladov
b0a4765059
Revert "Revert "Support LSP 3.15""
...
This reverts commit 1e0bf205ef
.
2019-12-11 18:34:01 +01:00
Aleksey Kladov
1e0bf205ef
Revert "Support LSP 3.15"
...
This reverts commit 712700d8e0
.
2019-12-11 18:27:34 +01:00
Jeremy Kolb
fcccf8ec59
Support LSP 3.15
...
This merely upgrades our protocol support. It does not add any of the new features.
2019-12-11 09:11:55 -05:00
Aleksey Kladov
5a012fb9fd
Implement ra_lsp_server --version
2019-12-09 16:11:46 +01:00
Aleksey Kladov
8ec5f2fcdc
Skip slow tests by default
2019-12-07 13:19:42 +01:00
Vincent Rouillé
b437dca4bd
Run rustfmt with respect to Cargo.toml edition
2019-12-04 23:05:01 +01:00
bors[bot]
780f476b4f
Merge #2451
...
2451: Use env_logger instead of flexi_logger r=matklad a=AlexanderEkdahl
This fixes https://github.com/rust-analyzer/rust-analyzer/issues/2335
- By default only `error` will be printed. From what I can tell this matches the current behaviour. Configured through `RUST_LOG`.
- I looked through the optional dependencies for `env_logger`and I have only enabled `human_time`. Without this feature no timestamp will be shown for log messages.
- `RA_LOG_DIR` feature is removed
This PR adds 2 new dependencies(`env_logger` and `human_time`) and removes 6 dependencies.
Co-authored-by: Alexander Ekdahl <alexander@ekdahl.io>
2019-11-30 19:19:28 +00:00
Alexander Ekdahl
eb4e70fc67
Remove flexi_logger from ra_lsp_server
2019-11-29 19:35:03 -05:00
Wilco Kusee
be9ba2b392
Move identifier check to analysis
2019-11-29 15:52:12 +01:00
Wilco Kusee
f081c9d94d
Also allow renaming to underscore
2019-11-29 15:27:22 +01:00
Wilco Kusee
9c764cb966
Only allow renames to valid identifiers
2019-11-29 15:14:53 +01:00
Aleksey Kladov
757e593b25
rename ra_ide_api -> ra_ide
2019-11-27 21:35:06 +03:00
Jeremy Kolb
8b1f2cd14e
Update parking_lot and smallvec to drop some dependencies
2019-11-26 07:29:28 -05:00
Aleksey Kladov
6fbad0619b
Ban println in lsp_server
2019-11-22 10:46:56 +03:00
Aleksey Kladov
eec68e6f45
Merge pull request #2297 from kiljacken/master
...
Add fancy truncation of type hints.
2019-11-20 08:38:25 +03:00
Emil Lauridsen
dadad36bb9
Move type inlay hint truncation to language server
...
This commit implements a general truncation framework for HirFormatter
that keeps track of how much has been output so far. This information
can then be used to perform truncation inside the language server,
instead of relying on the client.
Initial support is implemented for truncating types hints using the
maxInlayHintLength server config option. The existing solution in the
VSCode extension has been removed in favor of letting the server
truncate type hints.
2019-11-19 17:23:50 +01:00
Edwin Cheng
4012da07fd
Change return type of expand_macro
2019-11-19 22:56:48 +08:00
Edwin Cheng
3ccd05fedc
Add recursive expand in vscode
2019-11-19 21:49:06 +08:00
Aleksey Kladov
7e2f4b30db
Disable doctests
2019-11-17 18:35:05 +03:00
kjeremy
91b154fa05
Update crates
...
Removes nodrop and extra arrayvec
We have an extra crossbeam-queue and crossbeam-utils left but those should
drop once rayon accepts https://github.com/rayon-rs/rayon/pull/704
2019-11-07 13:05:12 -05:00
Martin Asquino
ccf8817d18
Use bool
instead of Option<bool>
and print it's value only when true
2019-11-02 19:33:34 -03:00
Martin Asquino
dc3848a6a3
Set deprecated
field on CompletionItem
s
2019-11-02 17:37:47 -03:00
kjeremy
b441b4e8ef
Some clippy fixes
2019-10-30 13:36:37 -04:00
kjeremy
3c140050ff
Profile all request handlers
2019-10-29 16:08:36 -04:00
Aleksey Kladov
d5cd8b5be2
disable the new typing handler for ->
...
It doesn't actually work with LSP
2019-10-25 13:03:57 +03:00
Aleksey Kladov
53e3bee0cf
insert space after ->
2019-10-25 12:41:34 +03:00
Aleksey Kladov
8d2fd59cfb
make typing infra slightly more extensible
2019-10-25 11:30:46 +03:00
Aleksey Kladov
dc65219ae1
document feature flags
2019-10-25 09:00:30 +03:00
Aleksey Kladov
4529da906d
for highlighting, search only the current file
2019-10-24 14:16:36 +03:00
Aleksey Kladov
418fbc8662
don't die if a sync task panics
2019-10-24 09:56:30 +03:00
Aleksey Kladov
f5bf7f29b5
add couple of profiling calls
2019-10-23 18:26:43 +03:00
Ekaterina Babshukova
93c179531b
fix highlighting
2019-10-22 23:47:31 +03:00
Ekaterina Babshukova
d26d0ada50
restructure a bit
2019-10-22 23:47:31 +03:00
Ekaterina Babshukova
79e6b3b0d1
make handle_references
accept refs from other files
2019-10-22 23:47:31 +03:00
Alex Zatelepin
6d105ccd93
add test #2033
2019-10-21 22:34:44 +03:00
Alex Zatelepin
9d5e932626
fixup folding ranges for "lineFoldingOnly" clients #2033
2019-10-21 21:35:42 +03:00
kjeremy
c3045c68a9
relative-path 1.0
2019-10-17 13:08:33 -04:00
bors[bot]
84d9fd1864
Merge #1998
...
1998: No need to make config pub r=matklad a=kjeremy
Just a drive by
Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-10-17 11:10:25 +00:00
Shotaro Yamada
5ca6281164
Remove unused dependencies
2019-10-12 08:00:54 +09:00
kjeremy
04963fa14d
No need to make config pub
2019-10-11 15:13:15 -04:00
Aleksey Kladov
355419d404
use slightly more idiomatic api for cfg
2019-10-08 14:22:49 +03:00
oxalica
c6303d9fee
Use raw cfgs in json project and fix typo
2019-10-05 20:55:27 +08:00
uHOOCCOOHu
1067a1c5f6
Read default cfgs from rustc
2019-10-03 02:28:03 +08:00
Alexander Andreev
fdbd6bb11a
Added test for check doc strings in crates.
...
#1856
2019-09-30 11:58:53 +03:00
Aleksey Kladov
d847d53e36
Start simplifying editing API
2019-09-26 22:22:08 +03:00
Aleksey Kladov
36732a42bd
move fold conversino to conv.rs
2019-09-19 18:27:47 +03:00
Aleksey Kladov
184e80007b
fix typo
2019-09-19 18:18:58 +03:00
Aleksey Kladov
ef2b84ddf1
introduce hir debugging infra
...
This is to make debugging rust-analyzer easier.
The idea is that `dbg!(krate.debug(db))` will print the actual, fuzzy
crate name, instead of precise ID. Debug printing infra is a separate
thing, to make sure that the actual hir doesn't have access to global
information.
Do not use `.debug` for `log::` logging: debugging executes queries,
and might introduce unneded dependencies to the crate graph
2019-09-09 12:32:16 +03:00
Aleksey Kladov
219287a14c
don't deadlock on shutdown
...
Specifically, when we tear down IO threads, we should take care to
dispose connection.
closes #1775
2019-09-06 20:58:21 +03:00
Aleksey Kladov
28df377759
add option to disable notify
2019-09-06 17:21:29 +03:00
Aleksey Kladov
33965f0f3e
fix renaming of modules
2019-09-05 21:36:40 +03:00
kjeremy
cb063a9b30
lsp-types 0.61.0
2019-09-03 10:50:39 -04:00
Aleksey Kladov
4e3f5cc729
cleanup main loop
2019-08-31 14:47:37 +03:00
Aleksey Kladov
983de30a56
inline thread-worker
2019-08-30 20:32:59 +03:00
Aleksey Kladov
7cc14a7596
⬆️ lsp-server
2019-08-30 20:18:57 +03:00
Aleksey Kladov
72a3722470
move lsp-server to a separate repository
2019-08-30 17:24:11 +03:00
Aleksey Kladov
ee932d464b
⬆️ vfs
2019-08-25 13:13:08 +03:00
Aleksey Kladov
5b18a4eef9
rename struct -> record, pos -> tuple
2019-08-23 16:59:50 +03:00
Aleksey Kladov
69bbe79c50
implement feature flags
2019-08-22 15:07:31 +03:00
Aleksey Kladov
4dd5afb7fe
show error to the user when deserializing config
2019-08-22 11:08:22 +03:00
Aleksey Kladov
6ab85cc192
fix default for the exlude key
2019-08-21 17:30:58 +03:00
Aleksey Kladov
77751cfe01
remove debug-print
2019-08-20 19:55:34 +03:00
Aleksey Kladov
bbeb07e5ca
switch to upstream ra_vfs
2019-08-20 19:53:05 +03:00
Aleksey Kladov
188c9967c0
Drop unnecessary &'_
from impls
2019-08-20 19:53:05 +03:00
Aleksey Kladov
4753409f86
refactor TryConvWith similar to ConvWith
2019-08-20 19:53:05 +03:00
Aleksey Kladov
6ea4184fd1
translate \n -> \r\n on the way out
2019-08-20 19:53:05 +03:00
Aleksey Kladov
80a6e61446
make CTX type param instead of assoc type
...
that way, we can implement ConvWith<&'_ CTX> for different lifetimes
2019-08-20 19:53:05 +03:00
Aleksey Kladov
de3f2948ea
add tests for crlf
2019-08-20 19:53:05 +03:00
Aleksey Kladov
ccca427ce4
minor
2019-08-20 19:53:05 +03:00
Aleksey Kladov
7cd9b1dd7a
don't load sysroot in most heavy tests
2019-08-19 15:41:18 +03:00
Aleksey Kladov
64ecba4f15
update lsp
2019-08-17 22:21:59 +03:00
Aleksey Kladov
343463c824
implement durability
2019-08-15 15:27:00 +03:00
Aleksey Kladov
13eddd7c49
Drop support for old extendSelection API
...
Emacs now handles this via native LSP request
dc86bbb227
2019-08-12 13:49:28 +03:00
Kirill Bulatov
2c5c35bdae
Always set the runnable name
2019-08-09 23:34:14 +03:00
Kirill Bulatov
726535a44e
Extract common logic
2019-08-09 22:19:34 +03:00
Kirill Bulatov
918addee23
Show backtraces in lens runnables
2019-08-09 21:42:04 +03:00
bors[bot]
7e12422fa2
Merge #1652
...
1652: Improve type hints behavior r=matklad a=SomeoneToIgnore
This PR fixed the following type hints issues:
* Restructures the `InlayKind` enum contents based on the discussion here: https://github.com/rust-analyzer/rust-analyzer/pull/1606#issuecomment-515968055
* Races described in #1639
* Caches the latest decorations received for each file to show them the next time the file is opened (instead of a new server request)
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2019-08-06 16:50:49 +00:00
Aleksey Kladov
3d45da9bca
fix tests
2019-08-06 14:41:22 +02:00
Aleksey Kladov
deea8f52d9
allow to exclude certain files and directories
2019-08-06 14:28:31 +02:00
Aleksey Kladov
f70b7e1f07
rename config
2019-08-06 14:28:31 +02:00
Aleksey Kladov
34203256bf
introduce ra_vfs_glob crate
...
It manages exclusion rules for the vfs crate
2019-08-06 14:28:31 +02:00