aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/config.ts
Commit message (Collapse)AuthorAgeFilesLines
...
* Extract client-side loggingAleksey Kladov2020-02-221-1/+4
|
* Rename config value for server PathAleksey Kladov2020-02-181-1/+1
|
* Rename the binary to rust-analyzerAleksey Kladov2020-02-181-4/+4
|
* Migrate to eslintAleksey Kladov2020-02-171-17/+17
|
* Merge #3181bors[bot]2020-02-171-1/+2
|\ | | | | | | | | | | | | | | 3181: Add ability to pass additional arguments to rustfmt. r=matklad a=Leonqn relates to #2848 Co-authored-by: Ilya Titkov <[email protected]>
| * Add arguments to rustfmtIlya Titkov2020-02-171-1/+2
| |
* | vscode: minor refactoringsVeetaha2020-02-171-1/+0
|/
* Merge #3162bors[bot]2020-02-161-1/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3162: Feature: vscode always downloads only the matching ra_lsp_server version r=matklad a=Veetaha I tried to separate logically connected changes into separate commits, so enjoy! Now TypeScript extension saves installed binary version in global state and always checks that the installed binary version equals the version of the TypeScript extension itself (to prevent version drifts). Also, changed `fetchLatestArtifactReleaseInfo()` to `fetchArtifactReleaseInfo()` that takes an optional release tag (when not specified fetches the latest release). The version without a release tag will be useful in the future when adding auto-checking for updates. I decided not to do `Download latest language server` command (I have stated the rationale for this in #3073) and let the extension itself decide which version of the binary it wants. This way the users will be able to get the latest `ra_lsp_server` binary after the approaching 2020-02-17 release, without having to manually delete the outdated one from `~/.config/Code/User/globalStorage/matklad.rust-analyzer`! Closes #3073 Co-authored-by: Veetaha <[email protected]>
| * vscode: add version and storage parameters to github binary sourceVeetaha2020-02-161-1/+16
| |
* | vscode: fix the default value for withSysrootVeetaha2020-02-161-1/+1
|/
* vscode: renamed langServer to serverVeetaha2020-02-141-6/+6
|
* make onConfigChange handler privateVeetaha2020-02-141-1/+1
|
* 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]>