diff --git a/topics/intro/content_updates.md b/topics/intro/content_updates.md index f5306a63a..b22b07fb9 100644 --- a/topics/intro/content_updates.md +++ b/topics/intro/content_updates.md @@ -12,6 +12,12 @@ See [GitHub Changelog](https://github.com/JetBrains/intellij-sdk-docs/commits/ma ## 2024 +### May +{may-24} +Minor Changes and Additions +: +- How to support [grammar checks](spell_checking.md#grammar-checks) provided by Grazie plugin in custom languages. + ### April {april-24} diff --git a/topics/reference_guide/custom_language_support/spell_checking.md b/topics/reference_guide/custom_language_support/spell_checking.md index 8fc0e3a54..bf6c944a2 100644 --- a/topics/reference_guide/custom_language_support/spell_checking.md +++ b/topics/reference_guide/custom_language_support/spell_checking.md @@ -110,3 +110,27 @@ Register in `com.intellij.spellchecker.dictionary.runtimeDictionaryProvider` ext **Example** [`PyPackagesDictionary`](%gh-ic%/python/src/com/jetbrains/python/packaging/PyPackagesDictionary.kt) + +## Grammar Checks (Grazie plugin) +{id="grammar-checks"} + +[Grazie Lite](https://plugins.jetbrains.com/plugin/12175-grazie-lite) (bundled) and +[Grazie Pro](https://plugins.jetbrains.com/plugin/16136-grazie-pro/) +plugins provide intelligent spelling and grammar checks for all texts. + +To use the API mentioned below, add a [dependency](plugin_dependencies.md) on plugin ID `tanvd.grazi`. + +### `TextExtractor` + +To define how to extract natural language text from PSI, implement +[`TextExtractor`](%gh-ic%/plugins/grazie/src/main/kotlin/com/intellij/grazie/text/TextExtractor.java) +and register in `com.intellij.grazie.textExtractor` extension point. + +**Example:** [`JavaTextExtractor`](%gh-ic%/plugins/grazie/java/src/main/kotlin/com/intellij/grazie/ide/language/java/JavaTextExtractor.java) + +### `ProblemFilter` + +To ignore specific reported problems, implement [`ProblemFilter`](%gh-ic%/plugins/grazie/src/main/kotlin/com/intellij/grazie/text/ProblemFilter.java) +registered in `com.intellij.grazie.problemFilter` extension point. + +**Example:** [`JavadocProblemFilter`](%gh-ic%/plugins/grazie/java/src/main/kotlin/com/intellij/grazie/ide/language/java/JavadocProblemFilter.java)