Commit Graph

14335 Commits

Author SHA1 Message Date
vi_mi
7abd7b80f3
chore: reposition comment
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-02-22 19:46:50 +05:30
vi_mi
192b6f5a78 fix: visibility in impl items and pub(crate) to pub in extract_module 2022-02-22 18:35:45 +05:30
doki
94b6038657
correct the description of Struct GlobalState 2022-02-14 19:30:21 +08:00
bors[bot]
59c49a9c81
Merge #11442 #11460
11442: fix(rename): Use text range of a mod name after macro expansion r=Veykril a=tysg

Fixes #11417. 

11460: fix: documentation of SsrParams r=Veykril a=nemethf

Fix #11429 by extending the documentation of SsrParms with the
mandatory field 'selections'.  Copy its description from lsp_ext.rs.

Co-authored-by: Tianyi Song <42670338+tysg@users.noreply.github.com>
Co-authored-by: Felicián Németh <felician.nemeth@gmail.com>
2022-02-13 12:43:16 +00:00
Tianyi Song
aa8c982c3a Address PR comments 2022-02-13 18:14:39 +08:00
Felicián Németh
27c4be6b4f fix: add missing experimental capabilities
Fix #11389 by extending server_capabilities.experimental with
matchingBrace, externalDocs, moveItems.  Also, sort entries
alphabetically.
2022-02-12 15:37:13 +01:00
bors[bot]
7a17fb9c43
Merge #11444
11444: feat: Fix up syntax errors in attribute macro inputs to make completion work more often r=flodiebold a=flodiebold

This implements the "fix up syntax nodes" workaround mentioned in #11014. It isn't much more than a proof of concept; I have only implemented a few cases, but it already helps quite a bit.

Some notes:
 - I'm not super happy about how much the fixup procedure needs to interact with the syntax node -> token tree conversion code (e.g. needing to share the token map). This could maybe be simplified with some refactoring of that code.
 - It would maybe be nice to have the fixup procedure reuse or share information with the parser, though I'm not really sure how much that would actually help.

Co-authored-by: Florian Diebold <flodiebold@gmail.com>
2022-02-12 12:48:46 +00:00
bors[bot]
4449a336f6
Merge #11453
11453: internal: Make `ascend_call_token` iterative instead of recursive r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-02-11 21:21:57 +00:00
Lukas Wirth
1c77f36311 internal: Make ascend_call_token iterative instead of recursive 2022-02-11 22:21:35 +01:00
Tianyi Song
e62e926a8a Use text range of name after macro expansion 2022-02-11 14:17:12 +08:00
Florian Diebold
ccb789b94a Format again 2022-02-09 17:52:15 +01:00
Florian Diebold
577f70cc9c Reduce visibility 2022-02-09 17:43:37 +01:00
Florian Diebold
dfd2cef0d0 Add back an assertion 2022-02-09 16:36:45 +01:00
Florian Diebold
63fd643d72 Various fixes 2022-02-09 16:30:10 +01:00
Florian Diebold
bdb7ae5dd0 Rename syntax_node_to_token_tree_censored 2022-02-09 13:45:31 +01:00
Florian Diebold
ecf3cff4a6 Replace expressions with errors in them 2022-02-09 11:58:52 +01:00
Laurențiu Nicola
50a1319f46 Bump lsp-types 2022-02-09 09:22:25 +02:00
Laurențiu Nicola
c8f056a6db Revert "Revert "Bump dashmap""
This reverts commit 39674cd350.
2022-02-09 09:19:57 +02:00
bors[bot]
7c2d7035a6
Merge #11437
11437: [ide_completion] render if a function is async/const/unsafe in completion details r=Veykril a=jhgg

this change renders in the autocomplete detail, whether a function is async/const/unsafe.

i found myself wanting to know this information at a glance, so now it renders here:

