aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion/completion_context.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rename AtomTextEdit -> IndelAleksey Kladov2020-05-051-2/+2
|
* Complete standard derivesKirill Bulatov2020-05-021-3/+3
|
* Introduce EffectExprAleksey Kladov2020-05-021-1/+1
|
* Precompute expected type during completionAleksey Kladov2020-04-261-12/+21
|
* Convert code to text-sizeAleksey Kladov2020-04-251-6/+7
|
* Adds attribute completions (#3941)Roberto Vidal2020-04-241-0/+3
|
* Introduce ActiveParameterAleksey Kladov2020-04-241-3/+4
|
* Merge #3954bors[bot]2020-04-231-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 3954: Improve autocompletion by looking on the type and name r=matklad a=bnjjj This tweet (https://twitter.com/tjholowaychuk/status/1248918374731714560) gaves me the idea to implement that in rust-analyzer. Basically for this first example I made some examples when we are in a function call definition. I look on the parameter list to prioritize autocompletions for the same types and if it's the same type + the same name then it's displayed first in the completion list. So here is a draft, first step to open a discussion and know what you think about the implementation. It works (cf tests) but maybe I can make a better implementation at some places. Be careful the code needs some refactoring to be better and concise. PS: It was lot of fun writing this haha Co-authored-by: Benjamin Coenen <[email protected]>
| * feat: improve dot completions with scoringBenjamin Coenen2020-04-171-5/+1
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * feat: improve dot completions in a struct literal expressionBenjamin Coenen2020-04-151-0/+10
| | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * Merge branch 'master' of github.com:rust-analyzer/rust-analyzerBenjamin Coenen2020-04-141-3/+9
| |\
| * \ Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-111-6/+7
| |\ \ | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
| * | | Improve autocompletion by looking on the type and nameBenjamin Coenen2020-04-111-3/+11
| | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]>
* | | | Add utility fn for expected type of a nodenathanwhit2020-04-221-1/+12
| |_|/ |/| | | | | | | | | | | Adds `expected_type_of` to `CompletionContext` to return the expected type of a node, if it is known.
* | | Align grammar for record patterns and literalsAleksey Kladov2020-04-111-3/+9
| |/ |/| | | | | | | | | The grammar now looks like this [name_ref :] pat
* | Make records grammar more orthogonalAleksey Kladov2020-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We used name [: expr] grammar before, now it is [name :] expr which makes things simpler
* | Simpler acessors for keywordsAleksey Kladov2020-04-091-2/+2
| |
* | Be consistent about token accesorsAleksey Kladov2020-04-091-1/+4
|/
* Don't insert !() if there's already someAleksey Kladov2020-04-071-0/+4
|
* Remove the second code-path for completing names in patternsAleksey Kladov2020-04-031-17/+14
|
* Better names for config structsAleksey Kladov2020-03-311-4/+4
|
* Remove constSteffen Lyngbaek2020-03-191-5/+5
| | | | | - Add test for @ matching - Address comments
* Fixes to more accurately give complete_scope completionsSteffen Lyngbaek2020-03-191-3/+5
| | | | | | | - Exclude const, static, functions form is_pat_binding_and_path (there might be more?) - Add a check to filter out Record Fields - Fix tests
* - Exclude Local Scope for BindPatsSteffen Lyngbaek2020-03-191-7/+4
| | | | | - Exclude BindPats with @ or ref - Remove outdated test and add one testing for ref
* Completition for type name? #3418Steffen Lyngbaek2020-03-191-2/+14
| | | | | | | | Iterate through TupleStructPat's until a MatchArm if one exists. Store in a new is_pat_bind_and_path bool and allow the `complete_scope` to find matches. Added some tests to ensure it works in simple and nested cases.
* Get tests workingFlorian Diebold2020-03-161-1/+1
|
* Introduce CompletionOptionsAleksey Kladov2020-03-101-1/+4
|
* Move hypothetical expansion to hir_expandFlorian Diebold2020-03-081-1/+5
|
* Fix CompletionContext module field (by removing it)Florian Diebold2020-03-071-5/+3
| | | | | Two uses only needed the crate; one was wrong and should use the module from the scope instead.
* Add some sanity checksFlorian Diebold2020-03-071-1/+10
|
* Fix record pattern completionFlorian Diebold2020-03-071-1/+1
|
* Fix record literal completionFlorian Diebold2020-03-071-3/+8
|
* Try to complete within macrosFlorian Diebold2020-03-071-25/+62
|
* Rename ast::ImplBlock -> ast::ImplDefAleksey Kladov2020-02-291-4/+4
|
* Refactor primary IDE APIAleksey Kladov2020-02-261-27/+38
| | | | | | | | | | This introduces the new type -- Semantics. Semantics maps SyntaxNodes to various semantic info, such as type, name resolution or macro expansions. To do so, Semantics maintains a HashMap which maps every node it saw to the file from which the node originated. This is enough to get all the necessary hir bits just from syntax.
* Merge branch 'master' into kdelorey/complete-trait-implKevin DeLorey2020-02-091-3/+4
|\
| * cleanup importsAleksey Kladov2020-02-061-3/+4
| |
* | Got the magic completion working.Kevin DeLorey2020-02-081-0/+9
|/
* Create modules via SourceBinderAleksey Kladov2020-01-161-7/+3
|
* Remove imports from hirAleksey Kladov2019-12-211-0/+4
|
* Revert "Merge #2629"Aleksey Kladov2019-12-211-4/+0
| | | | | This reverts commit cdc9d682b066b110e0a44e5f8f1c574b38c16ba9, reversing changes made to 90ef070db3dce0a7acb9cd11d0b0d72de13c9d79.
* Remove hir for importsAleksey Kladov2019-12-211-0/+4
|
* Clippy lintskjeremy2019-12-201-9/+8
|
* Use different types for path with and without genericsAleksey Kladov2019-12-141-4/+3
|
* Rename Source -> InFileAleksey Kladov2019-11-281-2/+2
|
* rename ra_ide_api -> ra_ideAleksey Kladov2019-11-271-0/+274