Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | Use package script | Jeremy Kolb | 2020-01-26 | 1 | -1/+1 | |
| | | ||||||
* | | Initial auto import action implementation | Kirill Bulatov | 2020-01-26 | 1 | -0/+18 | |
|/ | ||||||
* | Rename Emacs "extension" | Aleksey Kladov | 2020-01-13 | 1 | -1/+1 | |
| | ||||||
* | Rename VS Code extension to rust-analyzer | Aleksey Kladov | 2020-01-13 | 1 | -3/+3 | |
| | ||||||
* | Merge pull request #2732 from detrumi/cargo-toml-not-found-message-toggle | Aleksey Kladov | 2020-01-09 | 1 | -0/+2 | |
|\ | | | | | Flag to hide cargo.toml not found error | |||||
| * | Allow disabling Cargo.toml not found error | Wilco Kusee | 2020-01-03 | 1 | -0/+2 | |
| | | ||||||
* | | add note in vscode instructions for vim plugin users | Gus Wynn | 2020-01-05 | 1 | -0/+4 | |
|/ | ||||||
* | Add example of color customization | Aleksey Kladov | 2019-12-31 | 1 | -10/+3 | |
| | ||||||
* | Merge #2061 | bors[bot] | 2019-12-29 | 1 | -2/+11 | |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2061: Theme loading and "editor.tokenColorCustomizations" support. r=matklad a=seivan Fixes: [Issue#1294](https://github.com/rust-analyzer/rust-analyzer/issues/1294#issuecomment-497450325) TODO: - [x] Load themes - [x] Load existing `ralsp`-prefixed overrides from `"workbench.colorCustomizations"`. - [x] Load overrides from `"editor.tokenColorCustomizations.textMateRules"`. - [x] Use RA tags to load `vscode.DecorationRenderOptions` (colors) from theme & overrides. - [x] Map RA tags to common TextMate scopes before loading colors. - [x] Add default scope mappings in extension. - [x] Cache mappings between settings updates. - [x] Add scope mapping configuration manifest in `package.json` - [x] Load configurable scope mappings from settings. - [x] Load JSON Scheme for text mate scope rules in settings. - [x] Update [Readme](https://github.com/seivan/rust-analyzer/blob/feature/themes/docs/user/README.md#settings). Borrowed the theme loading (`scopes.ts`) from `Tree Sitter` with some modifications to reading `"editor.tokenColorCustomizations"` for merging with loaded themes and had to remove the async portions to be able to load it from settings updates. ~Just a PoC and an idea I toyed around with a lot of room for improvement.~ For starters, certain keywords aren't part of the standard TextMate grammar, so it still reads colors from the `ralsp` prefixed values in `"workbench.colorCustomizations"`. But I think there's more value making the extension work with existing themes by maping some of the decoration tags to existing key or keys. <img width="453" alt="Screenshot 2019-11-09 at 17 43 18" src="https://user-images.githubusercontent.com/55424/68531968-71b4e380-0318-11ea-924e-cdbb8d5eae06.png"> <img width="780" alt="Screenshot 2019-11-09 at 17 41 45" src="https://user-images.githubusercontent.com/55424/68531950-4b8f4380-0318-11ea-8f85-24a84efaf23b.png"> <img width="468" alt="Screenshot 2019-11-09 at 17 40 29" src="https://user-images.githubusercontent.com/55424/68531952-51852480-0318-11ea-800a-6ae9215f5368.png"> These will merge with the default ones coming with the extension, so you don't have to implement all of them and works well with overrides defined in settings. ```jsonc "editor.tokenColorCustomizations": { "textMateRules": [ { "scope": "keyword", "settings": { "fontStyle": "bold", } }, ] }, ``` Edit: The idea is to work with 90% of the themes out there by working within existing scopes available that are generally styled. It's not to say I want to erase the custom Rust scopes - those should still remain and eventually worked into a custom grammar bundle for Rust specific themes that target those, I just want to make it work with generic themes offered on the market place for now. A custom grammar bundle and themes for Rust specific scopes is out of... scope for this PR. We'll make another round to tackle those issues. Current fallbacks implemented ```typescript [ 'comment', [ 'comment', 'comment.block', 'comment.line', 'comment.block.documentation' ] ], ['string', ['string']], ['keyword', ['keyword']], ['keyword.control', ['keyword.control', 'keyword', 'keyword.other']], [ 'keyword.unsafe', ['storage.modifier', 'keyword.other', 'keyword.control', 'keyword'] ], ['function', ['entity.name.function']], ['parameter', ['variable.parameter']], ['constant', ['constant', 'variable']], ['type', ['entity.name.type']], ['builtin', ['variable.language', 'support.type', 'support.type']], ['text', ['string', 'string.quoted', 'string.regexp']], ['attribute', ['keyword']], ['literal', ['string', 'string.quoted', 'string.regexp']], ['macro', ['support.other']], ['variable', ['variable']], ['variable.mut', ['variable', 'storage.modifier']], [ 'field', [ 'variable.object.property', 'meta.field.declaration', 'meta.definition.property', 'variable.other' ] ], ['module', ['entity.name.section', 'entity.other']] ``` Co-authored-by: Seivan Heidari <[email protected]> | |||||
| * | Merge branch 'master' into feature/themes | Seivan Heidari | 2019-12-23 | 2 | -24/+57 | |
| |\ | ||||||
| * \ | Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵ | Seivan Heidari | 2019-11-25 | 2 | -0/+24 | |
| |\ \ | | | | | | | | | | | | | feature/themes | |||||
| * \ \ | Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵ | Seivan Heidari | 2019-11-21 | 1 | -1/+1 | |
| |\ \ \ | | | | | | | | | | | | | | | | feature/themes | |||||
| * \ \ \ | Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵ | Seivan Heidari | 2019-11-20 | 1 | -0/+4 | |
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | feature/themes | |||||
| * \ \ \ \ | Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵ | Seivan Heidari | 2019-11-15 | 1 | -0/+21 | |
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | feature/themes | |||||
| * \ \ \ \ \ | Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵ | Seivan Heidari | 2019-11-12 | 1 | -0/+2 | |
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | feature/themes | |||||
| * | | | | | | | Clearer docs usage under `rust-analyzer.scopeMappings`. | Seivan Heidari | 2019-11-04 | 1 | -1/+1 | |
| | | | | | | | | ||||||
| * | | | | | | | * Adding scope mapping configuration manifest in `package.json` | Seivan Heidari | 2019-11-04 | 1 | -2/+11 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Loading configurable scope mappings from settings. * Updating Readme with `rust-analyzer.scopeMappings`. `rust-analyzer.scopeMappings` -- a scheme backed JSON object to tweak Rust Analyzer scopes to TextMate scopes. ```jsonc { //Will autocomplete keys to available RA scopes. "keyword.unsafe": ["keyword", "keyword.control"], //Values are string | TextMateScope | [string | TextMateScope] "comments": "comment.block" } ``` | |||||
* | | | | | | | | Fill in type params in 'add missing impl members' assist | Florian Diebold | 2019-12-24 | 1 | -11/+11 | |
| |_|_|_|_|_|/ |/| | | | | | | ||||||
* | | | | | | | Cleanup Vim and NeoVim instructions. Fix #2579 | Francisco Lopes | 2019-12-17 | 1 | -17/+12 | |
| | | | | | | | ||||||
* | | | | | | | Code: check whether the LSP binary is in PATH | Laurențiu Nicola | 2019-12-08 | 1 | -1/+16 | |
| | | | | | | | ||||||
* | | | | | | | fix file name | Andrew Banchich | 2019-12-04 | 1 | -1/+1 | |
| | | | | | | | ||||||
* | | | | | | | fix link | Andrew Banchich | 2019-12-04 | 1 | -1/+1 | |
| | | | | | | | ||||||
* | | | | | | | use relative link | Andrew Banchich | 2019-12-04 | 1 | -1/+1 | |
| | | | | | | | ||||||
* | | | | | | | fix outdated link to ra-emacs-lsp.el | Andrew Banchich | 2019-12-04 | 1 | -1/+1 | |
| | | | | | | | ||||||
* | | | | | | | Merge #2018 | bors[bot] | 2019-12-02 | 1 | -0/+18 | |
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2018: assists: add assist for custom implementation for derived trait r=matklad a=paulolieuthier Please, tell me if something could be more idiomatic or efficient. Fixes #1256. Co-authored-by: Paulo Lieuthier <[email protected]> | |||||
| * | | | | | | | docs: describe new feature 'add custom impl for derived trait' | Paulo Lieuthier | 2019-11-28 | 1 | -0/+18 | |
| | |_|_|_|_|/ | |/| | | | | | ||||||
* | | | | | | | Add back corrected `cargo install` command | Jonathan Behrens | 2019-12-01 | 1 | -8/+8 | |
| | | | | | | | ||||||
* | | | | | | | Clarify installation instructions | Jonathan Behrens | 2019-12-01 | 1 | -10/+15 | |
|/ / / / / / | | | | | | | | | | | | | In particular it is necessary to clone the repository before running the other commands. I also removed the `cargo install` side note because it didn't actually work (running the command just produces an error that --package isn't a recognized flag) and added a tldr code block with the list of commands to run. | |||||
* | | | | | | Merge #2343 | bors[bot] | 2019-11-24 | 1 | -0/+19 | |
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2343: implement assist invert_if r=matklad a=bravomikekilo fix [issue 2219 invert if condition](https://github.com/rust-analyzer/rust-analyzer/issues/2219) I put the assist cursor range to `if` of the if expression, because both condition and body will be replaced. Is there any way to replace them without cover the cursor position? @matklad Co-authored-by: bravomikekilo <[email protected]> | |||||
| * | | | | | | do refact and fix some issue | bravomikekilo | 2019-11-24 | 1 | -2/+2 | |
| | | | | | | | ||||||
| * | | | | | | initial invert_if | bravomikekilo | 2019-11-21 | 1 | -0/+19 | |
| | |_|_|_|/ | |/| | | | | ||||||
* | | | | | | Fix url to point to rust_analyzer specifically | Ashkan Kiani | 2019-11-23 | 1 | -1/+1 | |
| | | | | | | ||||||
* | | | | | | Add note about neovim's built in language server | Ashkan Kiani | 2019-11-23 | 1 | -0/+5 | |
|/ / / / / | ||||||
* | | | / | Add rust-analyzer-expand-macro function for Emacs | Florian Diebold | 2019-11-20 | 1 | -1/+1 | |
| |_|_|/ |/| | | | ||||||
* | | | | Add document in features.md | Edwin Cheng | 2019-11-19 | 1 | -0/+4 | |
| |_|/ |/| | | ||||||
* | | | Merge #2165 | bors[bot] | 2019-11-15 | 1 | -0/+21 | |
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | 2165: ra_assists: Add add_new assist r=matklad a=rep-nop Adds a new assist to autogenerate a new fn based on the selected struct, excluding tuple structs and unions. The fn will inherit the same visibility as the struct and the assist will attempt to reuse any existing impl blocks that exist at the same level of struct. Not marking this as closing #1644 since there's a part 2 of adding autocompletion for when someone starts typing `[pub ]fn new(...` Co-authored-by: Wesley Norris <[email protected]> | |||||
| * | | Add add_new assist | Wesley Norris | 2019-11-09 | 1 | -0/+21 | |
| |/ | | | | | | | | | | | | | Adds a new assist to autogenerate a new fn based on the selected struct, excluding tuple structs and unions. The fn will inherit the same visibility as the struct and the assist will attempt to reuse any existing impl blocks that exist at the same level of struct. | |||||
* / | Implement postfix completions feature flag | Greg | 2019-11-12 | 1 | -0/+2 | |
|/ | ||||||
* | move all assists to use generated docs | Aleksey Kladov | 2019-10-27 | 2 | -17/+17 | |
| | ||||||
* | use new api for flip_trait_bound assist | Aleksey Kladov | 2019-10-27 | 1 | -0/+12 | |
| | ||||||
* | document almost all assists | Aleksey Kladov | 2019-10-27 | 2 | -174/+119 | |
| | ||||||
* | document some more assists | Aleksey Kladov | 2019-10-27 | 2 | -84/+93 | |
| | ||||||
* | use unicode bar for drawing the cursor | Aleksey Kladov | 2019-10-26 | 1 | -13/+16 | |
| | ||||||
* | support range selection in assist docs | Aleksey Kladov | 2019-10-26 | 1 | -0/+17 | |
| | ||||||
* | check style for assist docs | Aleksey Kladov | 2019-10-26 | 1 | -4/+53 | |
| | ||||||
* | use correct spacing for enum pattern | Aleksey Kladov | 2019-10-26 | 1 | -1/+1 | |
| | ||||||
* | document a couple of assists | Aleksey Kladov | 2019-10-26 | 2 | -51/+37 | |
| | ||||||
* | generate more assists docs | Aleksey Kladov | 2019-10-25 | 2 | -91/+137 | |
| | ||||||
* | sublime: hint where feature flags would go | Jacob | 2019-10-25 | 1 | -1/+5 | |
| | ||||||
* | auto-generate assists docs and tests | Aleksey Kladov | 2019-10-25 | 2 | -1/+27 | |
| |