]>
git.lizzy.rs Git - rust.git/log
Bernardo [Sun, 23 Dec 2018 14:49:14 +0000 (15:49 +0100)]
use new translate_offset_with_edit for TryConvWith
doc comments
Bernardo [Sun, 23 Dec 2018 13:01:36 +0000 (14:01 +0100)]
add line_index proptest
Bernardo [Sat, 22 Dec 2018 21:11:10 +0000 (22:11 +0100)]
make criterion args work, small simplification
Bernardo [Sat, 22 Dec 2018 19:52:43 +0000 (20:52 +0100)]
fix arbitrary offset generation, col translation working
Bernardo [Sat, 22 Dec 2018 14:44:27 +0000 (15:44 +0100)]
column translation implemented but not quite working yet
Bernardo [Sat, 22 Dec 2018 11:59:48 +0000 (12:59 +0100)]
iterate over `Step`s which are either, newlines or multibyte chars
Bernardo [Fri, 21 Dec 2018 19:11:27 +0000 (20:11 +0100)]
simplify newline check with macro
Bernardo [Fri, 21 Dec 2018 17:51:31 +0000 (18:51 +0100)]
remove slower impl, add benchmarks
Bernardo [Fri, 21 Dec 2018 17:38:28 +0000 (18:38 +0100)]
final iteration, faster a bit simpler
the main thing is we iterate over inserted newlines at once for each edit
Bernardo [Wed, 19 Dec 2018 18:25:42 +0000 (19:25 +0100)]
simplified version
Bernardo [Tue, 18 Dec 2018 17:46:54 +0000 (18:46 +0100)]
move translate_offset_with_edit to ra_editor
Bernardo [Mon, 17 Dec 2018 19:13:54 +0000 (20:13 +0100)]
initial newline translation working
todo:
cleanup, simplify
handle columns
Bernardo [Fri, 14 Dec 2018 17:00:35 +0000 (18:00 +0100)]
test translate_offset_with_edit against simple impl for single edits
Bernardo [Wed, 12 Dec 2018 18:25:50 +0000 (19:25 +0100)]
simplify and reduce number of values explored
Bernardo [Wed, 12 Dec 2018 17:51:43 +0000 (18:51 +0100)]
proptest strategies for TextUnit and AtomTextEdit
bors[bot] [Tue, 25 Dec 2018 10:40:42 +0000 (10:40 +0000)]
Merge #331
331: Cancelled is not Copy r=matklad a=matklad
I'd love to have a backtrace in `Cancelled` to be able to debug "completion is always cancelled" problem. So it probably is a good idea to make `Cancelled` non Copy type, even if it is a ZST in prod.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Tue, 25 Dec 2018 10:36:39 +0000 (13:36 +0300)]
cancelled is not Copy
bors[bot] [Mon, 24 Dec 2018 23:18:10 +0000 (23:18 +0000)]
Merge #328
328: fix warning conversion r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Mon, 24 Dec 2018 23:07:30 +0000 (02:07 +0300)]
fix warning conversion
bors[bot] [Mon, 24 Dec 2018 18:39:31 +0000 (18:39 +0000)]
Merge #326
326: resolved #324: remove unnecessary braces in use statement. r=matklad a=gfreezy
Add inspection for unnecessary braces in use statement
Co-authored-by: gfreezy <gfreezy@gmail.com>
gfreezy [Mon, 24 Dec 2018 15:01:16 +0000 (23:01 +0800)]
fix tests
gfreezy [Mon, 24 Dec 2018 15:00:18 +0000 (23:00 +0800)]
remove option from Diagnostic
gfreezy [Mon, 24 Dec 2018 14:48:46 +0000 (22:48 +0800)]
keep severity to Error & WeakWarning
bors[bot] [Mon, 24 Dec 2018 14:40:11 +0000 (14:40 +0000)]
Merge #327
327: Beginnings of type inference r=flodiebold a=flodiebold
I was a bit bored, so I thought I'd try to start implementing the type system and see how far I come :wink: This is obviously still extremely WIP, only very basic stuff working, but I thought I'd post this now to get some feedback as to whether this approach makes sense at all.
There's no user-visible effect yet, but the type inference has tests similar to the ones for the parser. My next step will probably be to implement struct types, after which this could probably be used to complete fields.
I realize this may all get thrown away when/if the compiler query system gets usable, but I feel like there are lots of IDE features that could be implemented with somewhat working type inference in the meantime :smile:
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Florian Diebold [Mon, 24 Dec 2018 14:36:54 +0000 (15:36 +0100)]
Change inference tests to have one per file
Florian Diebold [Mon, 24 Dec 2018 14:19:49 +0000 (15:19 +0100)]
Rename a variable for consistency
Florian Diebold [Mon, 24 Dec 2018 14:17:34 +0000 (15:17 +0100)]
Clean up Ty a bit
Removing irrelevant comments copied from rustc etc.
bors[bot] [Mon, 24 Dec 2018 13:51:27 +0000 (13:51 +0000)]
Merge #278
278: Add make_pub_crate code action to ra_editor r=matklad a=h-michael
implement #170
Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
bors[bot] [Mon, 24 Dec 2018 13:47:27 +0000 (13:47 +0000)]
Merge #302
302: WIP: Support tracing lsp requests. r=DJMcNab a=DJMcNab
EDIT: We need to work out a better way to handle settings before this can be merged. Help wanted
TODO: Debug why decorations are sent even when highlightingOn is disabled
This makes the log volume so high its impossible to work with anyway.
(Continuation of #84 [#99 only disabled using it, not making sure we don't send it]).
These logs can be used in https://microsoft.github.io/language-server-protocol/inspector/
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
DJMcNab [Mon, 24 Dec 2018 13:43:08 +0000 (13:43 +0000)]
Add a very hacky workaround to not trace decorations requests
Hirokazu Hata [Sun, 16 Dec 2018 09:17:33 +0000 (18:17 +0900)]
Add make_pub_crate code action to ra_editor
Florian Diebold [Sun, 23 Dec 2018 16:33:02 +0000 (17:33 +0100)]
Prepare Ty::new for resolution
gfreezy [Sun, 23 Dec 2018 16:40:36 +0000 (00:40 +0800)]
remove unnecessary braces in use statments
gfreezy [Sun, 23 Dec 2018 16:39:33 +0000 (00:39 +0800)]
add serverity to vscode diagnostics
Florian Diebold [Sun, 23 Dec 2018 16:16:47 +0000 (17:16 +0100)]
Type the return values of call expressions
Florian Diebold [Sun, 23 Dec 2018 16:13:11 +0000 (17:13 +0100)]
Resolve paths to defs (functions currently) during type inference
gfreezy [Sun, 23 Dec 2018 15:50:11 +0000 (23:50 +0800)]
resolved #324: remove unnecessary braces in use statement.
Florian Diebold [Sun, 23 Dec 2018 12:22:29 +0000 (13:22 +0100)]
Make let statements kind of work
Florian Diebold [Sun, 23 Dec 2018 11:59:38 +0000 (12:59 +0100)]
Remove unwraps
Florian Diebold [Sun, 23 Dec 2018 11:54:53 +0000 (12:54 +0100)]
Get rid of the terrible nesting in PathExpr inference
Florian Diebold [Sun, 23 Dec 2018 11:15:46 +0000 (12:15 +0100)]
Cleanup
Florian Diebold [Sun, 23 Dec 2018 11:05:54 +0000 (12:05 +0100)]
Add testing infrastructure for type inference
- move dir_tests to test_utils for that.
Florian Diebold [Sat, 22 Dec 2018 21:17:55 +0000 (22:17 +0100)]
Parse integer / float types
Florian Diebold [Thu, 20 Dec 2018 20:56:28 +0000 (21:56 +0100)]
Add beginnings of type infrastructure
DJMcNab [Sun, 23 Dec 2018 11:10:12 +0000 (11:10 +0000)]
Improve comment
bors[bot] [Sat, 22 Dec 2018 14:48:18 +0000 (14:48 +0000)]
Merge #310
310: When constructing a crate graph, detect and forbid cycles. r=matklad a=gfreezy
fixed #300
Co-authored-by: gfreezy <gfreezy@gmail.com>
gfreezy [Sat, 22 Dec 2018 14:40:41 +0000 (22:40 +0800)]
mark as visited on entry instead of left
bors[bot] [Sat, 22 Dec 2018 13:47:27 +0000 (13:47 +0000)]
Merge #323
323: workaround salsa/parking-log bug r=matklad a=matklad
https://github.com/salsa-rs/salsa/issues/99
https://github.com/Amanieu/parking_lot/issues/101
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 22 Dec 2018 13:45:57 +0000 (16:45 +0300)]
workaround salsa/parking-log bug
https://github.com/salsa-rs/salsa/issues/99
https://github.com/Amanieu/parking_lot/issues/101
bors[bot] [Sat, 22 Dec 2018 13:34:04 +0000 (13:34 +0000)]
Merge #322
322: Fix analyzer extension fail when there are enabled any VIM extension r=matklad a=max-frai
`type` command is allowed only once to be registered and it was built specially for vim mode.
So if user has vim extension enabled, rust-analyzer initialization failes on trying to register own `type` handler.
Unfortunatelly, there are no nice ways to check if command is already registered so the way is to wrap everything with try/catch and notify user about conflict.
Co-authored-by: frai <me@maxfrai.com>
frai [Sat, 22 Dec 2018 13:26:18 +0000 (15:26 +0200)]
Fix analyzer extension fail when there are enabled any VIM extension.
Aleksey Kladov [Sat, 22 Dec 2018 12:09:08 +0000 (15:09 +0300)]
less chatty logging
bors[bot] [Sat, 22 Dec 2018 09:47:54 +0000 (09:47 +0000)]
Merge #321
321: More useful logging r=matklad a=matklad
Try not to log *huge* messages, to make logging more useful.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 22 Dec 2018 09:13:20 +0000 (12:13 +0300)]
less verbose debug
Aleksey Kladov [Sat, 22 Dec 2018 08:57:42 +0000 (11:57 +0300)]
less verbose debug for library data
Aleksey Kladov [Sat, 22 Dec 2018 08:48:49 +0000 (11:48 +0300)]
log times
bors[bot] [Sat, 22 Dec 2018 08:01:49 +0000 (08:01 +0000)]
Merge #320
320: completion uses hir scopes r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Sat, 22 Dec 2018 08:01:03 +0000 (11:01 +0300)]
completion uses hir scopes
gfreezy [Sat, 22 Dec 2018 07:30:58 +0000 (15:30 +0800)]
not visit the same crateId only once
bors[bot] [Fri, 21 Dec 2018 23:28:47 +0000 (23:28 +0000)]
Merge #319
319: Completion icons r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 21 Dec 2018 23:28:09 +0000 (02:28 +0300)]
fix snippet icon
Aleksey Kladov [Fri, 21 Dec 2018 23:24:59 +0000 (02:24 +0300)]
binding icon
Aleksey Kladov [Fri, 21 Dec 2018 23:23:25 +0000 (02:23 +0300)]
debug pring
Aleksey Kladov [Fri, 21 Dec 2018 23:20:14 +0000 (02:20 +0300)]
moar icons
bors[bot] [Fri, 21 Dec 2018 23:19:14 +0000 (23:19 +0000)]
Merge #316
316: Fix handling of nested self in paths r=matklad a=DJMcNab
See https://github.com/rust-analyzer/rust-analyzer/issues/231#issuecomment-
442449505 .
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
Aleksey Kladov [Fri, 21 Dec 2018 23:02:47 +0000 (02:02 +0300)]
more icons
DJMcNab [Fri, 21 Dec 2018 23:01:16 +0000 (23:01 +0000)]
Move the self handling from directly inside the loop
Aleksey Kladov [Fri, 21 Dec 2018 22:59:32 +0000 (01:59 +0300)]
move completion items to conv
bors[bot] [Fri, 21 Dec 2018 22:48:57 +0000 (22:48 +0000)]
Merge #318
318: Remove a completed and an unactionable todo r=matklad a=DJMcNab
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
DJMcNab [Fri, 21 Dec 2018 22:44:31 +0000 (22:44 +0000)]
Remove TODO on self_hosting_parsing
This improving this code is not a good use of people-time, and this
might be the most performant approach nonwithstanding
an api for this use case being added to walkdir
Aleksey Kladov [Fri, 21 Dec 2018 22:37:11 +0000 (01:37 +0300)]
specify completion item kind
Aleksey Kladov [Fri, 21 Dec 2018 22:34:22 +0000 (01:34 +0300)]
cleanup
Aleksey Kladov [Fri, 21 Dec 2018 22:27:07 +0000 (01:27 +0300)]
introduce ComletionItemKind
Aleksey Kladov [Fri, 21 Dec 2018 22:14:15 +0000 (01:14 +0300)]
rename completion kind
DJMcNab [Fri, 21 Dec 2018 22:41:09 +0000 (22:41 +0000)]
Remove uneeded todo in lexer
DJMcNab [Fri, 21 Dec 2018 22:29:59 +0000 (22:29 +0000)]
Fix handling of nested self in paths
bors[bot] [Fri, 21 Dec 2018 22:04:32 +0000 (22:04 +0000)]
Merge #315
315: Split completion into manageable components r=matklad a=matklad
The main idea here is to do completion in two phases:
* first, we figure out surrounding context
* then, we run a series of completers on the given context.
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 21 Dec 2018 22:02:43 +0000 (01:02 +0300)]
cleanup
Aleksey Kladov [Fri, 21 Dec 2018 22:01:40 +0000 (01:01 +0300)]
docs
Aleksey Kladov [Fri, 21 Dec 2018 21:55:20 +0000 (00:55 +0300)]
rename tests
Aleksey Kladov [Fri, 21 Dec 2018 21:52:02 +0000 (00:52 +0300)]
scope-based copmletions on original file
Aleksey Kladov [Fri, 21 Dec 2018 20:04:56 +0000 (23:04 +0300)]
move path completion to a separate component
Aleksey Kladov [Fri, 21 Dec 2018 19:39:59 +0000 (22:39 +0300)]
remove explicit serde_derive
Aleksey Kladov [Fri, 21 Dec 2018 18:06:01 +0000 (21:06 +0300)]
join lines collapses use_trees
Aleksey Kladov [Fri, 21 Dec 2018 17:55:00 +0000 (20:55 +0300)]
more completion components
bors[bot] [Fri, 21 Dec 2018 17:31:43 +0000 (17:31 +0000)]
Merge #313
313: Fix where clauses using fully qualified path syntax r=matklad a=DJMcNab
Fixes #311.
Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
Aleksey Kladov [Fri, 21 Dec 2018 17:25:29 +0000 (20:25 +0300)]
Start splitting completion into components
DJMcNab [Fri, 21 Dec 2018 17:20:38 +0000 (17:20 +0000)]
Fix where clauses using fully qualified path syntax
DJMcNab [Fri, 21 Dec 2018 17:00:31 +0000 (17:00 +0000)]
Undo the previous mistaken change and make publish_decorations optional
See https://github.com/Microsoft/language-server-protocol/issues/567
for motivations to not require `InitializationOptions`
TODO: Check if there are any other protocol extensions
which should be disabled if not implemented on the client
Aleksey Kladov [Fri, 21 Dec 2018 16:13:26 +0000 (19:13 +0300)]
hide empty changes
Aleksey Kladov [Fri, 21 Dec 2018 16:10:07 +0000 (19:10 +0300)]
wip
Aleksey Kladov [Fri, 21 Dec 2018 15:53:00 +0000 (18:53 +0300)]
add tests for pd
Aleksey Kladov [Fri, 21 Dec 2018 15:49:52 +0000 (18:49 +0300)]
show debug repr of literals
bors[bot] [Fri, 21 Dec 2018 15:14:34 +0000 (15:14 +0000)]
Merge #312
312: Completion refactoring r=matklad a=matklad
Just a usual refactoring, turning a rather ad-hoc completion infra into something extensible
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
Aleksey Kladov [Fri, 21 Dec 2018 15:13:21 +0000 (18:13 +0300)]
organize completion tests better
gfreezy [Fri, 21 Dec 2018 14:45:38 +0000 (22:45 +0800)]
add #[cfg(test)]
gfreezy [Fri, 21 Dec 2018 14:30:41 +0000 (22:30 +0800)]
rename to dfs_find
gfreezy [Fri, 21 Dec 2018 14:27:04 +0000 (22:27 +0800)]
When constructing a crate graph, detect and forbid cycles.
fixed #300
Aleksey Kladov [Fri, 21 Dec 2018 12:50:07 +0000 (15:50 +0300)]
use completions in API
Aleksey Kladov [Fri, 21 Dec 2018 12:46:01 +0000 (15:46 +0300)]
use Completions to collect completions