Skip to content

Inspector: (feature request) Syntax highlighting for the java methods #3546

Closed
@anonimitoraf

Description

@anonimitoraf

First of all, I want to say that the CIDER inspector is awesome! Can't live without it.

Is your feature request related to a problem? Please describe.

I find it hard to grok the methods list when they are long, have a lot of arguments and/or there are a lot of them.

For example:

image

Describe the solution you'd like

It would be nice to have Java syntax highlighting for the method names, arguments, etc.

Describe alternatives you've considered

I currently have a very (very) hacky solution that adds highlighting via overlays

(defvar ++ov-cider-inspector-keywords)
(defvar ++ov-cider-inspector-method-names)
(defvar ++ov-cider-inspector-method-param-lists)
(defun ++ov-cider-inspector ()
  (ov-clear)
  (let ((case-fold-search nil))
    (setq ++ov-cider-inspector-keywords (ov-regexp "^public\\|private\\|protected\\|final\\|native\\|static$")
     ++ov-cider-inspector-method-names (ov-regexp "\\([a-zA-Z0-9.$]\\)+(")
      ++ov-cider-inspector-method-param-lists (ov-regexp "(\\([][<>a-zA-Z0-9.$,]*\\))?")))
  (ov-set ++ov-cider-inspector-keywords 'face `(:foreground ,(doom-color 'magenta)))
  (ov-set ++ov-cider-inspector-method-names 'face `(:foreground ,(doom-color 'red)))
  (ov-set ++ov-cider-inspector-method-param-lists 'face `(:foreground "white")))

but even this gives me something very basic:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions