I’m using Anki (Version 25.02.6, Python 3.9.18, Qt 6.6.2, PyQt 6.6.1) to prepare for Data Structures and Algorithms (DSA). I’m trying to enable proper syntax highlighting for code snippets in my cards.
Initially, I installed the add-on “Syntax Highlighting for Code” (ID: 1463041493), but later realized it’s outdated and only supports very old Anki versions (2.1.0 as of 2018-10-07).
Then I installed “Syntax Highlighting (NG)” (ID: 566351439), which supports newer Anki versions (2.1.49–23.10.1+, last updated on 2024-07-19). It partially works:
- I enabled all options under Tools > Syntax Highlighting Options (all 4 checkboxes).
- I edited the config as follows to use the Monokai theme:
{
"hotkey": "Alt+s",
"limitToLangs": [],
"style": "monokai"
}
However, after saving this configuration, the code blocks just appear centered — there’s no syntax coloring or theme change visible. How can I get proper syntax highlighting (with colors) to work correctly using this add-on on my current Anki version?