Skip to content

imenu doesn't support spec #74

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
rrudakov opened this issue Apr 7, 2025 · 1 comment · Fixed by #75
Closed

imenu doesn't support spec #74

rrudakov opened this issue Apr 7, 2025 · 1 comment · Fixed by #75

Comments

@rrudakov
Copy link
Contributor

rrudakov commented Apr 7, 2025

Currently it's not possible to navigate to a spec definition using imenu with clojure-ts-mode, because only symbols are considered as definitions. So we see only one entry with the name Anonymous:

Image

In clojure-mode imenu supports specs.

Would it be useful to define a special category for specs like this?

Image

We can check if def has a s namespace to distinguish normal variables from specs (another option is to check if first item of a def is a keyword).

@rrudakov
Copy link
Contributor Author

rrudakov commented Apr 7, 2025

Also we might consider highlighting s/def with font-lock-keyword-face just as other def forms.

rrudakov added a commit to rrudakov/clojure-ts-mode that referenced this issue Apr 8, 2025
rrudakov added a commit to rrudakov/clojure-ts-mode that referenced this issue Apr 10, 2025
rrudakov added a commit to rrudakov/clojure-ts-mode that referenced this issue Apr 10, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant