by kisetsu
Customize colors for JVM annotations (@...) and comments (//, /* */, <!-- -->).
★ 1 stars↓ 51 downloadsUpdated 19d agoMIT
Java Annotation Highlight
Customize colors for JVM-style annotations (@Override) and comments (//, /* */, <!-- -->) in Obsidian code blocks and notes.
This plugin does not collect telemetry, show ads, or make network requests. All highlighting runs locally.
Features
- Custom colors for
@annotations(e.g.@Autowired,@Bean) - Custom colors for
//line comments and/* */block comments - Optional HTML comments:
<!-- ... -->in note body and html/xml fences - Works in Reading view and Editing (source / live preview)
- Configurable languages (default:
java, kotlin, scala, groovy) - Independent toggles for reading view vs editing view
Demo
```java
@Component
public class Demo {
// line comment
/* block comment */
@Bean
public String hello() {
return "hi";
}
}
```
<!-- section note -->
Settings
Open Settings → Java Annotation Highlight:
| Setting | Description |
|---|---|
| Reading view | Apply colors to rendered / preview code blocks |
| Editing view | Apply colors while editing fences / markdown |
| Languages | Comma-separated fence languages (kt → kotlin) |
| Annotation color | Color for @Name |
| Comment color | Color for // and /* */ |
| HTML comments | Color <!-- --> using the comment color |
Install
From Community Plugins (after approval)
- Settings → Community plugins → Browse
- Search Java Annotation Highlight
- Install and enable
Manual install
- Build:
npm install npm run build - Copy into your vault:
<Vault>/.obsidian/plugins/java-annotation-highlight/ ├── main.js ├── manifest.json └── styles.css - Enable the plugin in Community plugins.
Development
npm install
npm run dev
Compatibility
- Requires Obsidian 1.13.0+ (declarative settings API).
- No telemetry, ads, or network access.
License
MIT © 悸節
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.