Lukas Wirth
24c0e0bd48
fix: Fix find_path not respecting non-std preference config correctly
2024-08-10 10:32:10 +02:00
Lukas Wirth
5264f86242
Encode edition within FileId in the hir layer
2024-07-18 08:49:10 +02:00
Shohei Wada
3725ab3146
squash.
2024-07-02 01:52:34 +09:00
David Barsky
b75301cec8
internal: refactor prefer_no_std
/prefer_prelude
bools into a struct
2024-05-22 20:46:30 +02:00
Lukas Wirth
c88b421853
fix: Fix general find-path inconsistencies
2024-05-22 14:05:24 +02:00
Lukas Wirth
a483d3bc37
internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros
2024-04-14 16:02:38 +02:00
Lukas Wirth
18591ae5c8
Always render the path to be imported in the completion detail
2023-12-11 18:37:12 +01:00
Lukas Wirth
ba61766217
Add config for preferring / ignoring prelude modules in find_path
2023-11-11 14:56:38 +01:00
Yuri Astrakhan
e16c76e3c3
Inline all format arguments where possible
...
This makes code more readale and concise,
moving all format arguments like `format!("{}", foo)`
into the more compact `format!("{foo}")` form.
The change was automatically created with, so there are far less change
of an accidental typo.
```
cargo clippy --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2022-12-24 14:36:10 -05:00
Lukas Wirth
a8ecaa1979
Restructure find_path
into a separate functions for modules and non-module items
...
Also renames `prefer_core` imports config to `prefer_no_std` and changes the behavior of no_std path searching by preferring `core` paths `over` alloc
2022-09-13 15:15:27 +02:00
Lukas Wirth
7d19971666
Add config to unconditionally prefer core imports over std
...
Fixes https://github.com/rust-lang/rust-analyzer/issues/12979
2022-09-09 20:04:56 +02:00
Amos Wenger
816f7fe12a
Run cargo fix --edition-idioms
2022-07-20 15:02:08 +02:00
bors
f3e9b38e26
Auto merge of #12646 - lowr:fix/11897, r=lowr
...
fix: escape receiver texts in completion
This PR fixes #11897 by escaping '\\' and '$' in the text of the receiver position expression. See [here](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#snippet_syntax ) for the specification of the snippet syntax (especially [this section](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#grammar ) discusses escaping).
Although not all occurrences of '\\' and '$' have to be replaced, I chose to replace all as that's simpler and easier to understand. There *are* more clever ways to implement it, but I thought they were premature optimization for the time being (maybe I should put FIXME notes?).
2022-07-20 10:51:31 +00:00
TonalidadeHidrica
e3bde579c4
Fix obsolete completion.snippets
config
2022-07-11 17:00:40 +09:00
Ryo Yoshida
80cc0ef1bc
Fix typo
2022-06-27 23:20:26 +09:00
Lukas Wirth
5c69df93df
Split remaining completion calls on the context kinds
2022-06-20 13:17:30 +02:00
Peh
1f011fa4a3
style: rename crates to kebab case
2022-05-01 10:48:58 +00:00