aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/completion
Commit message (Collapse)AuthorAgeFilesLines
* Skip self param when completing methodsAleksey Kladov2020-03-041-13/+45
|
* Support function's completion snippetAvishay Matayev2020-03-042-14/+22
| | | | | | | Note that `detail` was replced with `function_signature` to avoid calling `from` on FunctionSignature twice. I didn't add new tests because the current ones seem enough.
* Fix completion snippet for reexported functionsFlorian Diebold2020-03-032-4/+54
| | | | Fixes #3356.
* Merge #3384bors[bot]2020-03-011-0/+39
|\ | | | | | | | | | | | | | | | | | | | | | | 3384: fix #2377 super::super::* r=flodiebold a=JoshMcguigan Thanks @matklad for the detailed explanation on #2377. I believe this fixes it. One thing I'm not sure about is you said the fix would involve changing `crates/ra_hir_def/src/path/lower/lower.rs`, but I only changed `crates/ra_hir_def/src/path/lower/lower_use.rs`. I'm not sure what kind of test code I'd have to write to expose the issue in `lower.rs`, but I'd be happy to add it if you are able to provide additional guidance. closes #2377 Co-authored-by: Josh Mcguigan <[email protected]>
| * fix completion for super::super::Josh Mcguigan2020-03-011-0/+39
| |
* | Rename ast::ImplBlock -> ast::ImplDefAleksey Kladov2020-02-292-32/+26
|/
* Refactor primary IDE APIAleksey Kladov2020-02-2610-60/+66
| | | | | | | | | | 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.
* Refactor how builtins are resolvedFlorian Diebold2020-02-211-6/+7
| | | | This fixes autocompletion suggesting e.g. self::usize.
* CleanupShotaro Yamada2020-02-191-5/+1
|
* More manual clippy fixesKirill Bulatov2020-02-182-6/+6
|
* Merge #3169bors[bot]2020-02-171-6/+95
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3169: Show record field names in Enum completion r=flodiebold a=adamrk Adresses https://github.com/rust-analyzer/rust-analyzer/issues/2947. Previously the details shown when autocompleting an Enum variant would look like the variant was a tuple even if it was a record: ![2020-02-16-15:59:32_crop](https://user-images.githubusercontent.com/16367467/74607233-64f21980-50d7-11ea-99db-e973e29c71d7.png) This change will show the names of the fields for a record and use curly braces instead of parentheses: ![2020-02-16-15:33:00_crop](https://user-images.githubusercontent.com/16367467/74607251-8ce17d00-50d7-11ea-9d4d-38d198a4aec0.png) This required exposing the type `adt::StructKind` from `ra_hir` and adding a function ``` kind(self, db: &impl HirDatabase) -> StructKind ``` in the `impl` of `EnumVariant`. There was also a previously existing function `is_unit(self, db: &impl HirDatabase) -> bool` for `EnumVariant` which I removed because it seemed redundant after adding `kind`. Co-authored-by: adamrk <[email protected]>
| * add space before/after wrapping bracesadamrk2020-02-161-2/+2
| |
| * show names for record fields in enum completionadamrk2020-02-161-6/+95
| |
* | Added module doc comment to explain the purpose of the completion.Kevin DeLorey2020-02-151-1/+32
| |
* | Fixed bug that allowed for completion in a nested method.Kevin DeLorey2020-02-151-7/+36
| |
* | Reordered the `use` items.Kevin DeLorey2020-02-151-9/+8
| |
* | Adjusted the completion lookups to filter by just the name.Kevin DeLorey2020-02-141-29/+44
| |
* | Completion now replaces whole fn/const/type def with snippet.Kevin DeLorey2020-02-131-16/+31
| |
* | Cheese const tests as they requre an ident before becoming a CONST_DEF.Kevin DeLorey2020-02-131-28/+21
| |
* | Started to refactor the trigger of the trait_impl completion.Kevin DeLorey2020-02-131-33/+77
| |
* | Formatting.Kevin DeLorey2020-02-111-1/+3
| |
* | Fixing minor suggestions and added module level documentation.Kevin DeLorey2020-02-111-9/+6
| |
* | Removed doc comments entirely from the changes.Kevin DeLorey2020-02-111-39/+0
| |
* | Formatted changes.Kevin DeLorey2020-02-111-22/+16
| |
* | Removed docs from private method.Kevin DeLorey2020-02-111-8/+0
| |
* | Added tests to test associated types and consts.Kevin DeLorey2020-02-111-0/+78
| |
* | Added some documentation to the `complete_trait_impl` completion.Kevin DeLorey2020-02-111-1/+48
| |
* | Added associated const magic completion.Kevin DeLorey2020-02-101-11/+53
| |
* | Added a utility function that can be used to determine the missing impl items.Kevin DeLorey2020-02-091-114/+18
| |
* | Merge branch 'master' into kdelorey/complete-trait-implKevin DeLorey2020-02-093-118/+8
|\|
| * Remove hard-coded auto-import during completionAleksey Kladov2020-02-091-128/+3
| | | | | | | | We now have a real auto-import system, so we can do a proper thing.
| * Rename add import assistKirill Bulatov2020-02-071-7/+2
| |
| * cleanup importsAleksey Kladov2020-02-061-3/+4
| |
| * Code review fixesKirill Bulatov2020-02-021-15/+11
| |
| * Require ModPath for importingKirill Bulatov2020-02-021-24/+47
| |
* | Added associated type completion.Kevin DeLorey2020-02-081-3/+15
| |
* | Cleaning up unessicary code that the Magic completion takes care of.Kevin DeLorey2020-02-081-39/+8
| |
* | Got the magic completion working.Kevin DeLorey2020-02-082-41/+16
| |
* | Update completion kind to Magic in the unit tests.Kevin DeLorey2020-02-081-2/+2
| |
* | Add detection for a user already starting a fn impl and still providing ↵Kevin DeLorey2020-02-052-38/+157
| | | | | | | | completion.
* | Already implemented fn will no longer be suggested for trait implementations.Kevin DeLorey2020-01-292-17/+131
| |
* | Renamed the trait completion mod.Kevin DeLorey2020-01-231-1/+1
| |
* | Added basic support for completing `fn` for trait impl.Kevin DeLorey2020-01-232-0/+113
|/
* Create modules via SourceBinderAleksey Kladov2020-01-161-7/+3
|
* Move Type API to typeAleksey Kladov2020-01-142-19/+24
|
* Move impls_future to Type, where it belongsAleksey Kladov2020-01-141-1/+1
|
* Use lang-items to resolve future traitAleksey Kladov2020-01-141-0/+1
|
* Some clippy lintskjeremy2020-01-131-1/+1
|
* Add macro_rules item snippetmemoryruins2020-01-121-0/+8
|
* visible_from -> is_visible_fromFlorian Diebold2019-12-271-1/+1
|