aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/scopes.ts
Commit message (Collapse)AuthorAgeFilesLines
* Vscode wasn't running the linter automatically so ran `npm run fix` - wonder ↵Seivan Heidari2019-11-091-24/+36
| | | | if it's related to `tslint` being deprecated.
* * Adding scope mapping configuration manifest in `package.json`Seivan Heidari2019-11-041-32/+32
| | | | | | | | | | | | | | * 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" } ```
* Making loadColors more readable by monading all the things.Seivan Heidari2019-10-311-23/+16
|
* Adding better debugging for testing themes missing tags and which scopes ↵Seivan Heidari2019-10-311-40/+47
| | | | | | didn't map. Since this file is no longer being pushed upstream, double down on monads.
* Introducing a Scopes Mapper to map from RA scopes to TextMate scopes with ↵Seivan Heidari2019-10-271-9/+9
| | | | | | | | | | | | | | | | | | | | | | fallbacks. Current scopes defined: ``` ['keyword.unsafe', ['storage.modifier', 'keyword.other', 'keyword.control']], ['function', ['entity.name.function']], ['parameter', ['variable.parameter']], ['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.mut', ['variable']], ['field', ['variable.object.property']], ['module', ['entity.name.section']] ``` Need to complement with further fallbacks as some themes fail.
* Refactor how themes are found in packages without relying on parsing JSONC.Seivan Heidari2019-10-261-21/+17
| | | | | However, there is still an issue where themes could have been defined in JSONC - but so far with testing very few of them actually do. The issue was in loading packages and now we're letting VSCode tackle that. Fix: https://github.com/rust-analyzer/rust-analyzer/pull/2061#discussion_r339015610
* Making it clear we're using default settings.Seivan Heidari2019-10-241-11/+7
|
* Fixing linting issues, but also hides failures. Has to be a better approach ↵Seivan Heidari2019-10-241-3/+3
| | | | to error handling.
* Only loading `tokenColorCustomizations` once.Seivan Heidari2019-10-241-4/+4
|
* Proof of concept theming and 'tokenColorCustomizations' support.Seivan Heidari2019-10-241-0/+142