about summary refs log tree commit diff
path: root/crates/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2021-06-13Give ImportPrefix variants better config namesLukas Wirth-4/+6
2021-06-13internal: diagnostic code is mandatoryAleksey Kladov-6/+5
2021-06-13clippy::useless_returnMaan2003-3/+3
2021-06-13clippy::redundant_closureMaan2003-1/+1
2021-06-13clippy::redudant_borrowMaan2003-26/+26
2021-06-11Only prefill caches in the completion benchmarkKirill Bulatov-5/+21
2021-06-11Fix visibility issuesKirill Bulatov-5/+5
2021-06-11Prime caches on workspace loadKirill Bulatov-2/+3
2021-06-07Fix incorrect config usage in hover referencesLukas Wirth-1/+1
2021-06-05Enable proc macros and build scripts by default in CLILaurențiu Nicola-19/+19
2021-06-05Enable attribute macro expansion in `analysis-stats`Florian Diebold-0/+3
Before: ``` > $ rust-analyzer -q analysis-stats --with-proc-macro --load-output-dirs . Database loaded: 19.08s, 277minstr crates: 34, mods: 688, decls: 13202, fns: 10412 Item Collection: 16.21s, 76ginstr exprs: 290580, ??ty: 2508 (0%), ?ty: 1814 (0%), !ty: 947 Inference: 27.46s, 108ginstr Total: 43.67s, 184ginstr ``` After: ``` > $ ./target/release/rust-analyzer -q analysis-stats --with-proc-macro --load-output-dirs . Database loaded: 1.09s, 277minstr crates: 34, mods: 688, decls: 14790, fns: 11006 Item Collection: 18.20s, 78ginstr exprs: 297826, ??ty: 493 (0%), ?ty: 558 (0%), !ty: 342 Inference: 28.34s, 111ginstr Total: 46.54s, 190ginstr ```
2021-06-04Add function references hover actionLukas Wirth-0/+35
2021-06-03Make it opt-inJonas Schievink-3/+18
2021-06-03NFC: remove redundant clones (clippy::perf)Matthias Krüger-1/+1
2021-06-02Document that `addCallArgumentSnippets` requires `addCallParenthesisLukas Wirth-0/+1
2021-05-31Merge #9039bors[bot]-0/+7
9039: feat: Complete fields and methods with `self.` prefixed when inside methods r=matklad a=Veykril ![w65NbjkZiG](https://user-images.githubusercontent.com/3757771/119984385-a0111700-bfc1-11eb-9dbf-52fdaa4d72b5.gif) Closes #7173 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-31Add config setting for self-on-the-flyLukas Wirth-0/+7
2021-05-31Merge #8866bors[bot]-12/+12
8866: Update salsa r=matklad a=jonas-schievink This updates salsa to include https://github.com/salsa-rs/salsa/pull/265, and removes all cancellation-related code from rust-analyzer Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2021-05-31Merge #9025bors[bot]-34/+53
9025: internal: Display unknown types in `analysis-stats` r=flodiebold a=lnicola Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2021-05-29Fix incorrect setting descriptionsLucas Schwiderski-5/+5
Descriptions for diagnostic warning hint and info display were swapped. Fixes #8485. Signed-off-by: Lucas Schwiderski <lucas@lschwiderski.de>
2021-05-28Merge #9028bors[bot]-51/+47
9028: only advertise range formatting support if enabled r=Veykril a=euclio Fixes #9009. Co-authored-by: Andy Russell <arussell123@gmail.com>
2021-05-28Merge #9038bors[bot]-0/+1
9038: Folding range for return types r=Veykril a=MozarellaMan For issue #8957 ![return type fold](https://user-images.githubusercontent.com/48062697/119979082-5c62e100-bfb2-11eb-9729-1dea1ce74de1.gif) Co-authored-by: Ayomide Bamidele <48062697+MozarellaMan@users.noreply.github.com>
2021-05-28Folding range for return typesAyomide Bamidele-0/+1
2021-05-28Remove undocumented `TextDocumentSyncKind::Full` supportLaurențiu Nicola-7/+1
2021-05-27only advertise range formatting support if enabledAndy Russell-51/+47
2021-05-27Display unknown types in analysis-statsLaurențiu Nicola-34/+53
2021-05-27Update salsaJonas Schievink-12/+12
2021-05-26Document semantic token tagsLukas Wirth-2/+2
2021-05-25Check for subdirs in vfs loader exclusions.ammkrn-1/+5
The current logic used to transfer global_excludes into vfs exclusions only transfers global_excludes that are the parent of an item in dirs.include. This commit additionally adds an item from global_exclude to the vfs exclusions if the global_exclude is a child of an included item.
2021-05-25Merge #8767bors[bot]-102/+155
8767: implement range formatting r=matklad a=euclio Fixes #7580. This PR implements the `textDocument/rangeFormatting` request using `rustfmt`'s `--file-lines` option. Still needs some tests. What I want to know is how I should handle the instability of the `--file-lines` option. It's still unstable in rustfmt, so it's only available on nightly, and needs a special flag to enable. Is there a way for `rust-analyzer` to detect if it's using nightly rustfmt, or for users to opt-in? Co-authored-by: Andy Russell <arussell123@gmail.com>
2021-05-25Merge #8942bors[bot]-0/+2
8942: Add `library` semantic token modifier to items from other crates r=arzg a=arzg Closes #5772. A lot of code here is pretty repetitive; please let me know if you have any ideas how to improve it, or whether it’s fine as-is. Side-note: How can I add tests for this? I don’t see a way for the test Rust code in `test_highlighting` to reference other crates to observe the new behaviour. Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
2021-05-24Update test fixturesLaurențiu Nicola-0/+56
2021-05-24Bump misc depsLaurențiu Nicola-1/+1
2021-05-24Rename ‘foreign’ semantic token modifier to ‘library’Aramis Razzaghipour-2/+2
2021-05-24Add highlighting of items from other cratesAramis Razzaghipour-0/+2
2021-05-24Don't discover workspaces when detached files are givenKirill Bulatov-3/+2
2021-05-23Do not add cargo target for detached files only projectKirill Bulatov-13/+22
2021-05-23implement range formattingAndy Russell-102/+155
2021-05-23Drag detached files towards loadingKirill Bulatov-5/+11
2021-05-23Draft detached files retrievalKirill Bulatov-3/+21
2021-05-21Add a "Debug ItemTree" LSP requestJonas Schievink-0/+25
2021-05-20Fix code completion not inserting borrow text when client supports ↵Lukas Tobias Wirth-3/+6
InsertAndReplace
2021-05-20Merge #8873bors[bot]-20/+42
8873: Implement import-granularity guessing r=matklad a=Veykril This renames our `MergeBehavior` to `ImportGranularity` as rustfmt has it as the purpose of them are basically the same. `ImportGranularity::Preserve` currently has no specific purpose for us as we don't have an organize imports assist yet, so it currently acts the same as `ImportGranularity::Item`. We now try to guess the import style on a per file basis and fall back to the user granularity setting if the file has no specific style yet or where it is ambiguous. This can be turned off by setting `import.enforceGranularity` to `true`. Closes https://github.com/rust-analyzer/rust-analyzer/issues/8870 Co-authored-by: Lukas Tobias Wirth <lukastw97@gmail.com>
2021-05-19Replace ImportGranularity::Guess with guessing boolean flagLukas Tobias Wirth-7/+21
2021-05-19feat: allow clients to feature detect symbol filteringAleksey Kladov-0/+1
2021-05-18Add ImportGranularity::GuessLukas Tobias Wirth-2/+4
2021-05-18MergeBehavior -> ImportGranularityLukas Tobias Wirth-16/+22
2021-05-18Add new LSP extension for workspace symbol lookupalcroito-7/+148
The new extension allows filtering of workspace symbool lookup results by search scope or search kind. Filtering can be configured in 3 different ways: - The '#' or '*' markers can be added inline with the symbol lookup query. The '#' marker means symbols should be looked up in the current workspace and any dependencies. If not specified, only current workspace is considered. The '*' marker means all kinds of symbols should be looked up (types, functions, etc). If not specified, only type symbols are returned. - Each LSP request can take an optional search_scope or search_kind argument query parameter. - Finally there are 2 global config options that can be set for all requests served by the active RA instance. Add support for setting the global config options to the VSCode extension. The extension does not use the per-request way, but it's useful for other IDEs. The latest version of VSCode filters out the inline markers, so currently the only reasonable way to use the new functionality is via the global config.
2021-05-17internal: use more evocative test folder nameAleksey Kladov-5/+4
2021-05-17minor: adjust config nameAleksey Kladov-56/+22