language_injection.md: note InjectionBackgroundSuppressor

This commit is contained in:
Yann Cébron 2023-10-19 17:11:14 +02:00
parent bf046c5518
commit ab22b5a21c

View File

@ -1,7 +1,7 @@
# Language Injection
<!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. --> <!-- Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Language Injection
<link-summary>Injecting a language into different language elements.</link-summary> <link-summary>Injecting a language into different language elements.</link-summary>
<tldr> <tldr>
@ -309,3 +309,7 @@ Now, inside the editor the injected portion will work as expected where foo is t
## Formatting ## Formatting
To control delegation of formatting to containing file, implement [`InjectedFormattingOptionsProvider`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/InjectedFormattingOptionsProvider.java) and register in `com.intellij.formatting.injectedOptions` extension point (_2022.3_). To control delegation of formatting to containing file, implement [`InjectedFormattingOptionsProvider`](%gh-ic%/platform/code-style-api/src/com/intellij/formatting/InjectedFormattingOptionsProvider.java) and register in `com.intellij.formatting.injectedOptions` extension point (_2022.3_).
## Injection Highlighting
To suppress highlighting from <control>Code | Injected language fragment</control> setting in <ui-path>Preferences | Editor | Color Scheme | General</ui-path>, injection host must implement [`InjectionBackgroundSuppressor`](%gh-ic%/platform/analysis-impl/src/com/intellij/psi/impl/source/tree/injected/InjectionBackgroundSuppressor.java).