emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Semantic font-lock for Java


From: Anand Tamariya
Subject: Re: Semantic font-lock for Java
Date: Wed, 22 Jan 2020 11:22:05 +0530

Also want to highlight some noticeable features in the comparison pic:

  1. Static variables and functions are highlighted differently.

  2. Constant variables are highlighted differently.

  3. Not only the declaration, but the usages are highlighted also.

  4. Package is highlighted correctly.

Post image

On Tue, Jan 21, 2020 at 5:09 PM Anand Tamariya <address@hidden> wrote:

I've been working on Semantic font-lock for Java using CEDET Semantic infrastructure which uses Wisent incremental parsing under the hood. So far the results look promising. Hence I'm sharing the same.

Post image

It uses following face definitions for highlighting.

(defvar semantic-format-face-alist
  `( (function . font-lock-function-name-face)
     (variable . font-lock-variable-name-face)
     (type . font-lock-type-face)
     ;; These are different between Emacsen.
     (include . ,'font-lock-constant-face)
     (package . , 'font-lock-constant-face)
     ;; Not a tag, but instead a feature of output
     (label . font-lock-string-face)
     (comment . font-lock-comment-face)
     (keyword . font-lock-keyword-face)
     (annotation . font-lock-builtin-face)
     (constant . bold)
     ;;(member . font-lock-member-face)
     (abstract . italic)
     (static . italic)
     (documentation . font-lock-doc-face)
     )

Code: Emacs customization (https://gitlab.com/atamariya/emacs/tree/dev)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]