aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | CleanupAleksey Kladov2020-02-065-79/+81
| | |
| * | cleanup importsAleksey Kladov2020-02-0631-100/+103
| | |
| * | Move to a crateAleksey Kladov2020-02-0611-31/+111
| | |
| * | Move change to ide-dbAleksey Kladov2020-02-063-5/+5
| | |
| * | Fix test importsAleksey Kladov2020-02-061-2/+4
| | |
| * | Move QueryAleksey Kladov2020-02-062-41/+42
| | |
| * | Move symbol_indexAleksey Kladov2020-02-067-12/+16
| | |
| * | Move FeatureFlagsAleksey Kladov2020-02-063-4/+3
| | |
| * | Move line_indexAleksey Kladov2020-02-064-7/+12
| | |
| * | Move ide-dbAleksey Kladov2020-02-062-132/+132
| | |
| * | Start ide_dbAleksey Kladov2020-02-062-0/+3
| | |
* | | Merge #3028bors[bot]2020-02-063-0/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | 3028: Add profiling around add_impl_members r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | Add profiling around add_impl_membersAleksey Kladov2020-02-063-0/+3
|/ / | | | | | | | | | | | | | | | | This intention is pretty slow for `impl Interator`, because it has a ton of default methods which need to be substituted. The proper fix here is to not compute the actual edit until the user triggers the action, but that's awkward to do in the LSP right now, so let's just put a profiling code for now.
* | Merge #3024bors[bot]2020-02-058-21/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | 3024: vscode: eliminate floating promises and insane amount of resource handle leaks r=matklad a=Veetaha Khm, yeah ... Co-authored-by: Veetaha <[email protected]>
| * | vscode: eliminate floating promises and insane amount of resource handle leaksVeetaha2020-02-058-21/+36
| | |
* | | Merge #3015bors[bot]2020-02-056-34/+29
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 3015: vscode: yet another refactor commit r=matklad a=Veetaha It compiles, it runs in dev extension host, It bundles, it runs when bundled and installed. Removed 5 lines of code as you like less code, especially TypeScript code) Co-authored-by: Veetaha <[email protected]>
| * | vscode: removed changes to integrity hash in package-lock.jsonVeetaha2020-02-051-1/+1
| | |
| * | vscode: yet another refactor commitVeetaha2020-02-047-35/+30
| | |
* | | Merge #3018bors[bot]2020-02-054-32/+55
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3018: Refactor if-let -> match assist to use ast::make r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Refactor if-let -> match assist to use ast::makeAleksey Kladov2020-02-054-32/+55
|/ / /
* | | Merge #3019bors[bot]2020-02-051-36/+91
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3019: Better cursor placement when merging arms r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Better cursor placement when merging armsAleksey Kladov2020-02-051-4/+17
| | | |
| * | | Merge match arms works with many armsAleksey Kladov2020-02-051-29/+70
| | | |
| * | | CleanupAleksey Kladov2020-02-051-11/+12
| |/ /
* | | Merge #3016bors[bot]2020-02-051-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3016: Fix unneeded `.` in `docs/user/README.md` r=kjeremy a=fusillicode I hope I got the typo right 😅 Thanks a lot of this wonderful project 🙇 Co-authored-by: Gian D <[email protected]>
| * | | Further fix `docs/user/README.md`Gian D2020-02-051-1/+1
| | | | | | | | | | | | Co-Authored-By: LaurenÈ›iu Nicola <[email protected]>
| * | | Fix unneeded `.` in `docs/user/README.md`Gian D2020-02-051-1/+1
| |/ /
* | | Merge #3017bors[bot]2020-02-055-27/+84
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | 3017: Normalize dashes in crate names r=matklad a=SomeoneToIgnore A follow-up for https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Fwg-rls-2.2E0/topic/Yet.20another.20auto.20import.20bug In theory, I could have used the same new type in the `Dependency` `name` field, but since the `add_dep` method that actually adds a dependency is private, it seems like an unnecessary change now. Co-authored-by: Kirill Bulatov <[email protected]>
| * | Apply the reviews suggestionsKirill Bulatov2020-02-055-32/+64
| | |
| * | Normalize dashes in crate namesKirill Bulatov2020-02-051-8/+33
|/ /
* | Merge #2948bors[bot]2020-02-041-6/+48
|\ \ | | | | | | | | | | | | | | | | | | | | | 2948: Allow add_explicit_type to replace a placeholder type r=matklad a=lnicola Co-authored-by: LaurenÈ›iu Nicola <[email protected]>
| * | Allow add_explicit_type to replace a placeholder typeLaurențiu Nicola2020-02-031-6/+48
| | |
* | | Merge #3011bors[bot]2020-02-041-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3011: Update aho-corasick (removes unsafety) and serde_json r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * | | Update aho-corasick (removes unsafety) and serde_jsonkjeremy2020-02-041-4/+4
|/ / /
* | | Merge #3010bors[bot]2020-02-041-6/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3010: minor, if let else -> match r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | minor, if let else -> matchAleksey Kladov2020-02-041-6/+3
| | | |
* | | | Merge #3009bors[bot]2020-02-041-2/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3009: Make sure that newly created nodes are the root of the tree r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
| * | | Make sure that newly created nodes are the root of the treeAleksey Kladov2020-02-041-2/+11
|/ / /
* | | Merge #2981bors[bot]2020-02-044-51/+37
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2981: vscode: Add ability to call onEnter without overriding "type". r=matklad a=71 Before this PR, the only way to get enhanced typing (right now, only with `onEnter`) was to override VS Code's `type` command. This leads to issues with extensions like [VsCodeVim](https://github.com/VSCodeVim/Vim) that need to override `type` as well. This PR adds an additional command, `onEnter`. This command can be used with the following keybinding, which allows the user to get smart `onEnter` behavior without overriding `type`. ```json { "key": "enter", "command": "rust-analyzer.onEnter", "when": "editorTextFocus && editorLangId == rust" } ``` Co-authored-by: Gregoire Geis <[email protected]> Co-authored-by: Grégoire Geis <[email protected]>
| * | | Merge two if statements into one in editors/code/src/commands/on_enter.ts.Grégoire Geis2020-02-041-1/+1
| | | | | | | | | | | | Co-Authored-By: Veetaha <[email protected]>
| * | | vscode: Only handle enter if the suggest widget is hidden.Gregoire Geis2020-02-031-1/+1
| | | |
| * | | Remove enableEnhancedTyping and type overriding infrastructure.Gregoire Geis2020-02-034-41/+1
| | | |
| * | | Change default enhanced typing behavior from using type to using keybindings.Gregoire Geis2020-02-031-1/+6
| | | |
| * | | Add regular onEnter command, allowing onEnter to be called without ↵Gregoire Geis2020-02-033-19/+40
| | | | | | | | | | | | | | | | overriding the type command.
* | | | Merge #2962bors[bot]2020-02-044-14/+34
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2962: Differentiate underscore alias from named aliases r=matklad a=zombiefungus pre for Fixing Issue 2736 edited to avoid autoclosing the issue Co-authored-by: zombiefungus <[email protected]>
| * | | | include requested changeszombiefungus2020-02-024-27/+28
| | | | |
| * | | | add new ImportAlias enum to differentiate no alias from an _ aliaszombiefungus2020-02-024-11/+30
| | | | |
* | | | | Merge #2911bors[bot]2020-02-03160-172/+798
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2911: Implement collecting errors while tokenizing r=matklad a=Veetaha Now we are collecting errors from `rustc_lexer` and returning them in `ParsedToken { token, error }` and `ParsedTokens { tokens, errors }` structures **([UPD]: this is now simplified, see updates bellow)**. The main changes are introduced in `ra_syntax/parsing/lexer.rs`. It now exposes the following functions and types: ```rust pub fn tokenize(text: &str) -> ParsedTokens; pub fn tokenize_append(text: &str, parsed_tokens_to_append_to: &mut ParsedTokens); pub fn first_token(text: &str) -> Option<ParsedToken>; // allows any number of tokens in text pub fn single_token(text: &str) -> Option<ParsedToken>; // allows only a single token in text pub struct ParsedToken { pub token: Token, pub error: Option<SyntaxError> } pub struct ParsedTokens { pub tokens: Vec<Token>, pub errors: Vec<SyntaxError> } pub enum TokenizeError { /* Simple enum which reflects rustc_lexer tokenization errors */ } ``` In the first commit I implemented it with iterators, but then decided that since this crate is ad hoc for `rust-analyzer` and we clearly see the places of its usage it would be better to simplify it to vectors. This is currently WIP, because I want to add tests for error messages generated by the lexer. I'd like to listen to you thoughts how to define these tests in `ra_syntax/test-data` dir. Related issues: #223 **[UPD]** After the PR review the API was simplified: ```rust pub fn tokenize(text: &str) -> (Vec<Token>, Vec<SyntaxError>); // Both lex functions do not check for unescape errors pub fn lex_single_syntax_kind(text: &str) -> Option<(SyntaxKind, Option<SyntaxError>)>; pub fn lex_single_valid_syntax_kind(text: &str) -> Option<SyntaxKind>; // This will be removed in the next PR in favour of simlifying `SyntaxError` to `(String, TextRange)` pub enum TokenizeError { /* Simple enum which reflects rustc_lexer tokenization errors */ } // this is private, but may be made public if such demand would exist in future (least privilege principle) fn lex_first_token(text: &str) -> Option<(Token, Option<SyntaxError>)>; ``` Co-authored-by: Veetaha <[email protected]>
| * | | | ra_syntax: added tests for tokenization errorsVeetaha2020-02-03150-49/+427
| | | | |
| * | | | ra_syntax: add backticks around tokens specimenVeetaha2020-02-031-12/+23
| | | | |