about summary refs log tree commit diff
path: root/crates/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2021-10-12internal changes for mdbookhamidreza kalbasi-2/+2
2021-10-12Merge #10525bors[bot]-1/+1
10525: Regenerate lints and features r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-12Update tidy ignore pathLukas Wirth-1/+1
2021-10-11Only include targets of packages that are workspace membersBrendan Cully-0/+87
CargoWorkspace's package list includes packages that are path dependencies, even if those packages aren't actually members of the cargo workspace. As a result, rust-analyzer's runnable finder, which returns the target from the first workspace that has a matching package, may select the wrong working directory, causing runnables to fail, e.g., ``` error: package `root` cannot be tested because it requires dev-dependencies and is not a member of the workspace ``` To fix this, we filter out packages that aren't members of the workspace when searching for targets. Fixes #7764
2021-10-11Merge #10522bors[bot]-2/+2
10522: fix: make signature info response conform to spec r=lnicola a=muscar This addreses https://github.com/rust-analyzer/rust-analyzer/issues/10464. This patch picks up `lsp-types` 0.90.1, which serialises the `SignatureInformation` and `ParameterInformation` with the right casing. It also adds `activeSignature` field as part of the top-level signature response. It keeps `activeParameter` at the top-level for backwards compatibility. Co-authored-by: Alex Muscar <alex@muscar.eu>
2021-10-11fix: make signature info response conform to specAlex Muscar-2/+2
This addreses https://github.com/rust-analyzer/rust-analyzer/issues/10464. This patch picks up `lsp-types` 0.90.1, which serialises the `SignatureInformation` and `ParameterInformation` with the right casing. It also adds `activeSignature` field as part of the top-level signature response. It keeps `activeParameter` at the top-level for backwards compatibility.
2021-10-11Add toolInfo in MetaData vertex in LSIF dumpsQuentin Gliech-1/+5
This helps with uploading LSIF dumps to Sourcegraph without having to specify an indexer name.
2021-10-11Show cargo check failures to the userLukas Wirth-1/+4
2021-10-10Merge #10504bors[bot]-2/+2
10504: Remove needless clone r=lnicola a=k-nasa ## Why Delete clones for efficiency ## What - I erased unnecessary clones Co-authored-by: k-nasa <htilcs1115@gmail.com>
2021-10-10Remove neesless clonek-nasa-2/+2
2021-10-09internal: update expectAleksey Kladov-1/+1
2021-10-07Fix: compare pkg via manifestrainy-me-16/+1
2021-10-05Merge #10447bors[bot]-3/+9
10447: Add enum variant references CodeLens. r=Veykril a=ericsampson Co-authored-by: Eric Sampson <esampson@eaze.com>
2021-10-05Merge #10458bors[bot]-21/+126
10458: feat: Implement custom user snippets r=Veykril a=Veykril ![Y24dX7fOWX](https://user-images.githubusercontent.com/3757771/136059454-ceccfc2c-2c90-46da-8ad1-bac9c2e83ec1.gif) Allows us to address the following issues: - `.arc / .rc / .pin, similar to .box?` https://github.com/rust-analyzer/rust-analyzer/issues/7033 - `Add unsafe snippet` https://github.com/rust-analyzer/rust-analyzer/issues/10392, would allow users to have this without the diagnostic) - `.ok() postfix snippet is annoying` https://github.com/rust-analyzer/rust-analyzer/issues/9636, allows us to get rid of the `ok` postfix and similar ones - `Postfix vec completion` https://github.com/rust-analyzer/rust-analyzer/issues/7773 cc https://github.com/rust-analyzer/rust-analyzer/issues/772 Zulipd discussion: https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/Custom.20Postfix.20snippets Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-10-05Bring the implementation closer to VSCode snippet definitionsLukas Wirth-75/+31
2021-10-05Replace `if let` with `match` where appropriateAramis Razzaghipour-8/+6
2021-10-04Regen docsLukas Wirth-10/+16
2021-10-04Make multiple import edits work for completionsLukas Wirth-16/+45
2021-10-04Add custom non-postfix snippetsLukas Wirth-6/+64
2021-10-04Initial implementation of custom postfix snippetsLukas Wirth-1/+57
2021-10-04Add enum variant references CodeLens.Eric Sampson-3/+9
2021-10-03Add semicolons for consistencyAramis Razzaghipour-1/+1
`clippy::semicolon_if_nothing_returned`
2021-10-03Allow locate parent module action in cargo tomlrainy-me-5/+75
2021-10-02internal: untangle usages of ReferenceCategory somewhatAleksey Kladov-2/+2
Not everything that can be read or write is a reference, let's try to use more precise types.
2021-10-02internal: use naming that matches intended use-caseAleksey Kladov-5/+5
2021-10-01Add semantic token modifier for crate rootlhvy-0/+2
2021-09-30Fix add missing semantic token modifier in SUPPORTED_MODIFIERSLukas Wirth-0/+1
2021-10-01Remove unneeded semantic token definitionlhvy-2/+1
2021-10-01Give defaultLibrary semantic token modifier to items from standard librarylhvy-17/+19
2021-09-29Merge #10181bors[bot]-3/+281
10181: Begining of lsif r=HKalbasi a=HKalbasi This PR adds a `lsif` command to cli, which can be used as `rust-analyzer lsif /path/to/project > dump.lsif`. It now generates a valid, but pretty useless lsif (only supports folding ranges). The propose of this PR is to discussing about the structure of lsif generator, before starting anything serious. cc `@matklad` #8696 #3098 Co-authored-by: hamidreza kalbasi <hamidrezakalbasi@protonmail.com>
2021-09-29remove glob import and cancellableshamidreza kalbasi-59/+67
2021-09-27Enable attribute proc macros by defaultLaurențiu Nicola-1/+1
2021-09-26use crates io versionhamidreza kalbasi-1/+1
2021-09-26support goto definition and find referenceshamidreza kalbasi-14/+101
2021-09-26reuse hover results with resultsethamidreza kalbasi-47/+76
2021-09-26move lsif types to lsp types cratehamidreza kalbasi-369/+14
2021-09-26add hoverhamidreza kalbasi-36/+56
2021-09-26cfg unix for tests with unix pathhamidreza kalbasi-0/+2
2021-09-26use utf16 instead of utf8hamidreza kalbasi-8/+9
2021-09-26Begining of lsifhamidreza kalbasi-2/+488
2021-09-24Give rustfmt spawn error context.Nixon Enraght-Moony-2/+7
2021-09-24Merge #10105bors[bot]-0/+2
10105: RfC: Use `todo!()` instead of `()` for missing fields r=jonas-schievink a=jo-so Most commonly a field of a struct can be initialized with its default value than an empty tuple. Co-authored-by: Jörg Sommer <joerg@jo-so.de>
2021-09-24Merge #10332bors[bot]-1/+3
10332: minor: Allow overwriting RUST_BACKTRACE for the server manually r=jonas-schievink a=Veykril Trying to figure out why we aren't getting backtraces for windows builds from CI, this let's one set the backtraces to `FULL` Might be cc https://github.com/rust-lang/rust/issues/87481 bors r+ Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-09-24Allow setting RUST_BACKTRACE for the server manuallyLukas Wirth-1/+3
2021-09-24Fix link to "Auto Import"Carlos Menezes-1/+1
2021-09-23Split the hover module upLukas Wirth-1/+1
2021-09-21Rename some assistsLukas Wirth-1/+1
2021-09-17fix completion handler trying to seek outside of character boundaries.Dawer-10/+7
With this patch, in these examples ```rust fn main() { "⊞$0"; } ``` ```rust struct S { д$0 u8 } ``` entering ':' character in `$0` places shouldn't cause panics.
2021-09-13Merge #10126bors[bot]-0/+1
10126: feat: Speculatively expand attributes in completions r=Veykril a=Veykril ![j1OjBt5Nca](https://user-images.githubusercontent.com/3757771/133163858-91930072-1441-4ce4-9979-b0ad2727b47f.gif) Fixes #9866 Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-09-14Exclude test file from rust tidy checkLukas Wirth-0/+1