]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agouse new translate_offset_with_edit for TryConvWith
Bernardo [Sun, 23 Dec 2018 14:49:14 +0000 (15:49 +0100)]
use new translate_offset_with_edit for TryConvWith
doc comments

5 years agoadd line_index proptest
Bernardo [Sun, 23 Dec 2018 13:01:36 +0000 (14:01 +0100)]
add line_index proptest

5 years agomake criterion args work, small simplification
Bernardo [Sat, 22 Dec 2018 21:11:10 +0000 (22:11 +0100)]
make criterion args work, small simplification

5 years agofix arbitrary offset generation, col translation working
Bernardo [Sat, 22 Dec 2018 19:52:43 +0000 (20:52 +0100)]
fix arbitrary offset generation, col translation working

5 years agocolumn translation implemented but not quite working yet
Bernardo [Sat, 22 Dec 2018 14:44:27 +0000 (15:44 +0100)]
column translation implemented but not quite working yet

5 years agoiterate over `Step`s which are either, newlines or multibyte chars
Bernardo [Sat, 22 Dec 2018 11:59:48 +0000 (12:59 +0100)]
iterate over `Step`s which are either, newlines or multibyte chars

5 years agosimplify newline check with macro
Bernardo [Fri, 21 Dec 2018 19:11:27 +0000 (20:11 +0100)]
simplify newline check with macro

5 years agoremove slower impl, add benchmarks
Bernardo [Fri, 21 Dec 2018 17:51:31 +0000 (18:51 +0100)]
remove slower impl, add benchmarks

5 years agofinal iteration, faster a bit simpler
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

5 years agosimplified version
Bernardo [Wed, 19 Dec 2018 18:25:42 +0000 (19:25 +0100)]
simplified version

5 years agomove translate_offset_with_edit to ra_editor
Bernardo [Tue, 18 Dec 2018 17:46:54 +0000 (18:46 +0100)]
move translate_offset_with_edit to ra_editor

5 years agoinitial newline translation working
Bernardo [Mon, 17 Dec 2018 19:13:54 +0000 (20:13 +0100)]
initial newline translation working
todo:
cleanup, simplify
handle columns

5 years agotest translate_offset_with_edit against simple impl for single edits
Bernardo [Fri, 14 Dec 2018 17:00:35 +0000 (18:00 +0100)]
test translate_offset_with_edit against simple impl for single edits

5 years agosimplify and reduce number of values explored
Bernardo [Wed, 12 Dec 2018 18:25:50 +0000 (19:25 +0100)]
simplify and reduce number of values explored

5 years agoproptest strategies for TextUnit and AtomTextEdit
Bernardo [Wed, 12 Dec 2018 17:51:43 +0000 (18:51 +0100)]
proptest strategies for TextUnit and AtomTextEdit

5 years agoMerge #331
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>
5 years agocancelled is not Copy
Aleksey Kladov [Tue, 25 Dec 2018 10:36:39 +0000 (13:36 +0300)]
cancelled is not Copy

5 years agoMerge #328
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>
5 years agofix warning conversion
Aleksey Kladov [Mon, 24 Dec 2018 23:07:30 +0000 (02:07 +0300)]
fix warning conversion

5 years agoMerge #326
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>
5 years agofix tests
gfreezy [Mon, 24 Dec 2018 15:01:16 +0000 (23:01 +0800)]
fix tests

5 years agoremove option from Diagnostic
gfreezy [Mon, 24 Dec 2018 15:00:18 +0000 (23:00 +0800)]
remove option from Diagnostic

5 years agokeep severity to Error & WeakWarning
gfreezy [Mon, 24 Dec 2018 14:48:46 +0000 (22:48 +0800)]
keep severity to Error & WeakWarning

5 years agoMerge #327
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>
5 years agoChange inference tests to have one per file
Florian Diebold [Mon, 24 Dec 2018 14:36:54 +0000 (15:36 +0100)]
Change inference tests to have one per file

5 years agoRename a variable for consistency
Florian Diebold [Mon, 24 Dec 2018 14:19:49 +0000 (15:19 +0100)]
Rename a variable for consistency

5 years agoClean up Ty a bit
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.

5 years agoMerge #278
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>
5 years agoMerge #302
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>
5 years agoAdd a very hacky workaround to not trace decorations requests
DJMcNab [Mon, 24 Dec 2018 13:43:08 +0000 (13:43 +0000)]
Add a very hacky workaround to not trace decorations requests

5 years agoAdd make_pub_crate code action to ra_editor
Hirokazu Hata [Sun, 16 Dec 2018 09:17:33 +0000 (18:17 +0900)]
Add make_pub_crate code action to ra_editor

5 years agoPrepare Ty::new for resolution
Florian Diebold [Sun, 23 Dec 2018 16:33:02 +0000 (17:33 +0100)]
Prepare Ty::new for resolution

