aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/display
Commit message (Collapse)AuthorAgeFilesLines
* internal: more natural order of sources for TypeParamAleksey Kladov2021-06-141-3/+3
| | | | | We usually use first (left) variant of `Either` for "usual" case, and use right for odd things. For example, pat source is Pat | SelfParam.
* Add more docsAleksey Kladov2021-05-221-1/+1
|
* Check more carefully for cases where a rename can't be doneDanny Zhu2021-04-251-5/+3
| | | | | | | | | | | Attempting to rename an element of a tuple field would previously replace the type with the new name, which doesn't make sense; now it fails instead. The check is done in both `prepare_rename` and `rename` so that the case is caught before the user is prompted for a new name. Some other existing failure cases are also now additionally checked in `prepare_rename`.
* Store an `AstId` for procedural macrosJonas Schievink2021-03-181-2/+6
|
* Remove ShortLabelLukas Wirth2021-03-162-143/+15
|
* Clean usage of ShortLabeloxalica2021-03-151-6/+8
|
* Don't show const items initializer expressions on hoverLukas Wirth2021-03-091-5/+1
|
* More precise navigation to parentAleksey Kladov2021-02-091-4/+8
|
* Show alias underlying typelumenian2021-02-021-1/+5
|
* Shorten hir::TypeParam full_range in NavigationTargetLukas Wirth2021-01-261-4/+7
|
* Support unions in symbol searchLukas Wirth2021-01-241-0/+1
|
* Merge #7353bors[bot]2021-01-221-24/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7353: Add LifetimeParam and ConstParam to CompletionItemKind r=matklad a=Veykril Adds `LifetimeParam` and `ConstParam` to `CompletionItemKind` and maps them both to `TypeParam` in the protocol conversion as there are no equivalents, so nothing really changes there. `ConstParam` could be mapped to `Const` I guess but I'm split on whether that would be better? Additions were solely inspired by (the single) test output for const params. Also sorts the variants of `CompletionItemKind` and its to_proto match. Co-authored-by: Lukas Wirth <[email protected]>
| * Move SymbolKind to ide_dbLukas Wirth2021-01-201-24/+1
| |
* | Treat BlockExpr as a potential module originJonas Schievink2021-01-202-0/+7
| |
* | .Aleksey Kladov2021-01-192-4/+3
|/
* Wrap remaining self/super/crate in Name{Ref}Lukas Wirth2021-01-151-8/+6
|
* Handle self/super/crate in PathSegment as NameRefLukas Wirth2021-01-151-7/+16
|
* Use hir::GenericParam in ide_db::Definition instead of relisting all 3Lukas Wirth2021-01-101-3/+11
|
* Implement hover for ConstParamLukas Wirth2021-01-041-0/+11
|
* Fix ConstParam HasSource impl and implement TryToNav not NavNick Spain2021-01-021-6/+6
|
* Move impls of ToNav that use source() to TryToNavNick Spain2021-01-021-55/+50
|
* HasSource::source_old -> HasSource::source for places where proc-macros were ↵Nick Spain2021-01-021-14/+5
| | | | | | | | | | | | special cased In #6901 some special case handling for proc-macros was introduced to prevent panicing as they have no AST. Now the new HasSource::source method is used that returns an option. Generally this was a pretty trivial change, the only thing of much interest is that `hir::MacroDef` now implements `TryToNav` not `ToNav` as this allows us to handle `HasSource::source` now returning an option.
* Mark HasSource::source_old as deprecated but allow at all call sitesNick Spain2021-01-021-0/+6
|
* HasSource::source -> HasSource::source_oldNick Spain2021-01-021-6/+6
| | | | To start migrating HasSource::source to return an Option.
* Add ConstParams to the ide layerLukas Wirth2021-01-011-0/+19
|
* Support labels in reference searchLukas Wirth2020-12-241-1/+24
|
* Align code_model name with ungrammarAleksey Kladov2020-12-201-2/+2
|
* Deduplicate highlight tags and symbol kindsAleksey Kladov2020-12-181-2/+4
| | | | | | | Curiously, LSP uses different enums for those, and unsurprising and annoyingly, there are things which exist in one but not in the other. Let's not repeat the mistake and unify the two things
* Reduce test verbosityAleksey Kladov2020-12-181-25/+28
|
* NavTarget doesn't assume that it points to a symbolAleksey Kladov2020-12-181-13/+20
|
* Don't expose SyntaxKind from IDE APIAleksey Kladov2020-12-181-38/+94
| | | | | | SyntaxKind is somewhat of an internal type, but IDE is using it to basically specify an icon. Let's have a dedicated entity for this instead.
* Merge #6901bors[bot]2020-12-181-1/+9
|\ | | | | | | | | | | | | | | | | | | 6901: Temp fixes panic caused by no ast for proc-macro r=maklad a=edwin0cheng There are some panic when hover/goto definition for proc-macro. It is because in current design, we don't have `ast-node` for proc-macro and then it trigger [this](https://github.com/rust-analyzer/rust-analyzer/blob/479d1f7eec22c3564867223e2093f14774092528/crates/hir/src/has_source.rs#L116) line to panic. This PR is a temp fix for all of these similar to https://github.com/rust-analyzer/rust-analyzer/blob/bd4c352831662762ee7a66da77ec9adf623b0a0a/crates/completion/src/render/macro_.rs#L42 Co-authored-by: Edwin Cheng <[email protected]>
| * Temp fixes panic caused by no ast for proc-macroEdwin Cheng2020-12-181-1/+9
| |
* | Rewrite doctest runnablesAleksey Kladov2020-12-171-19/+0
| | | | | | | | Handle more cases in a generic way without copy-pasting code.
* | Make `Attrs::from_attrs_owner` privateJonas Schievink2020-12-171-28/+2
| |
* | Rename ImplDef -> ImplAleksey Kladov2020-12-171-1/+1
| | | | | | | | | | | | We used to have `Def` suffix for all symbols, but we moved off from that. `FunctionDef` isn't better than `Function`. Looks like we've forgot to change `Impl` though!
* | Lifetime reference searchLukas Wirth2020-12-161-1/+19
|/
* Use Attrs::docs in NavigationTarget instead of DocCommentsOwnerLukas Wirth2020-12-111-24/+28
|
* Make `original_range` a method on `InFile<&SyntaxNode>`Jonas Schievink2020-12-081-11/+12
|
* Re-export base_db from ide_dbIgor Aleksanov2020-10-241-1/+1
|
* rename mock_analysis -> fixtureAleksey Kladov2020-10-021-3/+3
|
* Get rid of MockAnalysisAleksey Kladov2020-10-021-2/+2
|
* Switch to expect_test from crates.ioAleksey Kladov2020-08-211-1/+1
|
* Rename ra_ide -> ideAleksey Kladov2020-08-132-0/+602