Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge #3954 | bors[bot] | 2020-04-23 | 4 | -5/+321 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | 3954: Improve autocompletion by looking on the type and name r=matklad a=bnjjj This tweet (https://twitter.com/tjholowaychuk/status/1248918374731714560) gaves me the idea to implement that in rust-analyzer. Basically for this first example I made some examples when we are in a function call definition. I look on the parameter list to prioritize autocompletions for the same types and if it's the same type + the same name then it's displayed first in the completion list. So here is a draft, first step to open a discussion and know what you think about the implementation. It works (cf tests) but maybe I can make a better implementation at some places. Be careful the code needs some refactoring to be better and concise. PS: It was lot of fun writing this haha Co-authored-by: Benjamin Coenen <[email protected]> | ||||
| * | Improve autocompletion by looking on the type and name | Benjamin Coenen | 2020-04-21 | 1 | -3/+1 |
| | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]> | ||||
| * | Merge branch 'master' of github.com:rust-analyzer/rust-analyzer | Benjamin Coenen | 2020-04-21 | 1 | -0/+6 |
| |\ | |||||
| * | | Improve autocompletion by looking on the type and name | Benjamin Coenen | 2020-04-21 | 3 | -46/+46 |
| | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]> | ||||
| * | | Merge branch 'master' of github.com:rust-analyzer/rust-analyzer | Benjamin Coenen | 2020-04-18 | 2 | -10/+49 |
| |\ \ | |||||
| * | | | feat: improve dot completions with scoring | Benjamin Coenen | 2020-04-17 | 1 | -5/+1 |
| | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]> | ||||
| * | | | feat: improve dot completions with scoring | Benjamin Coenen | 2020-04-17 | 3 | -74/+52 |
| | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]> | ||||
| * | | | feat: improve dot completions with scoring | Benjamin Coenen | 2020-04-16 | 4 | -104/+85 |
| | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]> | ||||
| * | | | feat: improve dot completions in a struct literal expression | Benjamin Coenen | 2020-04-15 | 3 | -30/+195 |
| | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]> | ||||
| * | | | Merge branch 'master' of github.com:rust-analyzer/rust-analyzer | Benjamin Coenen | 2020-04-14 | 4 | -5/+22 |
| |\ \ \ | |||||
| * | | | | Improve autocompletion by looking on the type and name, change ↵ | Benjamin Coenen | 2020-04-12 | 2 | -26/+93 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation, include sort in Completions struct Signed-off-by: Benjamin Coenen <[email protected]> | ||||
| * | | | | Improve autocompletion by looking on the type and name | Benjamin Coenen | 2020-04-11 | 5 | -24/+26 |
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]> | ||||
| * | | | | | Improve autocompletion by looking on the type and name | Benjamin Coenen | 2020-04-11 | 4 | -9/+143 |
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Benjamin Coenen <[email protected]> | ||||
* | | | | | | Merge #4065 | bors[bot] | 2020-04-23 | 2 | -7/+217 |
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4065: Complete unqualified enum names in patterns and expressions r=matklad a=nathanwhit This PR implements the completion described in #4014. The result looks like so for patterns: <img width="542" alt="Screen Shot 2020-04-20 at 3 53 55 PM" src="https://user-images.githubusercontent.com/17734409/79794010-8f529400-831f-11ea-9673-f838aa9bc962.png"> and for `expr`s: <img width="620" alt="Screen Shot 2020-04-21 at 3 51 24 PM" src="https://user-images.githubusercontent.com/17734409/79908784-d73ded80-83e9-11ea-991d-921f0cb27e6f.png"> I'm not confident that the completion text itself is very robust, as it will unconditionally add completions for enum variants with the form `Enum::Variant`. This means (I believe) it would still suggest `Enum::Variant` even if the local name is changed i.e. `use Enum as Foo` or the variants are brought into scope such as through `use Enum::*`. Co-authored-by: nathanwhit <[email protected]> | ||||
| * | | | | | Update tests to reflect new completions | nathanwhit | 2020-04-22 | 1 | -1/+1 |
| | | | | | | |||||
| * | | | | | Add tests for enum completion | nathanwhit | 2020-04-22 | 1 | -0/+178 |
| | | | | | | | | | | | | | | | | | | | | | | | | Adds tests for completion of enum variants in match arms, if-let statements, and basic expressions. | ||||
| * | | | | | Complete unqualified enum variants when possible | nathanwhit | 2020-04-22 | 1 | -5/+26 |
| | | | | | | |||||
| * | | | | | Add utility fn for expected type of a node | nathanwhit | 2020-04-22 | 1 | -1/+12 |
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | Adds `expected_type_of` to `CompletionContext` to return the expected type of a node, if it is known. | ||||
* / | | | | Ignore proc-macro in completion | Edwin Cheng | 2020-04-18 | 1 | -0/+6 |
|/ / / / | |||||
* | | | | Don\t suggest import itself as a completion for import | Aleksey Kladov | 2020-04-17 | 1 | -1/+39 |
| | | | | |||||
* | | | | Better snippet when completing trait method | Aleksey Kladov | 2020-04-17 | 1 | -9/+10 |
| |_|/ |/| | | |||||
* | | | Align grammar for record patterns and literals | Aleksey Kladov | 2020-04-11 | 4 | -5/+22 |
| |/ |/| | | | | | | | | | The grammar now looks like this [name_ref :] pat | ||||
* | | Make records grammar more orthogonal | Aleksey Kladov | 2020-04-11 | 2 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | We used name [: expr] grammar before, now it is [name :] expr which makes things simpler | ||||
* | | Rename some tokens | Aleksey Kladov | 2020-04-10 | 1 | -2/+2 |
| | | |||||
* | | Simpler acessors for keywords | Aleksey Kladov | 2020-04-09 | 1 | -2/+2 |
| | | |||||
* | | Drop needless trait | Aleksey Kladov | 2020-04-09 | 1 | -14/+16 |
| | | |||||
* | | Be consistent about token accesors | Aleksey Kladov | 2020-04-09 | 1 | -1/+4 |
|/ | |||||
* | Move computation of missing fields into hir | Aleksey Kladov | 2020-04-07 | 1 | -50/+9 |
| | |||||
* | Add functional update test | Aleksey Kladov | 2020-04-07 | 1 | -0/+33 |
| | |||||
* | Fix names of test modules | Aleksey Kladov | 2020-04-07 | 1 | -2/+2 |
| | |||||
* | A more precise panic macro | Aleksey Kladov | 2020-04-07 | 1 | -1/+1 |
| | |||||
* | Don't insert !() if there's already some | Aleksey Kladov | 2020-04-07 | 2 | -3/+44 |
| | |||||
* | Reorder imports | Aleksey Kladov | 2020-04-07 | 1 | -3/+6 |
| | |||||
* | Better naming for scope completion | Aleksey Kladov | 2020-04-07 | 2 | -2/+2 |
| | |||||
* | Better naming for path completion | Aleksey Kladov | 2020-04-07 | 2 | -0/+0 |
| | |||||
* | Fix unnecessary braces warnings | Laurențiu Nicola | 2020-04-06 | 2 | -5/+5 |
| | |||||
* | Add parens for enums | Aleksey Kladov | 2020-04-03 | 4 | -46/+175 |
| | |||||
* | Generalize call parenthesis insertion | Aleksey Kladov | 2020-04-03 | 1 | -27/+46 |
| | |||||
* | Remove the second code-path for completing names in patterns | Aleksey Kladov | 2020-04-03 | 3 | -70/+28 |
| | |||||
* | Unite record completion logic into a single module | Kirill Bulatov | 2020-04-01 | 3 | -386/+411 |
| | |||||
* | Split draft | Kirill Bulatov | 2020-04-01 | 2 | -59/+25 |
| | |||||
* | Complete only missing fields in pats | Kirill Bulatov | 2020-04-01 | 1 | -1/+62 |
| | |||||
* | Better names for config structs | Aleksey Kladov | 2020-03-31 | 4 | -14/+14 |
| | |||||
* | Start stdx | Aleksey Kladov | 2020-03-28 | 1 | -24/+21 |
| | | | | This crate will hold everything to small to be worth publishing | ||||
* | Align naming | Aleksey Kladov | 2020-03-24 | 1 | -1/+1 |
| | |||||
* | Merge #3694 | bors[bot] | 2020-03-24 | 1 | -1/+61 |
|\ | | | | | | | | | | | | | | | 3694: Complete only missing fields r=matklad a=SomeoneToIgnore Co-authored-by: Kirill Bulatov <[email protected]> | ||||
| * | Code review fixes | Kirill Bulatov | 2020-03-24 | 1 | -3/+4 |
| | | | | | | | | Co-Authored-By: Aleksey Kladov <[email protected]> | ||||
| * | Complete only missing fields | Kirill Bulatov | 2020-03-23 | 1 | -1/+60 |
| | | |||||
* | | Consider references when applying postfix completions | Kirill Bulatov | 2020-03-23 | 1 | -17/+123 |
|/ | |||||
* | Remove const | Steffen Lyngbaek | 2020-03-19 | 3 | -6/+48 |
| | | | | | - Add test for @ matching - Address comments |