| Age | Commit message (Collapse) | Author | Lines |
|
fix: use ItemInNs::Macros to convert ModuleItem to ItemInNs
fix #17425.
When converting `PathResolution` to `ItemInNs`, we should convert `ModuleDef::Macro` to `ItemInNs::Macros` to ensure that it can be found in `DefMap`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
members of a struct or union
|
|
|
|
|
|
Use full sentences, and mention how to disable the diagnostic
if users are intentionally working on unowned files.
|
|
|
|
|
|
fix: Fix IDE features breaking in some attr macros
Fixes https://github.com/rust-lang/rust-analyzer/issues/17453, Fixes https://github.com/rust-lang/rust-analyzer/issues/17458
|
|
|
|
fix: Fix flycheck panicking when cancelled
Fixes https://github.com/rust-lang/rust-analyzer/issues/17445
|
|
Filter builtin macro expansion
This PR adds a filter on the types of built in macros that are allowed to be expanded.
Currently, This list of allowed macros contains, `stringify, cfg, core_panic, std_panic, concat, concat_bytes, include, include_str, include_bytes, env` and `option_env`.
Fixes #14177
|
|
|
|
Remove panicbit.cargo extension warning
A warning was introduced regarding the incompatabilities between `rust-analyzer` and `panicbit.cargo`'s diagnostics / `cargo check` functionality.
This functionality has been removed in the latest version of the cargo extension (`0.3.0`), which is why the warning can be removed now.
|
|
|
|
fix: ensure there are no cycles in the source_root_parent_map
See #17409
We can view the connections between roots as a graph. The problem is that this graph may contain cycles, so when adding edges, it is necessary to check whether it will lead to a cycle.
Since we ensure that each node has at most one outgoing edge (because each SourceRoot can have only one parent), we can use a disjoint-set to maintain the connectivity between nodes. If an edge’s two nodes belong to the same set, they are already connected.
Additionally, this PR includes the following three changes:
1. Removed the workaround from #17409.
2. Added an optimization: If `map.contains_key(&SourceRootId(*root_id as u32))`, we can skip the current loop iteration since we have already found its parent.
3. Modified the inner loop to iterate in reverse order with `roots[..idx].iter().rev()` at line 319. This ensures that if we are looking for the parent of `a/b/c`, and both `a` and `a/b` meet the criteria, we will choose the longer match (`a/b`).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Term search: new tactic for associated item constants
New tactic to cover some more exotic cases that started bothering me.
Associated constants seem to be common in [axum](https://github.com/tokio-rs/axum/blob/806bc26e62afc2e0c83240a9e85c14c96bc2ceb3/examples/readme/src/main.rs#L53).
|
|
feat: add `toggleLSPLogs` command
Implement client-side command to toggle LSP logs in VSCode.
The command replaces the need to add/remove the `"rust-analyzer.trace.server": "verbose"` setting each time one wants to display logs. I've also updated the docs/ instances that reference the now outdated manual method.
The command labeled `rust-analyzer: Toggle LSP Logs` enables the setting project-wide and opens the relevant trace output channel.
Closes #8233
|
|
feat: add space after specific keywords in completion
fix #17428.
When completing some specific keywords, it would be convenient if r-a could automatically add a space afterwards.
This PR implements this feature for the following keywords:
- Visibility: `pub`, `pub(crate)`, `pub(super)`, `pub(in xxx)`
- Pattern: `ref` / `mut`
- Others: `unsafe` / `for` / `where`
|
|
fix: handle character boundaries for wide chars in extend_selection
fix #17420.
When calling 'extend_selection' within a string, r-a attempts to locate the current word at the cursor. This is done by finding the first char before the cursor which is not a letter, digit, or underscore.
The position of this character is referred to as `start_idx`, and the word is considered to start from `start_idx + 1`. However, for wide characters, `start_idx + 1` is not character boundaries, which leading to panic. We should use `ceil_char_boundary` to ensure that the idx is always on character boundaries.
|
|
fix: Only show unlinked-file diagnostic on first line during startup
This partially reverts #17350, based on the feedback in #17397.
If we don't have an autofix, it's more annoying to highlight the whole file. This autofix heuristic fixes the diagnostic being overwhelming during startup.
|
|
Tidy up vscode extension a bit
|
|
|
|
|
|
|
|
fix: Fix pat fragment parsers choking on <eoi>
Fixes https://github.com/rust-lang/rust-analyzer/issues/17441
|
|
|
|
docs: fix manual generation instructions
To generate all the requisite files, you need to run `cargo xtask codegen` not `cargo test -p xtask`.
|
|
docs: document omission heuristics for parameter inlay hints
These are not currently documented and could cause users to think that their rust-analyzer configuration is broken.
Partially addresses #17433.
|
|
Properly prime all crate def maps in parallel_prime_caches
|
|
|
|
|
|
|
|
add `toggleLSPLogs` command
update docs to reflect new command
|
|
To generate all the requisite files, you need to run `cargo xtask codegen` not
`cargo test -p xtask`.
|
|
These are not currently documented and could cause users to think
that their rust-analyzer configuration is broken.
Partially addresses #17433.
|