Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Highlight symbols in function position #29

Open
NoahTheDuke opened this issue Jan 9, 2023 · 7 comments
Open

Highlight symbols in function position #29

NoahTheDuke opened this issue Jan 9, 2023 · 7 comments
Labels
highlighting Affects syntax highlighting

Comments

@NoahTheDuke
Copy link

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?

@esciafardini
Copy link

@NoahTheDuke do you mean you are able to syntax highlight

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

???

@esciafardini
Copy link

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

@NoahTheDuke
Copy link
Author

No, like (some-func 1 2 3)

@esciafardini
Copy link

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

@NoahTheDuke
Copy link
Author

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

@axvr
Copy link
Member

axvr commented Feb 24, 2023

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.

@axvr axvr added the highlighting Affects syntax highlighting label Jun 23, 2023
@NoahTheDuke
Copy link
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
Labels
highlighting Affects syntax highlighting
Projects
None yet
Development

No branches or pull requests

3 participants