Skip to content

Highlight symbols in function position #29

Open

Description

@NoahTheDuke

I have a custom syntax regex for highlighting symbols that are in function position in a list. I've added it to clojureTop before the built-in functions list so they can be highlighted distinctly if desired. Would y'all be interested in a PR for this?

Activity

  1. esciafardini commented on Feb 19, 2023

    @esciafardini

    @NoahTheDuke do you mean you are able to syntax highlight

    (defn the-fn-name []
    (+ 3 4))

    ???

  2. esciafardini commented on Feb 19, 2023

    @esciafardini

    if so, I would be very very very very interested in seeing it

  3. NoahTheDuke commented on Feb 19, 2023

    @NoahTheDuke
    Author

    No, like (some-func 1 2 3)

  4. esciafardini commented on Feb 19, 2023

    @esciafardini

    @NoahTheDuke that would be so great. Is your repo publicly available?

  5. NoahTheDuke commented on Feb 22, 2023

    @NoahTheDuke
    Author

    Here's my after/syntax/clojure.vim file from my dotfiles.

  6. axvr commented on Feb 24, 2023

    @axvr
    Member

    Hi, sorry for the really late response, I am definitely interested in this feature.

    I'm still trying to decide how we want to do this function/macro position syntax highlighting in future as we've had a similar discussion previously: #25.

    Currently my thinking is to provide options to toggle the following options:

    1. Enable/disable built-in highlighting of clojure.core symbols.
      • Disabling this will provide a clean base for more advanced tools to do this highlighting themselves accurately with understanding of the code and shadowing.
    2. Enable/disable highlighting of symbols in function position. (In this case, your code @NoahTheDuke could be very useful for us.)

    Ideally both could be enabled at the same time. I would be interested in hearing any opinions on the above concept.

    Unfortunately I haven't been able to find much time to work on Clojure.vim recently so for this to happen, it will either have to be contributed by someone or myabe I'll implement it at some undetermined date long in the future.

  7. NoahTheDuke commented on Mar 12, 2024

    @NoahTheDuke
    Author

    I've fully switched to using nvim-treesitter for my highlighting, which includes queries that set this. So I personally don't need it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    highlightingAffects syntax highlighting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions