aboutsummaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | Fix typo, parentheses is pluralLaurențiu Nicola2021-01-1010-135/+135
| |/ / / / / /
* / / / / / / Use T! for bool keywordsLaurențiu Nicola2021-01-101-1/+1
|/ / / / / /
* | | | | | Merge #7236bors[bot]2021-01-105-12/+57
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7236: Fix progress token is already registered crash r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | Fix progress token is already registered crashAleksey Kladov2021-01-105-12/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After we started reporting progress when running cargo check during loading, it is possible to crash the client with two identical progress tokens. This points to a deeper issue: we might be running several cargo checks concurrently, which doesn't make sense. This commit linearizes all workspace fetches, making sure no updates are lost. As an additional touch, it also normalizes progress & result reporting, to make sure they stand in sync.
* | | | | | Allow `true` and `false` keywords in const genericsCallym2021-01-103-11/+25
|/ / / / /
* | | | | Merge #6238bors[bot]2021-01-1014-307/+368
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6238: Split punctuation semantic highlighting up into more tags r=matklad a=Veykril Open question would be the name of the delimiter modifiers. I chose them this was as I see them this way but from what I remember people tend to mix the names however they like. So maybe using `delimSquare`, `delimCurly`, `delimRound` would be better. That would also go well with `angle` becoming `delimAngle`? Closes #6152 Co-authored-by: Lukas Wirth <[email protected]>
| * | | | | Split punctuation semantic highlighting up into more tagsLukas Wirth2021-01-1014-307/+368
| | | | | |
| | | | | |
| \ \ \ \ \
*-. \ \ \ \ \ Merge #7206 #7231bors[bot]2021-01-1012-51/+75
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7206: Use hir::GenericParam in ide_db::Definition instead of relisting all 3 r=Veykril a=Veykril Basically just this: ```diff pub enum Definition { Macro(MacroDef), Field(Field), ModuleDef(ModuleDef), SelfType(Impl), Local(Local), - TypeParam(TypeParam), - LifetimeParam(LifetimeParam), - ConstParam(ConstParam), + GenericParam(GenericParam), Label(Label), } ``` 7231: Cleaner API r=matklad a=matklad bors r+ 🤖 Co-authored-by: Lukas Wirth <[email protected]> Co-authored-by: Aleksey Kladov <[email protected]>
| | * | | | | | Cleaner APIAleksey Kladov2021-01-103-9/+10
| | | | | | | |
| * | | | | | | Use hir::GenericParam in ide_db::Definition instead of relisting all 3Lukas Wirth2021-01-109-42/+65
| | |/ / / / / | |/| | | | |
* | | | | | | Merge #7228bors[bot]2021-01-101-6/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7228: Avoid string copy in complete_attribute r=Veykril a=lnicola Co-authored-by: Laurențiu Nicola <[email protected]>
| * | | | | | | Avoid string copy in complete_attributeLaurențiu Nicola2021-01-101-6/+8
| |/ / / / / /
* | | | | | | Merge #7229bors[bot]2021-01-102-37/+42
|\ \ \ \ \ \ \ | |/ / / / / / |/| / / / / / | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7229: Cleanup r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | | | | CleanupAleksey Kladov2021-01-102-37/+42
| | | | | |
* | | | | | Merge #6980bors[bot]2021-01-102-5/+111
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6980: Implement to support intra-doc link r=matklad a=sasurau4 Helps with #6168 This PR is very limited implementation to support intra-doc. It only support links indicate same file function. I want someone to feedback me about this implementation. If the approach is good, I will continue this PR to support other symbols like enum and struct. Co-authored-by: Daiki Ihara <[email protected]>
| * | | | | | Support intra_doc linksDaiki Ihara2021-01-082-5/+111
| | |_|/ / / | |/| | | |
* | | | | | Merge #7224bors[bot]2021-01-101-7/+19
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7224: Remove unnecessary allocation when checking whether to hide argument name hint r=jhpratt a=jhpratt The case-insensitive prefix/suffix check can be performed character-by-character. This allows the check to be done without having to allocate a new string. As a side effect, it's also no longer necessary to convert the entire string to lowercase, as it's done as needed. As the only case equality we're handling is ASCII, this operation can be further optimized by using byte equality, rather than character equality. cc @SomeoneToIgnore, as it's an update on my PR from yesterday. Co-authored-by: Jacob Pratt <[email protected]>
| * | | | | Skip leading underscores unconditionallyJacob Pratt2021-01-101-2/+5
| | | | | |
| * | | | | Short-circuit boolean operationJacob Pratt2021-01-101-4/+8
| | | | | |
| * | | | | Remove unnecessary allocationJacob Pratt2021-01-101-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The case-insensitive prefix/suffix check can be performed character-by-character. This allows the check to be done without having to allocate a new string. As a side effect, it's also no longer necessary to convert the entire string to lowercase, as it's done as needed. As the only case equality we're handling is ASCII, this operation can be further optimized by using byte equality, rather than character equality.
* | | | | | Replace state with functionAleksey Kladov2021-01-102-68/+54
|/ / / / /
* | | | | Refactor highlightingAleksey Kladov2021-01-093-528/+551
| | | | |
* | | | | SimplifyAleksey Kladov2021-01-092-86/+52
| |/ / / |/| | |
* | | | Better highlight for fixturesAleksey Kladov2021-01-092-2/+6
| | | |
* | | | SimplifyAleksey Kladov2021-01-092-52/+28
| | | |
* | | | Better namesAleksey Kladov2021-01-093-23/+24
| | | |
* | | | Reduce duplicationAleksey Kladov2021-01-091-7/+5
| | | |
* | | | Shorten namesAleksey Kladov2021-01-097-67/+50
| | | |
* | | | Reorder modulesAleksey Kladov2021-01-091-2/+4
| | | |
* | | | Shorten frequent namesAleksey Kladov2021-01-098-246/+222
| | | |
* | | | Rename dummy -> noneAleksey Kladov2021-01-094-16/+16
| | | |
* | | | Hide argument name hint regardless of caseJacob Pratt2021-01-091-3/+10
| | | |
* | | | Merge #7213bors[bot]2021-01-081-22/+8
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7213: Simplify r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
| * | | | SimplifyLukas Wirth2021-01-081-22/+8
| |/ / /
* | | | Merge #7212bors[bot]2021-01-0811-276/+287
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | 7212: Simplify highlighting r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Simplify highlighting infraAleksey Kladov2021-01-0811-276/+287
| | | | | | | | | | | | | | | | This also fixes the killer whale bug
* | | | Add testEdwin Cheng2021-01-081-0/+13
| | | |
* | | | Fix bug when $crate in LHS in mbeEdwin Cheng2021-01-082-5/+8
| | | |
* | | | Merge #7145bors[bot]2021-01-089-58/+235
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7145: Proper handling $crate Take 2 [DO NOT MERGE] r=edwin0cheng a=edwin0cheng Similar to previous PR (#7133) , but improved the following things : 1. Instead of storing the whole `ExpansionInfo`, we store a similar but stripped version `HygieneInfo`. 2. Instread of storing the `SyntaxNode` (because every token we are interested are IDENT), we store the `TextRange` only. 3. Because of 2, we now can put it in Salsa. 4. And most important improvement: Instead of computing the whole frames every single time, we compute it recursively through salsa: (Such that in the best scenario, we only need to compute the first layer of frame) ```rust let def_site = db.hygiene_frame(info.def.file_id); let call_site = db.hygiene_frame(info.arg.file_id); HygieneFrame { expansion: Some(info), local_inner, krate, call_site, def_site } ``` The overall speed compared to previous PR is much faster (65s vs 45s) : ``` [WITH old PR] Database loaded 644.86ms, 284mi Crates in this dir: 36 Total modules found: 576 Total declarations: 11153 Total functions: 8715 Item Collection: 15.78s, 91562mi Total expressions: 240721 Expressions of unknown type: 2635 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 865 Inference: 49.84s, 250747mi Total: 65.62s, 342310mi rust-analyzer -q analysis-stats . 66.72s user 0.57s system 99% cpu 1:07.40 total [WITH this PR] Database loaded 665.83ms, 284mi Crates in this dir: 36 Total modules found: 577 Total declarations: 11188 Total functions: 8743 Item Collection: 15.28s, 84919mi Total expressions: 241229 Expressions of unknown type: 2637 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 868 Inference: 30.15s, 135293mi Total: 45.43s, 220213mi rust-analyzer -q analysis-stats . 46.26s user 0.74s system 99% cpu 47.294 total ``` *HOWEVER*, it is still a perf regression (35s vs 45s): ``` [WITHOUT this PR] Database loaded 657.42ms, 284mi Crates in this dir: 36 Total modules found: 577 Total declarations: 11177 Total functions: 8735 Item Collection: 12.87s, 72407mi Total expressions: 239380 Expressions of unknown type: 2643 (1%) Expressions of partially unknown type: 2064 (0%) Type mismatches: 868 Inference: 22.88s, 97889mi Total: 35.74s, 170297mi rust-analyzer -q analysis-stats . 36.71s user 0.63s system 99% cpu 37.498 total ``` Co-authored-by: Edwin Cheng <[email protected]>
| * | | | Proper handling $crate Take 2Edwin Cheng2021-01-079-58/+235
| | | | |
* | | | | Simplify mod completionLukas Wirth2021-01-071-38/+31
| | | | |
* | | | | Tidy up attribute completion matchLukas Wirth2021-01-071-19/+11
| | | | |
* | | | | Switch test markerPhil Ellison2021-01-071-1/+1
| | | | |
* | | | | cargo fmtPhil Ellison2021-01-072-7/+11
| | | | |
* | | | | Add fix to wrap return expression in SomePhil Ellison2021-01-077-21/+87
| |/ / / |/| | |
* | | | Merge #7193bors[bot]2021-01-078-41/+101
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7193: Show progress for fetching workspace (cargo-metadata and loadOutDirsFromCheck) r=matklad a=edwin0cheng ![Peek 2021-01-07 21-57](https://user-images.githubusercontent.com/11014119/103902132-0db4c780-5135-11eb-94d3-32429445be87.gif) Fixes #7188 Fixes #3300 Co-authored-by: Edwin Cheng <[email protected]>
| * | | | Report progress for cargo metadata and output-dirEdwin Cheng2021-01-075-18/+77
| | | | |
| * | | | Refactor out JodChildEdwin Cheng2021-01-073-23/+24
| | | | |
* | | | | Merge #7191bors[bot]2021-01-071-24/+27
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7191: Adjust vfs crate documentation r=matklad a=arnaudgolfouse This removes an outdated comment, and uses intra-doc links Co-authored-by: Arnaud <[email protected]>
| * | | | | Use `file_set::FileSet` and `FileSet` consistently in docArnaud2021-01-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first occurrence of `FileSet` has the full path (`file_set::FileSet`), while every other is simply `FileSet`.