![image](https://user-images.githubusercontent.com/5489149/153089518-5419afe4-b2c6-4be8-80f7-585f5c514ff2.png)


Co-authored-by: Jake Heinz <jh@discordapp.com>
2022-02-08 23:30:50 +00:00
Jake Heinz
1c1d900d0b [ide_completion] render if a function is async/const/unsafe in completion details 2022-02-08 22:48:34 +00:00
Florian Diebold
30287e6051 Fix test 2022-02-08 20:44:46 +01:00
Florian Diebold
1a5aa84e9f Track synthetic tokens, to be able to remove them again later 2022-02-08 18:13:18 +01:00
TheDoctor314
10e7e18dc6 Fix renaming super keyword 2022-02-08 21:56:39 +05:30
TheDoctor314
add80bccfc Add test
The rename function should not change any path segments that refer to a
module by super.
2022-02-08 21:19:14 +05:30
Florian Diebold
1b5cd03a37 Actually check in fixup.rs 2022-02-07 20:30:28 +01:00
Florian Diebold
c3601e9860 Reverse fixups 2022-02-07 19:53:39 +01:00
Florian Diebold
79ebf618ec Simplify 2022-02-07 18:21:31 +01:00
Florian Diebold
86b968ba94 Add a check 2022-02-07 18:19:00 +01:00
Florian Diebold
b9c5d23f69 Simplify a bit 2022-02-07 18:17:28 +01:00
Florian Diebold
cff209f152 WIP: Actually fix up syntax errors in attribute macro input 2022-02-07 18:12:51 +01:00
Florian Diebold
212e82fd41 Add test for giving attribute proc macros valid syntax 2022-02-07 12:54:08 +01:00
Moritz Vetter
482533ea9a add missing snake case attribute, update hash 2022-02-07 04:57:20 +01:00
Moritz Vetter
ba2ef69c79 Bump pulldown-cmark-to-cmark, adjust usages and fix test 2022-02-06 09:04:06 +01:00
Laurențiu Nicola
39674cd350 Revert "Bump dashmap"
This reverts commit 485f318b70.
2022-02-05 16:15:56 +02:00
The0x539
1536fc040a Fix trait impl completion ranges 2022-02-04 19:55:55 -06:00
Lukas Wirth
ec677e35d0 Simplify 2022-02-04 02:50:33 +01:00
Lukas Wirth
2ad71f1350 Shrink mbe::ExpandError and mbe::ParseError 2022-02-03 17:25:24 +01:00
Lukas Wirth
2310908df7 fix: Fix vis restriction path completions always using the parent module 2022-02-03 17:02:12 +01:00
Lukas Wirth
c83081879f Add abi string completions 2022-02-03 16:33:42 +01:00
Lukas Wirth
d3f3b6a87f Sort completion calls lexicographically 2022-02-03 16:05:21 +01:00
Lukas Wirth
7619c2afea Simplify 2022-02-03 16:00:49 +01:00
Lukas Wirth
9f5ee155c1 Move path completions for patterns into pattern module 2022-02-03 15:52:03 +01:00
Lukas Wirth
33fd2d7aef Cleanup PathCompletionContext qualifier handling 2022-02-03 15:52:03 +01:00
Lukas Wirth
a3ad99649f Add missing test for use completions 2022-02-03 15:52:03 +01:00
Lukas Wirth
136dadac9a Add completion module tailored towards visibility modifiers 2022-02-03 15:52:03 +01:00
Lukas Wirth
661d721e20 Add completion module tailored towards use trees 2022-02-03 15:51:57 +01:00
Lukas Wirth
6940cca760 Move attribute path completions into attribute completion module 2022-02-03 15:50:14 +01:00
Florian Diebold
4ed5fe1554 Fix assoc type shorthand from method bounds
In code like this:
```rust
impl<T> Option<T> {
    fn as_deref(&self) -> T::Target where T: Deref {}
}
```

when trying to resolve the associated type `T::Target`, we were only
looking at the bounds on the impl (where the type parameter is defined),
but the method can add additional bounds that can also be used to refer
to associated types. Hence, when resolving such an associated type, it's
not enough to just know the type parameter T, we also need to know
exactly where we are currently.

This fixes #11364 (beta apparently switched some bounds around).
2022-02-03 13:15:02 +01:00
bors[bot]
9cb6e3a190
Merge #11394
11394: feat: Deprioritize completions of private but editable definitions r=Veykril a=Veykril



Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-02-02 11:42:40 +00:00
Lukas Wirth
2d77eb1e12 Fix test fixture 2022-02-02 12:42:13 +01:00