Skip to content

Commit 37fb408

Browse files
committed
[en] add notes for oniguruma-native
1 parent 62bc06e commit 37fb408

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

docs/guide/getting-started.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ Check the table below to get more information about the modules.
126126
| language-java | A simple implementation for Java lexer-based highlighting and identifier auto-completion |
127127
| language-textmate | An advanced highlighter for the editor. It can be used to load TextMate language bundles and themes. The internal implementation of TextMate is from [tm4e](https://github.com/eclipse/tm4e) |
128128
| language-treesitter | Offer [tree-sitter](https://tree-sitter.github.io/tree-sitter/) support for editor. This can be used to parse the code to an AST fast and incrementally, which is helpful for accurate highlighting and providing completions. Note that this module only provides incremental parsing and highlighting. Thanks to Java bindings [android-tree-sitter](https://github.com/AndroidIDEOfficial/android-tree-sitter/) |
129+
| oniguruma-native | Regexp library for language-textmate. Not used by default. |
129130

130131
### 🚧Snapshot Builds
131132

docs/guide/using-language.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,17 @@ GrammarRegistry.getInstance().loadGrammars(
186186

187187
:::
188188

189+
#### Optional Step
190+
191+
TextMate uses Joni by default. Joni is a regexp library implemented in pure Java so during regexp matching, a bunch of objects are allocated and this
192+
add pressure for ART GC.
193+
194+
We introduced native [oniguruma](https://github.com/kkos/oniguruma) implementation to match regexps since version `0.24.0`, you may include `oniguruma-native` module to enable it. This brings faster highlighting speed and less JVM heap allocations.
195+
196+
Also, oniguruma is the regexp library used by VSCode, so with the library included you may use more TextMate bundles from VSCode.
197+
198+
Our [forked oniguruma](https://github.com/project-sora/oniguruma) currently supports up to Unicode 17.0.0.
199+
189200
#### Setup Editor
190201
Set color scheme for the editor. If `TextMateColorScheme` is not applied to the editor, the colors of syntax-highlight result from TextMate will be transparent.
191202
::: code-group

0 commit comments

Comments
 (0)