5 years agoremove unnecessary braces in use statments
gfreezy [Sun, 23 Dec 2018 16:40:36 +0000 (00:40 +0800)]
remove unnecessary braces in use statments

5 years agoadd serverity to vscode diagnostics
gfreezy [Sun, 23 Dec 2018 16:39:33 +0000 (00:39 +0800)]
add serverity to vscode diagnostics

5 years agoType the return values of call expressions
Florian Diebold [Sun, 23 Dec 2018 16:16:47 +0000 (17:16 +0100)]
Type the return values of call expressions

5 years agoResolve paths to defs (functions currently) during type inference
Florian Diebold [Sun, 23 Dec 2018 16:13:11 +0000 (17:13 +0100)]
Resolve paths to defs (functions currently) during type inference

5 years agoresolved #324: remove unnecessary braces in use statement.
gfreezy [Sun, 23 Dec 2018 15:50:11 +0000 (23:50 +0800)]
resolved #324: remove unnecessary braces in use statement.

5 years agoMake let statements kind of work
Florian Diebold [Sun, 23 Dec 2018 12:22:29 +0000 (13:22 +0100)]
Make let statements kind of work

5 years agoRemove unwraps
Florian Diebold [Sun, 23 Dec 2018 11:59:38 +0000 (12:59 +0100)]
Remove unwraps

5 years agoGet rid of the terrible nesting in PathExpr inference
Florian Diebold [Sun, 23 Dec 2018 11:54:53 +0000 (12:54 +0100)]
Get rid of the terrible nesting in PathExpr inference

5 years agoCleanup
Florian Diebold [Sun, 23 Dec 2018 11:15:46 +0000 (12:15 +0100)]
Cleanup

5 years agoAdd testing infrastructure for type inference
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.

5 years agoParse integer / float types
Florian Diebold [Sat, 22 Dec 2018 21:17:55 +0000 (22:17 +0100)]
Parse integer / float types

5 years agoAdd beginnings of type infrastructure
Florian Diebold [Thu, 20 Dec 2018 20:56:28 +0000 (21:56 +0100)]
Add beginnings of type infrastructure

5 years agoImprove comment
DJMcNab [Sun, 23 Dec 2018 11:10:12 +0000 (11:10 +0000)]
Improve comment

5 years agoMerge #310
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>
5 years agomark as visited on entry instead of left
gfreezy [Sat, 22 Dec 2018 14:40:41 +0000 (22:40 +0800)]
mark as visited on entry instead of left

5 years agoMerge #323
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>
5 years agoworkaround salsa/parking-log bug
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

5 years agoMerge #322
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>
5 years agoFix analyzer extension fail when there are enabled any VIM extension.
frai [Sat, 22 Dec 2018 13:26:18 +0000 (15:26 +0200)]
Fix analyzer extension fail when there are enabled any VIM extension.

5 years agoless chatty logging
Aleksey Kladov [Sat, 22 Dec 2018 12:09:08 +0000 (15:09 +0300)]
less chatty logging

5 years agoMerge #321
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>
5 years agoless verbose debug
Aleksey Kladov [Sat, 22 Dec 2018 09:13:20 +0000 (12:13 +0300)]
less verbose debug

5 years agoless verbose debug for library data
Aleksey Kladov [Sat, 22 Dec 2018 08:57:42 +0000 (11:57 +0300)]
less verbose debug for library data

5 years agolog times
Aleksey Kladov [Sat, 22 Dec 2018 08:48:49 +0000 (11:48 +0300)]
log times

5 years agoMerge #320
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>
5 years agocompletion uses hir scopes
Aleksey Kladov [Sat, 22 Dec 2018 08:01:03 +0000 (11:01 +0300)]
completion uses hir scopes

5 years agonot visit the same crateId only once
gfreezy [Sat, 22 Dec 2018 07:30:58 +0000 (15:30 +0800)]
not visit the same crateId only once

5 years agoMerge #319
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>
5 years agofix snippet icon
Aleksey Kladov [Fri, 21 Dec 2018 23:28:09 +0000 (02:28 +0300)]
fix snippet icon

5 years agobinding icon
Aleksey Kladov [Fri, 21 Dec 2018 23:24:59 +0000 (02:24 +0300)]
binding icon

5 years agodebug pring
Aleksey Kladov [Fri, 21 Dec 2018 23:23:25 +0000 (02:23 +0300)]
debug pring

5 years agomoar icons
Aleksey Kladov [Fri, 21 Dec 2018 23:20:14 +0000 (02:20 +0300)]
moar icons

5 years agoMerge #316
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>
5 years agomore icons
Aleksey Kladov [Fri, 21 Dec 2018 23:02:47 +0000 (02:02 +0300)]
more icons

5 years agoMove the self handling from directly inside the loop
DJMcNab [Fri, 21 Dec 2018 23:01:16 +0000 (23:01 +0000)]
Move the self handling from directly inside the loop

