@@ -342,42 +342,6 @@ config_data! {
342
342
/// available on a nightly build.
343
343
rustfmt_rangeFormatting_enable: bool = "false" ,
344
344
345
- /// Inject additional highlighting into doc comments.
346
- ///
347
- /// When enabled, rust-analyzer will highlight rust source in doc comments as well as intra
348
- /// doc links.
349
- semanticHighlighting_doc_comment_inject_enable: bool = "true" ,
350
- /// Whether the server is allowed to emit non-standard tokens and modifiers.
351
- semanticHighlighting_nonStandardTokens: bool = "true" ,
352
- /// Use semantic tokens for operators.
353
- ///
354
- /// When disabled, rust-analyzer will emit semantic tokens only for operator tokens when
355
- /// they are tagged with modifiers.
356
- semanticHighlighting_operator_enable: bool = "true" ,
357
- /// Use specialized semantic tokens for operators.
358
- ///
359
- /// When enabled, rust-analyzer will emit special token types for operator tokens instead
360
- /// of the generic `operator` token type.
361
- semanticHighlighting_operator_specialization_enable: bool = "false" ,
362
- /// Use semantic tokens for punctuation.
363
- ///
364
- /// When disabled, rust-analyzer will emit semantic tokens only for punctuation tokens when
365
- /// they are tagged with modifiers or have a special role.
366
- semanticHighlighting_punctuation_enable: bool = "false" ,
367
- /// When enabled, rust-analyzer will emit a punctuation semantic token for the `!` of macro
368
- /// calls.
369
- semanticHighlighting_punctuation_separate_macro_bang: bool = "false" ,
370
- /// Use specialized semantic tokens for punctuation.
371
- ///
372
- /// When enabled, rust-analyzer will emit special token types for punctuation tokens instead
373
- /// of the generic `punctuation` token type.
374
- semanticHighlighting_punctuation_specialization_enable: bool = "false" ,
375
- /// Use semantic tokens for strings.
376
- ///
377
- /// In some editors (e.g. vscode) semantic tokens override other highlighting grammars.
378
- /// By disabling semantic tokens for strings, other grammars can be used to highlight
379
- /// their contents.
380
- semanticHighlighting_strings_enable: bool = "true" ,
381
345
382
346
/// Show full signature of the callable. Only shows parameters if disabled.
383
347
signatureInfo_detail: SignatureDetail = "\" full\" " ,
@@ -575,6 +539,43 @@ config_data! {
575
539
joinLines_removeTrailingComma: bool = "true" ,
576
540
/// Join lines unwraps trivial blocks.
577
541
joinLines_unwrapTrivialBlock: bool = "true" ,
542
+
543
+ /// Inject additional highlighting into doc comments.
544
+ ///
545
+ /// When enabled, rust-analyzer will highlight rust source in doc comments as well as intra
546
+ /// doc links.
547
+ semanticHighlighting_doc_comment_inject_enable: bool = "true" ,
548
+ /// Whether the server is allowed to emit non-standard tokens and modifiers.
549
+ semanticHighlighting_nonStandardTokens: bool = "true" ,
550
+ /// Use semantic tokens for operators.
551
+ ///
552
+ /// When disabled, rust-analyzer will emit semantic tokens only for operator tokens when
553
+ /// they are tagged with modifiers.
554
+ semanticHighlighting_operator_enable: bool = "true" ,
555
+ /// Use specialized semantic tokens for operators.
556
+ ///
557
+ /// When enabled, rust-analyzer will emit special token types for operator tokens instead
558
+ /// of the generic `operator` token type.
559
+ semanticHighlighting_operator_specialization_enable: bool = "false" ,
560
+ /// Use semantic tokens for punctuation.
561
+ ///
562
+ /// When disabled, rust-analyzer will emit semantic tokens only for punctuation tokens when
563
+ /// they are tagged with modifiers or have a special role.
564
+ semanticHighlighting_punctuation_enable: bool = "false" ,
565
+ /// When enabled, rust-analyzer will emit a punctuation semantic token for the `!` of macro
566
+ /// calls.
567
+ semanticHighlighting_punctuation_separate_macro_bang: bool = "false" ,
568
+ /// Use specialized semantic tokens for punctuation.
569
+ ///
570
+ /// When enabled, rust-analyzer will emit special token types for punctuation tokens instead
571
+ /// of the generic `punctuation` token type.
572
+ semanticHighlighting_punctuation_specialization_enable: bool = "false" ,
573
+ /// Use semantic tokens for strings.
574
+ ///
575
+ /// In some editors (e.g. vscode) semantic tokens override other highlighting grammars.
576
+ /// By disabling semantic tokens for strings, other grammars can be used to highlight
577
+ /// their contents.
578
+ semanticHighlighting_strings_enable: bool = "true" ,
578
579
}
579
580
}
580
581
@@ -903,6 +904,25 @@ impl<'a> LocalConfigView<'a> {
903
904
join_assignments : self . local . joinLines_joinAssignments ,
904
905
}
905
906
}
907
+
908
+ pub fn highlighting_non_standard_tokens ( & self ) -> bool {
909
+ self . local . semanticHighlighting_nonStandardTokens
910
+ }
911
+
912
+ pub fn highlighting_config ( & self ) -> HighlightConfig {
913
+ HighlightConfig {
914
+ strings : self . local . semanticHighlighting_strings_enable ,
915
+ punctuation : self . local . semanticHighlighting_punctuation_enable ,
916
+ specialize_punctuation : self
917
+ . local
918
+ . semanticHighlighting_punctuation_specialization_enable ,
919
+ macro_bang : self . local . semanticHighlighting_punctuation_separate_macro_bang ,
920
+ operator : self . local . semanticHighlighting_operator_enable ,
921
+ specialize_operator : self . local . semanticHighlighting_operator_specialization_enable ,
922
+ inject_doc_comment : self . local . semanticHighlighting_doc_comment_inject_enable ,
923
+ syntactic_name_ref_highlighting : false ,
924
+ }
925
+ }
906
926
}
907
927
908
928
type ParallelCachePrimingNumThreads = u8 ;
@@ -1792,39 +1812,6 @@ impl Config {
1792
1812
}
1793
1813
}
1794
1814
1795
- pub fn highlighting_non_standard_tokens ( & self ) -> bool {
1796
- self . root_config . global . 0 . semanticHighlighting_nonStandardTokens
1797
- }
1798
-
1799
- pub fn highlighting_config ( & self ) -> HighlightConfig {
1800
- HighlightConfig {
1801
- strings : self . root_config . global . 0 . semanticHighlighting_strings_enable ,
1802
- punctuation : self . root_config . global . 0 . semanticHighlighting_punctuation_enable ,
1803
- specialize_punctuation : self
1804
- . root_config
1805
- . global
1806
- . 0
1807
- . semanticHighlighting_punctuation_specialization_enable ,
1808
- macro_bang : self
1809
- . root_config
1810
- . global
1811
- . 0
1812
- . semanticHighlighting_punctuation_separate_macro_bang ,
1813
- operator : self . root_config . global . 0 . semanticHighlighting_operator_enable ,
1814
- specialize_operator : self
1815
- . root_config
1816
- . global
1817
- . 0
1818
- . semanticHighlighting_operator_specialization_enable ,
1819
- inject_doc_comment : self
1820
- . root_config
1821
- . global
1822
- . 0
1823
- . semanticHighlighting_doc_comment_inject_enable ,
1824
- syntactic_name_ref_highlighting : false ,
1825
- }
1826
- }
1827
-
1828
1815
pub fn workspace_symbol ( & self ) -> WorkspaceSymbolConfig {
1829
1816
WorkspaceSymbolConfig {
1830
1817
search_scope : match self . root_config . global . 0 . workspace_symbol_search_scope {
0 commit comments