Commit graph

451 commits

Author SHA1 Message Date
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 CompletionItems 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