Commit Graph

20944 Commits

Author SHA1 Message Date
Jeroen Vannevel 73e49493bd rough, but appears to work 2022-02-15 14:39:22 +00:00
bors[bot] f0210f8a43 Merge #11475
11475: Impr mbe: remove unecessary temporary vec r=bellau a=bellau

It's a micro optimization. I don't know if it's really necessary (less alloc is always better).

Co-authored-by: bellau <laurent.belmonte@gmail.com>
2022-02-15 09:36:22 +00:00
bors[bot] e5b6020e55 Merge #11480
11480: fix: keyword hover works on non-keyword tokens if expanded to keyword r=Veykril a=Veykril

bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-02-15 09:29:28 +00:00
bellau ff4024eebd Impr mbe: remove unecessary temporary vec 2022-02-15 10:21:14 +01:00
Lukas Wirth 95db3c1476 fix: keyword hover works on non-keyword tokens if expanded to keyword 2022-02-15 10:09:19 +01:00
bors[bot] 9bc2ee34b0 Merge #11477
11477: fix: Fix cases where `Merge Imports` would drop imports. r=DropDemBits a=DropDemBits

Fixes #11466 

Co-authored-by: DropDemBits <r3usrlnd@gmail.com>
2022-02-15 01:50:25 +00:00
DropDemBits a1a23d343a Apply review fixes 2022-02-14 20:41:01 -05:00
DropDemBits 86c1251afb fix: Don't drop glob with nested self 2022-02-14 19:45:31 -05:00
DropDemBits df2eb3c7cb fix: Don't drop tree when the other has self 2022-02-14 19:37:01 -05:00
bors[bot] aafa40cebd Merge #11369
11369: feat: Add type hint for keyword expression hovers r=Veykril a=danii

Adds the return type of keywords to tool-tips where it makes sense. This applies to: `if`, `else`, `match`, `loop`, `unsafe` and `await`. Thanks to `@Veykril` for sharing the idea of putting return type highlighting on other keywords!
![image](https://user-images.githubusercontent.com/39541871/151611737-12325c23-a1f9-4fca-ae48-279b374bdcdf.png)

Closes #11359

Co-authored-by: Daniel Conley <himself@danii.dev>
2022-02-14 21:07:41 +00:00
Daniel Conley 768804f11d Hide Keyword Expression Hover For Units ()
Cleaned up the code for keyword expression hovers.

Added a check to hide units `()` in keyword expression hovers.
2022-02-14 15:26:40 -05:00
bors[bot] 014d3ef1a4 Merge #11458
11458: Fix  Immovable generator syntax (static ||) not recognized #11448 r=Veykril a=bellau



Co-authored-by: bellau <laurent.belmonte@gmail.com>
2022-02-14 17:35:12 +00:00
bors[bot] 0247e50676 Merge #11470
11470: correct the description of Struct GlobalState r=lnicola a=doki23

Fixes #11469

The description of GlobalState should be 'more than one impl'

Co-authored-by: doki <11144133+doki23@users.noreply.github.com>
2022-02-14 12:05:21 +00:00
doki 94b6038657 correct the description of Struct GlobalState 2022-02-14 19:30:21 +08:00
bellau 06452cd102 Fix style 2022-02-14 07:41:50 +01:00
bors[bot] 02904e99ac Merge #11464
11464: minor: Bump deps r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-02-13 16:15:37 +00:00
Laurențiu Nicola 60c698bbcf Bump deps 2022-02-13 18:14:49 +02: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
bors[bot] e1acbd08ca Merge #11459
11459: fix: add missing experimental capabilities r=Veykril a=nemethf

Fix #11389 by extending server_capabilities.experimental with
matchingBrace, externalDocs, moveItems.  Also, sort entries
alphabetically.

Co-authored-by: Felicián Németh <felician.nemeth@gmail.com>
2022-02-13 12:35:11 +00:00
Tianyi Song aa8c982c3a Address PR comments 2022-02-13 18:14:39 +08:00
bellau dc68b89469 oops, remove println 2022-02-13 09:11:35 +01:00
bellau 0a18a050b5 fix handle static async and static async move 2022-02-13 09:09:44 +01:00
bellau 3ed19d54db Fix style 2022-02-12 17:31:17 +01:00
bellau 2008607946 support static move too 2022-02-12 16:07:58 +01:00
Felicián Németh 7c7d6991dd fix: documentation of SsrParams
Fix #11429 by extending the documentation of SsrParms with the
mandatory field 'selections'.  Copy its description from lsp_ext.rs.
2022-02-12 15:47:54 +01: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
bellau 1284bc0af3 Fix styles 2022-02-12 15:35:06 +01:00
bellau ccab6afabc Fix Immovable generator syntax (static ||) not recognized #11448 2022-02-12 15:17:10 +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
bors[bot] 08348d79fa Merge #11441
11441: minor: Bump deps r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2022-02-09 07:24:33 +00: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
Laurențiu Nicola bde624d5ab Bump deps 2022-02-09 09:14:55 +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
bors[bot] 8ac459501e Merge #11436
11436: fix: renaming modules does not change references by super r=Veykril a=TheDoctor314

Fixes #11289.

Co-authored-by: TheDoctor314 <64731940+TheDoctor314@users.noreply.github.com>
2022-02-08 23:19:07 +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