aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Replace "No references" with "0 references".vsrs2020-09-291-2/+3
| | |
| * | Add testsvsrs2020-09-291-3/+77
| | |
| * | Do not show references CodeLens for tests.vsrs2020-09-293-14/+26
| | |
| * | Make method references CodeLens lazy.vsrs2020-09-292-43/+56
| | |
| * | Make method references CodeLens off by default.vsrs2020-09-292-3/+3
| | |
| * | Add method references CodeLensvsrs2020-09-294-8/+74
|/ /
* | Merge #6080bors[bot]2020-09-295-13/+149
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6080: Add hover config `linksInHover` to suppress links r=flw-cn a=flw-cn This PR solves the problem of using RA under vim8. It should close #6014. Since vim8's popup-window doesn't capture focus, the URL given by RA is effectively useless. links are neither displayed correctly nor can they be clicked. This makes the hover window ugly and inefficient. I'm providing this patch so that people who share my confusion (which I'm almost certain vim8 users do) will have a way to remove links from markdown. I noticed that [gopls has an option](https://github.com/golang/tools/blob/master/gopls/doc/settings.md#linksinhover-bool) for a similar purpose. So I added an option `linksInHover` to enable this behavior. This is a bool value and defaults to `true` to keep the behavior consistent with the master version. But you can suppress the links in the hover text by setting it to `false`. The name of my option, `linksInHover`, is borrowed from gopls. Before applying this patch: <img width="1280" alt="image" src="https://user-images.githubusercontent.com/5546718/93285021-85698a00-f806-11ea-911d-e77fea4a47f0.png"> After applying this patch(with `"rust-analyzer.hoverActions.linksInHover": false,`): <img width="1280" alt="image" src="https://user-images.githubusercontent.com/5546718/94332256-2e359780-0006-11eb-9724-1aed14130d0d.png"> This is the full test cases: ``` fn main() { let args: Vec<String> = std::env::args().collect(); test(); println!("args: {:?}", args); } /// Test cases: /// case 1. bare URL: https://rust-lang.org/ /// case 2. inline URL with title: [foo](https://rust-lang.org/) /// case 3. code refrence: [`Result`] /// case 4. code refrence but miss footnote: [`String`] /// case 5. autolink: <http://rust-lang.org/> /// case 6. email address: <[email protected]> /// case 7. refrence: [bing][google] /// case 8. collapsed link: [bing][] /// case 9. shortcut link: [bing] /// case 10. inline without URL: [bing]() /// case 11. refrence: [foo][foo] /// case 12. refrence: [foo][bar] /// case 13. collapsed link: [foo][] /// case 14. shortcut link: [foo] /// case 15. inline without URL: [foo]() /// case 16. just escaped text: \[hello] /// case 17. inline link: [Foo](foo::Foo) /// /// [`Result`]: ../../std/result/enum.Result.html /// [^bing]: https://www.bing.com/ /// [^google]: https://www.google.com/ pub fn test() { println!("Hello"); } ``` screenshot: <img width="1278" alt="image" src="https://user-images.githubusercontent.com/5546718/94332055-45738580-0004-11eb-9153-707f508d0c4b.png"> Co-authored-by: flw <[email protected]>
| * | Add hover config `linksInHover` to suppress linksflw2020-09-295-13/+149
|/ /
* | Merge #6019bors[bot]2020-09-296-47/+61
|\ \ | |/ |/| | | | | | | | | | | 6019: Remove make::path_from_text r=matklad a=Veykril This removes the `make::path_from_text` function, which according to a note should've been private. I removed it since it didn't really serve a purpose as it was simply wrapping `make::ast_from_text`. Co-authored-by: Lukas Wirth <[email protected]>
| * Remove make::path_from_textLukas Wirth2020-09-166-47/+61
| |
* | Merge #6088bors[bot]2020-09-282-11/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 6088: Update chalk to 0.30.0 r=flodiebold a=nathanwhit Fixes #6078 and CI failures. Co-authored-by: Nathan Whitaker <[email protected]>
| * | Update chalk to 0.30.0Nathan Whitaker2020-09-282-11/+11
| | |
* | | Merge #6087bors[bot]2020-09-281-6/+7
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 6087: Microoptimize r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
| * | MicrooptimizeAleksey Kladov2020-09-281-6/+7
|/ /
* | Merge #6086bors[bot]2020-09-282-11/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | 6086: chalk 0.29.0 r=kjeremy a=kjeremy Co-authored-by: Jeremy Kolb <[email protected]>
| * | chalk 0.29.0Jeremy Kolb2020-09-282-11/+11
|/ /
* | Merge #6033bors[bot]2020-09-284-29/+201
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6033: Make name resolution resolve proc macros instead of relying purely on the build system r=matklad a=jonas-schievink This makes name resolution look at proc-macro declaration attributes like `#[proc_macro_derive]` and defines the right proc macro in the macro namespace, fixing unresolved custom derives like `thiserror::Error` (which can cause false positives, now that we emit diagnostics for unresolved imports). This works even when proc-macro support is turned off, in which case we fall back to a dummy expander that always returns an error. IMO this is the right way to handle at least the name resolution part of proc. macros, while the *expansion* itself should rely on the build system to build and provide the macro DLL. It does mean that they may go out of sync, but we can provide diagnostics if that happens (something like "could not find macro X in crate Y – ensure that all files of crate Y are saved"). I think it is valuable to be able to reason about proc macros even when we can't expand them, since proc macro expansion can break between Rust releases or users might not want to turn it on for performance reasons. It allows us to provide better diagnostics on any proc macro invocation we're not expanding (like a weak warning that informs the user that proc macro support is turned off, or that it has been disabled because the server crashed). Fixes https://github.com/rust-analyzer/rust-analyzer/issues/5763 Co-authored-by: Jonas Schievink <[email protected]>
| * | Add more comments about proc macro resolutionJonas Schievink2020-09-281-0/+20
| | |
| * | Simplify iterator chainJonas Schievink2020-09-281-5/+2
| | |
| * | Remove incorrect docsJonas Schievink2020-09-181-6/+0
| | |
| * | Reduce visibility of non-proc-macrosJonas Schievink2020-09-183-0/+85
| | | | | | | | | | | | | | | proc-macro crates only export proc-macros, but currently other items are also considered public (and show up in completion)
| * | Remove obsolete proc macro collection codeJonas Schievink2020-09-181-19/+0
| | | | | | | | | | | | The new attribute-based resolution takes care of this
| * | Use hir_def to resolve proc macrosJonas Schievink2020-09-183-16/+79
| | |
| * | Add testJonas Schievink2020-09-181-0/+32
| | |
* | | Merge #6085bors[bot]2020-09-281-0/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6085: Mark unresolved imports diagnostic as experimental r=jonas-schievink a=jonas-schievink It causes a lot of false positives for people. We collected all of the known ones during the last week. Co-authored-by: Jonas Schievink <[email protected]>
| * | | Mark unresolved imports diagnostic as experimentalJonas Schievink2020-09-281-0/+7
| | | |
* | | | Merge #6084bors[bot]2020-09-271-20/+25
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6084: Update deps r=kjeremy a=kjeremy cargo update Co-authored-by: Jeremy Kolb <[email protected]>
| * | | | Update depsJeremy Kolb2020-09-271-20/+25
|/ / / /
* | | | Merge #6027bors[bot]2020-09-274-21/+46
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6027: Spawn a flycheck instance per workspace r=matklad a=jonas-schievink Limitations: - All instances are restarted on every file change - There's only one configuration used for all of them Co-authored-by: Jonas Schievink <[email protected]>
| * | | | Spawn a flycheck instance per workspaceJonas Schievink2020-09-274-21/+46
|/ / / /
* | | | Merge #6073bors[bot]2020-09-255-55/+203
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6073: Dont unnecessarily unnest imports r=matklad a=Veykril Fixes #6071 This has the side effect that paths that refer to items inside of the current module get prefixed with `self`. Changing this behavior is unfortunately not straightforward should it be unwanted, though I don't see a problem with this as prefixing imports like this with `self` is what I do personally anyways 😅. You can see what I mean with this in one of the tests which had to be changed in `crates/ssr/src/tests.rs`. There is one test that i still have to look at though, ~~which I by accident pushed with `#[ignore]` on it~~, which is `different_crate_renamed`, for some reason this now doesn't use the crate alias. This also makes me believe that aliases in general will break with this. So maybe this is not as straight forwards as I'd hoped for, but I don't really know how aliases work here. Edit: The failing test should work now Co-authored-by: Lukas Wirth <[email protected]>
| * | | | Remove partial import test in insert_useLukas Wirth2020-09-251-10/+0
| | | | |
| * | | | Don't unnecessarily unnest imports for import insertionLukas Wirth2020-09-254-45/+203
| | | | |
* | | | | Merge #6076bors[bot]2020-09-253-13/+19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6076: Update chalk to 0.28.0 r=matklad a=vandenheuvel Co-authored-by: Bram van den Heuvel <[email protected]>
| * | | | | Update chalk to 0.28.0Bram van den Heuvel2020-09-253-13/+19
| | | | | |
* | | | | | Merge #6055bors[bot]2020-09-251-0/+5
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6055: Add ok postfix completion r=matklad a=mullr Wrapping values in `Ok(...)` is so pervasive that it seems reasonable for it to have its own postfix completion. Co-authored-by: Russell Mull <[email protected]>
| * | | | | Cargo fmtRussell Mull2020-09-221-9/+2
| | | | | |
| * | | | | Add ok postfix completionRussell Mull2020-09-221-0/+12
| | | | | |
* | | | | | Merge #6072bors[bot]2020-09-252-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6072: Cleanup unintended unresolved reference in syntax higlighting test r=matklad a=Nashenas88 Fixes the issue brought up here https://github.com/rust-analyzer/rust-analyzer/pull/5957#discussion_r486625707 cc @jonas-schievink Co-authored-by: Paul Daniel Faria <[email protected]>
| * | | | | | Cleanup unintended unresolved reference in syntax higlighting testPaul Daniel Faria2020-09-242-6/+6
| | |/ / / / | |/| | | |
* | | | | | Merge #6062bors[bot]2020-09-244-9/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6062: Bump smol_str from 0.1.16 to 0.1.17 r=matklad a=woshilapin When I built `rust-analyzer` today, I noticed the following warnings. ``` warning: use of deprecated item 'syntax::SmolStr::new_inline_from_ascii': Use `new_inline` instead --> crates/mbe/src/syntax_bridge.rs:639:30 | 639 | ... (SmolStr::new_inline_from_ascii(1, &[punct.char as u8]), punct.id) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: 1 warning emitted ``` So I thought it would be a nice small PR. Co-authored-by: Jean SIMARD <[email protected]>
| * | | | | | Bump smol_str from 0.1.16 to 0.1.17Jean SIMARD2020-09-244-9/+12
| | | | | | |
* | | | | | | Merge #6050bors[bot]2020-09-241-0/+1
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6050: VS Code + WSL: describe binary location r=matklad a=qnighy It looks like VS Code server chooses a different location for `globalStorage`. Co-authored-by: Masaki Hara <[email protected]>
| * | | | | | VS Code + WSL: describe binary locationMasaki Hara2020-09-211-0/+1
| | |/ / / / | |/| | | | | | | | | | It looks like VS Code server chooses a different location for `globalStorage`.
* | | | | | Merge #6056bors[bot]2020-09-241-0/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6056: Add dbgr postfix completion r=matklad a=lnicola Expanding to `dbg!(&e)`. Co-authored-by: LaurenÈ›iu Nicola <[email protected]>
| * | | | | | Add dbgr postfix completionLaurențiu Nicola2020-09-221-0/+12
| | | | | | |
* | | | | | | Merge #6061bors[bot]2020-09-244-19/+117
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6061: Allow to use a Github Auth token for fetching releases r=matklad a=Matthias247 This change allows to use a authorization token provided by Github in order to fetch metadata for a RA release. Using an authorization token prevents to get rate-limited in environments where lots of RA users use a shared client IP (e.g. behind a company NAT). The auth token is stored in `ExtensionContext.globalState`. As far as I could observe through testing with a local WSL2 environment that state is synced between an extension installed locally and a remote version. The change provides no explicit command to query for an auth token. However in case a download fails it will provide a retry option as well as an option to enter the auth token. This should be more discoverable for most users. Closes #3688 Co-authored-by: Matthias Einwag <[email protected]>
| * | | | | | Fix lintMatthias Einwag2020-09-231-1/+1
| | | | | | |
| * | | | | | Move unlink on download into download functionMatthias Einwag2020-09-232-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this is required by all callsites its easier to have it in the function itself.
| * | | | | | Remane functionMatthias Einwag2020-09-231-5/+5
| | | | | | |