aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
Commit message (Collapse)AuthorAgeFilesLines
...
* vscode: moved to getters as per matkladVeetaha2020-02-141-23/+17
|
* vscode: reordered config constructor before methodsVeetaha2020-02-131-5/+6
|
* vscode: redesigned config with simplicity and Dart extension config ↵Veetaha2020-02-131-190/+68
| | | | implementation in mind
* vscode: filter out arm linux from using prebuilt binariesVeetaha2020-02-111-3/+20
|
* vscode: refactor inverted ternaries to if statements as per @matkladVeetaha2020-02-091-1/+3
|
* vscode: rename raLspServer variable to langServerVeetaha2020-02-081-3/+3
|
* vscode: refactor commentVeetaha2020-02-081-1/+1
|
* vscode: refactor platform artifact name query to switch statement, move ↵Veetaha2020-02-081-36/+53
| | | | BinarySource union variants into a namespace
* vscode: amended config to use binary from globalStoragePath, added ui for ↵Veetaha2020-02-081-7/+49
| | | | downloading
* Merge #3024bors[bot]2020-02-051-1/+1
|\ | | | | | | | | | | | | | | 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-051-1/+1
| |
* | vscode: yet another refactor commitVeetaha2020-02-041-2/+2
|/
* Improve readabilitymemoryruins2020-01-151-14/+11
|
* Display vscode message after changing cargo-watch optionsmemoryruins2020-01-151-0/+19
|
* Refactor configAleksey Kladov2019-12-311-6/+4
|
* Drop needless pubsAleksey Kladov2019-12-311-14/+14
|
* Drop support for legacy colorizationAleksey Kladov2019-12-311-4/+0
|
* Switch impure functional style to pure imperativeAleksey Kladov2019-12-311-2/+0
|
* Reformat with tsfmtAleksey Kladov2019-12-301-2/+2
|
* Privatize highlightingAleksey Kladov2019-12-301-3/+0
|
* Merge #2061bors[bot]2019-12-291-5/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/themesSeivan Heidari2019-12-231-24/+89
| |\
| * | Vscode wasn't running the linter automatically so ran `npm run fix` - wonder ↵Seivan Heidari2019-11-091-3/+2
| | | | | | | | | | | | if it's related to `tslint` being deprecated.
| * | * Adding scope mapping configuration manifest in `package.json`Seivan Heidari2019-11-041-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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" } ```
| * | Merge branch 'master' into feature/themesSeivan Heidari2019-10-311-7/+0
| |\ \
| * | | Introducing a Scopes Mapper to map from RA scopes to TextMate scopes with ↵Seivan Heidari2019-10-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Proof of concept theming and 'tokenColorCustomizations' support.Seivan Heidari2019-10-241-1/+5
| | | |
* | | | Keep VSCode config mostly backwards compatibleEmil Lauridsen2019-12-251-11/+20
| | | |
* | | | Configuration plumbing for cargo watcherEmil Lauridsen2019-12-251-44/+15
| |_|/ |/| |
* | | Merge #2568bors[bot]2019-12-171-0/+9
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Dambrouski2019-12-151-0/+9
| | | | | | | | | | | | | | | | Can be useful in embedded.
* | | | Default to client watching on VS CodeAleksey Kladov2019-12-171-2/+2
|/ / /
* | | Enable `allFeatures` by default and fix lintsoxalica2019-12-131-9/+16
| | |
* | | Support setting cargo featuresoxalica2019-12-131-13/+57
| | |
* | | Code: enable prettier trailing commasLaurențiu Nicola2019-12-091-11/+11
| | |
* | | Allow disabling sysrootAleksey Kladov2019-12-091-0/+5
| |/ |/| | | | | Might be helpful for debugging
* | document feature flagsAleksey Kladov2019-10-251-7/+0
|/
* Merge #1980bors[bot]2019-10-231-0/+6
|\ | | | | | | | | | | | | | | 1980: Shorten inline type hints r=matklad a=detrumi Implements #1946 Co-authored-by: Wilco Kusee <[email protected]>
| * Make inlay hint length configurableWilco Kusee2019-10-181-0/+6
| |
* | Adds config option for cargo-watch `--ignore` flagRoberto Vidal2019-10-171-1/+10
|/
* add option to disable notifyAleksey Kladov2019-09-061-0/+4
|
* implement feature flagsAleksey Kladov2019-08-221-0/+4
|
* allow to exclude certain files and directoriesAleksey Kladov2019-08-061-0/+4
|
* Show type decoratorsKirill Bulatov2019-07-251-0/+5
|
* Add noUnusedLocals to VsCode tsconfigRyan Cumming2019-06-291-1/+0
| | | | | | `tslint` doesn't catch this because TypeScript has had this check builtin since 2.9. However, it's disabled by default so right now nothing is checking for unused variables.
* Fix code after "apply suggestions"Aleksei Sidorov2019-06-241-8/+8
|
* Apply suggestions from code reviewAleksey Sidorov2019-06-241-2/+2
| | | Co-Authored-By: Aleksey Kladov <[email protected]>
* Fix tslintsAleksei Sidorov2019-06-241-2/+2
|
* Introduce cargo-watch.check-commandAleksei Sidorov2019-06-241-1/+12
|
* make LRU cache configurableAleksey Kladov2019-06-121-0/+4
|