5 years agomove completion items to conv
Aleksey Kladov [Fri, 21 Dec 2018 22:59:32 +0000 (01:59 +0300)]
move completion items to conv

5 years agoMerge #318
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>
5 years agoRemove TODO on self_hosting_parsing
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

5 years agospecify completion item kind
Aleksey Kladov [Fri, 21 Dec 2018 22:37:11 +0000 (01:37 +0300)]
specify completion item kind

5 years agocleanup
Aleksey Kladov [Fri, 21 Dec 2018 22:34:22 +0000 (01:34 +0300)]
cleanup

5 years agointroduce ComletionItemKind
Aleksey Kladov [Fri, 21 Dec 2018 22:27:07 +0000 (01:27 +0300)]
introduce ComletionItemKind

5 years agorename completion kind
Aleksey Kladov [Fri, 21 Dec 2018 22:14:15 +0000 (01:14 +0300)]
rename completion kind

5 years agoRemove uneeded todo in lexer
DJMcNab [Fri, 21 Dec 2018 22:41:09 +0000 (22:41 +0000)]
Remove uneeded todo in lexer

5 years agoFix handling of nested self in paths
DJMcNab [Fri, 21 Dec 2018 22:29:59 +0000 (22:29 +0000)]
Fix handling of nested self in paths

5 years agoMerge #315
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>
5 years agocleanup
Aleksey Kladov [Fri, 21 Dec 2018 22:02:43 +0000 (01:02 +0300)]
cleanup

5 years agodocs
Aleksey Kladov [Fri, 21 Dec 2018 22:01:40 +0000 (01:01 +0300)]
docs

5 years agorename tests
Aleksey Kladov [Fri, 21 Dec 2018 21:55:20 +0000 (00:55 +0300)]
rename tests

5 years agoscope-based copmletions on original file
Aleksey Kladov [Fri, 21 Dec 2018 21:52:02 +0000 (00:52 +0300)]
scope-based copmletions on original file

5 years agomove path completion to a separate component
Aleksey Kladov [Fri, 21 Dec 2018 20:04:56 +0000 (23:04 +0300)]
move path completion to a separate component

5 years agoremove explicit serde_derive
Aleksey Kladov [Fri, 21 Dec 2018 19:39:59 +0000 (22:39 +0300)]
remove explicit serde_derive

5 years agojoin lines collapses use_trees
Aleksey Kladov [Fri, 21 Dec 2018 18:06:01 +0000 (21:06 +0300)]
join lines collapses use_trees

5 years agomore completion components
Aleksey Kladov [Fri, 21 Dec 2018 17:55:00 +0000 (20:55 +0300)]
more completion components

5 years agoMerge #313
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>
5 years agoStart splitting completion into components
Aleksey Kladov [Fri, 21 Dec 2018 17:25:29 +0000 (20:25 +0300)]
Start splitting completion into components

5 years agoFix where clauses using fully qualified path syntax
DJMcNab [Fri, 21 Dec 2018 17:20:38 +0000 (17:20 +0000)]
Fix where clauses using fully qualified path syntax

5 years agoUndo the previous mistaken change and make publish_decorations optional
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

5 years agohide empty changes
Aleksey Kladov [Fri, 21 Dec 2018 16:13:26 +0000 (19:13 +0300)]
hide empty changes

5 years agowip
Aleksey Kladov [Fri, 21 Dec 2018 16:10:07 +0000 (19:10 +0300)]
wip

5 years agoadd tests for pd
Aleksey Kladov [Fri, 21 Dec 2018 15:53:00 +0000 (18:53 +0300)]
add tests for pd

5 years agoshow debug repr of literals
Aleksey Kladov [Fri, 21 Dec 2018 15:49:52 +0000 (18:49 +0300)]
show debug repr of literals

5 years agoMerge #312
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>
5 years agoorganize completion tests better
Aleksey Kladov [Fri, 21 Dec 2018 15:13:21 +0000 (18:13 +0300)]
organize completion tests better

5 years agoadd #[cfg(test)]
gfreezy [Fri, 21 Dec 2018 14:45:38 +0000 (22:45 +0800)]
add #[cfg(test)]

5 years agorename to dfs_find
gfreezy [Fri, 21 Dec 2018 14:30:41 +0000 (22:30 +0800)]
rename to dfs_find

5 years agoWhen constructing a crate graph, detect and forbid cycles.
gfreezy [Fri, 21 Dec 2018 14:27:04 +0000 (22:27 +0800)]
When constructing a crate graph, detect and forbid cycles.

fixed #300

5 years agouse completions in API
Aleksey Kladov [Fri, 21 Dec 2018 12:50:07 +0000 (15:50 +0300)]
use completions in API

5 years agouse Completions to collect completions
Aleksey Kladov [Fri, 21 Dec 2018 12:46:01 +0000 (15:46 +0300)]
use Completions to collect completions