Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Fix color name | Aleksey Kladov | 2019-12-31 | 1 | -1/+1 | |
| | ||||||
* | Drop obsolete color configurations | Aleksey Kladov | 2019-12-31 | 1 | -288/+1 | |
| | ||||||
* | Add tsfmt | Aleksey Kladov | 2019-12-30 | 1 | -1/+3 | |
| | ||||||
* | Remove prettier | Aleksey Kladov | 2019-12-30 | 1 | -8/+1 | |
| | ||||||
* | Run prettier on all files | Aleksey Kladov | 2019-12-30 | 1 | -1/+1 | |
| | ||||||
* | Add prettier | Aleksey Kladov | 2019-12-30 | 1 | -6/+13 | |
| | ||||||
* | Rename extension.ts -> main.ts | Aleksey Kladov | 2019-12-30 | 1 | -1/+1 | |
| | ||||||
* | Add rollup | Aleksey Kladov | 2019-12-30 | 1 | -7/+12 | |
| | ||||||
* | Minimize TypeScript build | Aleksey Kladov | 2019-12-30 | 1 | -35/+8 | |
| | ||||||
* | Merge #2061 | bors[bot] | 2019-12-29 | 1 | -1/+64 | |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | 1 | -16/+125 | |
| |\ | ||||||
| * \ | Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵ | Seivan Heidari | 2019-11-20 | 1 | -0/+5 | |
| |\ \ | | | | | | | | | | | | | feature/themes | |||||
| * | | | Readding jsonc parser because of ↵ | Seivan Heidari | 2019-11-18 | 1 | -1/+2 | |
| | | | | | | | | | | | | | | | | https://github.com/rust-analyzer/rust-analyzer/pull/2061\#discussion_r344783715 | |||||
| * | | | Vscode wasn't running the linter automatically so ran `npm run fix` - wonder ↵ | Seivan Heidari | 2019-11-09 | 1 | -1/+1 | |
| | | | | | | | | | | | | | | | | if it's related to `tslint` being deprecated. | |||||
| * | | | * Adding scope mapping configuration manifest in `package.json` | Seivan Heidari | 2019-11-04 | 1 | -1/+63 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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" } ``` | |||||
* | | | | Keep VSCode config mostly backwards compatible | Emil Lauridsen | 2019-12-25 | 1 | -20/+14 | |
| | | | | ||||||
* | | | | Configuration plumbing for cargo watcher | Emil Lauridsen | 2019-12-25 | 1 | -30/+10 | |
| | | | | ||||||
* | | | | Remove cargo-watch from vscode extension. | Emil Lauridsen | 2019-12-25 | 1 | -11/+1 | |
| |_|/ |/| | | | | | | | | Still keeps tests around for reference when porting them to rust | |||||
* | | | Update to latest packages | kjeremy | 2019-12-20 | 1 | -8/+8 | |
| | | | ||||||
* | | | Merge #2583 | bors[bot] | 2019-12-17 | 1 | -1/+2 | |
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2583: Use prettier settings in ts-lint r=matklad a=edwin0cheng This PR add `tslint-plugin-prettier` extension in ts-lint, which "runs prettier rules as tslint rules." and remove `quotemark` from ts-lint and let prettier to handle it. And also fix #2515 Co-authored-by: Edwin Cheng <[email protected]> | |||||
| * | | | use pretter settings in ts-lint | Edwin Cheng | 2019-12-17 | 1 | -1/+2 | |
| | | | | ||||||
* | | | | Merge #2568 | bors[bot] | 2019-12-17 | 1 | -0/+5 | |
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2568: Add option to disable all-targets. r=matklad a=pftbest Can be useful in embedded. Co-authored-by: Vadzim Dambrouski <[email protected]> | |||||
| * | | | | Add option to disable all-targets. | Vadzim Dambrouski | 2019-12-15 | 1 | -0/+5 | |
| |/ / / | | | | | | | | | | | | | Can be useful in embedded. | |||||
* | | | | Merge #2571 | bors[bot] | 2019-12-17 | 1 | -1/+1 | |
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2571: Fixed a typo in settings r=matklad a=omerbenamram @lnicola found a typo in the description for one of the settings introduced in #2559. Co-authored-by: Omer Ben-Amram <[email protected]> | |||||
| * | | | | Fixed a typo | Omer Ben-Amram | 2019-12-16 | 1 | -1/+1 | |
| |/ / / | | | | | | | | | | | | | thanks @lnicola | |||||
* / / / | Default to client watching on VS Code | Aleksey Kladov | 2019-12-17 | 1 | -1/+1 | |
|/ / / | ||||||
* | | | Properly format json | Oliver Scherer | 2019-12-15 | 1 | -9/+11 | |
| | | | ||||||
* | | | Add a rudimentary json regex to get at information like `endLine` | Oliver Scherer | 2019-12-15 | 1 | -0/+20 | |
| | | | ||||||
* | | | Merge branch 'refs/heads/master' into feature/granular-scopes | Omer Ben-Amram | 2019-12-14 | 1 | -0/+15 | |
|\ \ \ | ||||||
| * | | | Enable `allFeatures` by default and fix lints | oxalica | 2019-12-13 | 1 | -1/+1 | |
| | | | | ||||||
| * | | | Support setting cargo features | oxalica | 2019-12-13 | 1 | -0/+15 | |
| | | | | ||||||
* | | | | removed `type.alias` | Omer Ben-Amram | 2019-12-14 | 1 | -0/+9 | |
| | | | | ||||||
* | | | | added decorations | Omer Ben-Amram | 2019-12-14 | 1 | -1/+55 | |
|/ / / | ||||||
* | | | Code: enable prettier trailing commas | Laurențiu Nicola | 2019-12-09 | 1 | -1/+2 | |
| | | | ||||||
* | | | Add rollup sourcemap and fix launch.json | Edwin Cheng | 2019-12-08 | 1 | -0/+1 | |
| | | | ||||||
* | | | Code: bump deps | Laurențiu Nicola | 2019-12-08 | 1 | -13/+13 | |
| | | | ||||||
* | | | Code: check whether the LSP binary is in PATH | Laurențiu Nicola | 2019-12-08 | 1 | -0/+1 | |
| |/ |/| | ||||||
* | | Use DocumentProvider instead of Hover | Edwin Cheng | 2019-11-19 | 1 | -0/+5 | |
|/ | ||||||
* | document feature flags | Aleksey Kladov | 2019-10-25 | 1 | -5/+0 | |
| | ||||||
* | Merge #1980 | bors[bot] | 2019-10-23 | 1 | -0/+5 | |
|\ | | | | | | | | | | | | | | | 1980: Shorten inline type hints r=matklad a=detrumi Implements #1946 Co-authored-by: Wilco Kusee <[email protected]> | |||||
| * | Make inlay hint length configurable | Wilco Kusee | 2019-10-18 | 1 | -0/+5 | |
| | | ||||||
* | | Adds config option for cargo-watch `--ignore` flag | Roberto Vidal | 2019-10-17 | 1 | -0/+5 | |
| | | ||||||
* | | Add rust-analyzer.showWorkspaceLoadedNotification to package.json | Laurențiu Nicola | 2019-10-17 | 1 | -0/+5 | |
| | | ||||||
* | | Merge #1984 | bors[bot] | 2019-10-10 | 1 | -2/+2 | |
|\ \ | | | | | | | | | | | | | | | | | | | | | | 1984: Bump rollup and vsce r=matklad a=kjeremy I got sick of the vsce warning on install and noticed that rollup was also out of date. Co-authored-by: kjeremy <[email protected]> | |||||
| * | | Bump rollup and vsce | kjeremy | 2019-10-10 | 1 | -2/+2 | |
| |/ | ||||||
* / | engine.vscode and @types/vscode should match | kjeremy | 2019-10-10 | 1 | -1/+1 | |
|/ | ||||||
* | add rollup bundler for vscode extension | JasperDeSutter | 2019-09-23 | 1 | -4/+8 | |
| | ||||||
* | Update minimal required vscode version to 1.37 | Lucas Spits | 2019-09-10 | 1 | -1/+1 | |
| | ||||||
* | add option to disable notify | Aleksey Kladov | 2019-09-06 | 1 | -0/+5 | |
| | ||||||
* | Switch to `@types/vscode` and `vscode-test` | Bastian Köcher | 2019-08-26 | 1 | -4/+7 | |
| | | | | | | The old `vscode` package is outdated and it is recommened to switch to these two new packages. This also solves a problem of a missing `.d.ts` for `vscode` in Nixos. |