Fork me on GitHub

Woop , lots of Color options to try :D


i have something of an interesting question for y'all: i currently use the vim-clojure-static syntax file, but I've modified it to highlight all function calls and function definitions as functions. To do so, I had to remove the Sexp understanding and the superfluous parens/bracket/braces checking


Looking back over it, I feel like there's gotta be a way to combine these. It's really helpful to me to highlight function calls (that is, any string immediately after an open parenthesis), but I don't want to lose out on the other features


I've written it like this:

" Inline functions must defined first, so all other matches overwrite
syn region Paren transparent start='(' end=')'
syn match clojureInlineFunction "(\@<=\K\k\+" contains=Paren
syn match clojureParen "[()\[\]{}]"


Any syntax highlighting wizards in here?


I don't really understand what you're doing, hi link is what you want I think


sure, hi link is what I want to do at the end, but I have to match on a sequence of character to highlight those first


the goal is to match against \K\k+ immediately after a parenthesis without overwriting the match against clojureParen


Does \zs help?


not quite, but I think I solved it. Here we find the issue of doing something early last year and only now thinking "Why did I do that?" and then stumbling on the easy answer, lol


For some reason, last year when I tried this I struggled with matching against the function name after the parenthesis without matching against the parenthesis. I solved this by removing the clojureSexp and clojureSymbol matching


Turns out what I'm looking for is as "easy" as: syntax match clojureInlineFunction "(\@<=\v%([a-zA-Z!$&*_+=|<.>?-]|[^\x00-\x7F])+%(:?%([a-zA-Z0-9!#$%&*_+=|'<.>/?-]|[^\x00-\x7F]))*[#:]@<!" immediately after the clojureSymbol definition


it sadly reuses the expensive regex, so if anyone knows how to embed the clojureSymbol match into a match against open parens, I'm all ears