mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-28 18:43:01 +00:00
Add the rust-analyzer.semanticHighlighting.comments.enable configuration value
This commit is contained in:
parent
21614ed2d3
commit
d106d41fbc
9 changed files with 157 additions and 19 deletions
|
|
@ -382,6 +382,13 @@ config_data! {
|
|||
/// Exclude tests from find-all-references and call-hierarchy.
|
||||
references_excludeTests: bool = false,
|
||||
|
||||
/// Use semantic tokens for comments.
|
||||
///
|
||||
/// In some editors (e.g. vscode) semantic tokens override other highlighting grammars.
|
||||
/// By disabling semantic tokens for comments, other grammars can be used to highlight
|
||||
/// their contents.
|
||||
semanticHighlighting_comments_enable: bool = true,
|
||||
|
||||
/// Inject additional highlighting into doc comments.
|
||||
///
|
||||
/// When enabled, rust-analyzer will highlight rust source in doc comments as well as intra
|
||||
|
|
@ -1968,6 +1975,7 @@ impl Config {
|
|||
pub fn highlighting_config(&self) -> HighlightConfig {
|
||||
HighlightConfig {
|
||||
strings: self.semanticHighlighting_strings_enable().to_owned(),
|
||||
comments: self.semanticHighlighting_comments_enable().to_owned(),
|
||||
punctuation: self.semanticHighlighting_punctuation_enable().to_owned(),
|
||||
specialize_punctuation: self
|
||||
.semanticHighlighting_punctuation_specialization_enable()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue