Java Annotation Highlight

approvedunreviewed

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:

SettingDescription
Reading viewApply colors to rendered / preview code blocks
Editing viewApply colors while editing fences / markdown
LanguagesComma-separated fence languages (kt → kotlin)
Annotation colorColor for @Name
Comment colorColor for // and /* */
HTML commentsColor <!-- --> using the comment color

Install

From Community Plugins (after approval)

  1. Settings → Community plugins → Browse
  2. Search Java Annotation Highlight
  3. Install and enable

Manual install

  1. Build:
    npm install
    npm run build
    
  2. Copy into your vault:
    <Vault>/.obsidian/plugins/java-annotation-highlight/
      ├── main.js
      ├── manifest.json
      └── styles.css
    
  3. 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.