aboutsummaryrefslogtreecommitdiff
path: root/editors
Commit message (Collapse)AuthorAgeFilesLines
...
* Restore internal applySourceChange commandAleksey Kladov2019-12-302-0/+9
|
* Use Ctx in highlighterAleksey Kladov2019-12-301-5/+10
|
* Reformat with tsfmtAleksey Kladov2019-12-305-33/+34
|
* Add tsfmtAleksey Kladov2019-12-302-1/+67
|
* Remove prettierAleksey Kladov2019-12-302-14/+1
|
* Privatize highlightingAleksey Kladov2019-12-308-48/+54
|
* Don't request inline hints repeatedlyAleksey Kladov2019-12-302-10/+26
|
* Retry inlay hints on content modified errorAleksey Kladov2019-12-303-7/+17
|
* Thoughtlessly copy-paste a fix to a problem I don't understandAleksey Kladov2019-12-301-1/+2
|
* Refactor inlay hintsAleksey Kladov2019-12-301-103/+67
|
* Add config to CtxAleksey Kladov2019-12-304-9/+10
|
* Encapsulate highlighting activationAleksey Kladov2019-12-304-35/+24
|
* Encapsulate inlay hints activationAleksey Kladov2019-12-302-38/+39
|
* Dead codeAleksey Kladov2019-12-302-18/+2
|
* status is not a commandAleksey Kladov2019-12-302-13/+13
|
* Hints are not commandsAleksey Kladov2019-12-303-4/+2
|
* Move all commands to ctxAleksey Kladov2019-12-303-22/+26
|
* Minor refactorAleksey Kladov2019-12-301-9/+7
|
* Refactor runablesAleksey Kladov2019-12-303-67/+66
|
* Move expand macro to the new contextAleksey Kladov2019-12-305-75/+53
|
* CleanupAleksey Kladov2019-12-302-11/+11
|
* Cleanup importsAleksey Kladov2019-12-305-8/+12
|
* Refactor show syntax tree actionAleksey Kladov2019-12-308-134/+116
|
* Run prettier on all filesAleksey Kladov2019-12-307-23/+18
|
* Move parentModule to the new CtxAleksey Kladov2019-12-303-37/+37
|
* Refactor applySourceChangeAleksey Kladov2019-12-307-89/+68
|
* Move joinLines to the new CtxAleksey Kladov2019-12-303-21/+21
|
* Fix server config mispell in vscode extensionEmil Lauridsen2019-12-301-1/+1
|
* Move matching brace to new CtxAleksey Kladov2019-12-304-32/+35
|
* Run prettierAleksey Kladov2019-12-302-20/+16
|
* Add prettierAleksey Kladov2019-12-302-6/+19
|
* More second command to CtxAleksey Kladov2019-12-304-11/+14
|
* Start new ctx moduleAleksey Kladov2019-12-304-20/+63
|
* SimplifyAleksey Kladov2019-12-301-32/+29
|
* Rename extension.ts -> main.tsAleksey Kladov2019-12-304-4/+4
|
* Minimize typescript CIAleksey Kladov2019-12-301-1/+1
|
* Add rollupAleksey Kladov2019-12-305-35/+751
|
* Minimize TypeScript buildAleksey Kladov2019-12-309-1839/+14
|
* Trim down launch configurationsAleksey Kladov2019-12-293-62/+0
|
* Merge #2061bors[bot]2019-12-296-12/+358
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]>
| * Fix ↵Seivan Heidari2019-12-234-16/+20
| | | | | | | | | | | | https://github.com/rust-analyzer/rust-analyzer/pull/2061#discussion_r348716036 Fix https://github.com/rust-analyzer/rust-analyzer/pull/2061/files/68a5ff050faf514e9d122212a66703ca8ce66ab7#r361019340
| * Merge branch 'master' into feature/themesSeivan Heidari2019-12-2336-699/+1186
| |\
| * \ Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵Seivan Heidari2019-11-281-0/+0
| |\ \ | | | | | | | | | | | | feature/themes
| * \ \ Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵Seivan Heidari2019-11-213-13/+30
| |\ \ \ | | | | | | | | | | | | | | | feature/themes
| * \ \ \ Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵Seivan Heidari2019-11-204-0/+102
| |\ \ \ \ | | | | | | | | | | | | | | | | | | feature/themes
| * | | | | Readding jsonc parser because of ↵Seivan Heidari2019-11-183-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | https://github.com/rust-analyzer/rust-analyzer/pull/2061\#discussion_r344783715
| * | | | | Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into ↵Seivan Heidari2019-11-181-1/+8
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | feature/themes
| * | | | | | Probably a better approach to check for values before assigning lest we ↵Seivan Heidari2019-11-101-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | replace something.
| * | | | | | Vscode wasn't running the linter automatically so ran `npm run fix` - wonder ↵Seivan Heidari2019-11-096-106/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | if it's related to `tslint` being deprecated.
| * | | | | | See if this satisfies the CI.Seivan Heidari2019-11-051-5/+5
| | | | | | |