Rust-analyzer: Support other "color themes" in VS Code?

Created on 25 Feb 2019  路  4Comments  路  Source: rust-analyzer/rust-analyzer

The rust-analyzer syntax coloring looks great with the default (Dark) color theme in VS Code.

However, changing the VS Code color theme to pretty much anything else (via "Preferences: Color Theme") kind of breaks syntax coloring. In particular, all the "light" color themes are basically incompatible with rust-analyzer.

It seems like rust-analyzer is hard-coding some color values? Perhaps this behavior should be disabled by default, and optionally enabled by users in their settings.json?

Most helpful comment

Indeed! Here is the relevant rust-analyzer setting:
https://github.com/rust-analyzer/rust-analyzer/blob/master/editors/code/package.json#L148

In particular, adding this line to my settings.json does the trick:

"rust-analyzer.highlightingOn": false,

It seems to me like false should be default behavior. If not, maybe users should get a warning if they're not using the ZenBurn color theme?

I just realized this behavior is documented:
https://github.com/rust-analyzer/rust-analyzer/blob/master/editors/README.md#syntax-highlighting

All 4 comments

You can disable it in the settings

Indeed! Here is the relevant rust-analyzer setting:
https://github.com/rust-analyzer/rust-analyzer/blob/master/editors/code/package.json#L148

In particular, adding this line to my settings.json does the trick:

"rust-analyzer.highlightingOn": false,

It seems to me like false should be default behavior. If not, maybe users should get a warning if they're not using the ZenBurn color theme?

I just realized this behavior is documented:
https://github.com/rust-analyzer/rust-analyzer/blob/master/editors/README.md#syntax-highlighting

The ra highlighting makes the One Dark theme look very unpleasant as well. Setting the default to false would be much less jarring when first installing the plugin.

Default should now be false

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matklad picture matklad  路  4Comments

cole-miller picture cole-miller  路  3Comments

matklad picture matklad  路  3Comments

csmoe picture csmoe  路  4Comments

mehmooda picture mehmooda  路  3Comments