anybody good with
.tmLanguage parsers? I'm trying to figure out if I can capture a regex followed by a single #include
sort of like this without an end pattern
special_form: name: meta.special_form.clojure begin: ([\`\~\'\@]+) end: () contentName: meta.specialized.clojure patterns: - include: '#sexpr'
I’m prioritizing what the next most important feature is for #C0F4MB8AY - a lively vi written in clojure and (eventually) to be good at editing clojure. Votes would be welcome: https://trello.com/b/E2LFvVLy/avi
and the .YAML-tmLanguage https://gist.github.com/selfsame/4e56db234a88590bd640
@selfsame: What are .tmLanguage parsers? (I’ve been thinking about syntax highlighting for a bit.)
That's the format TextMate uses, also importable to Sublime Text
@eraserhd yeah it's an xml format for defining oniguruma regex patterns to assign scope tags to text, but if you're rolling your own editor I'm sure there are way better parsing ideas to choose from
Maybe… but I’m not sure I want to have to define every single language :simple_smile: The YAML format looks kind of clean.
Ugh, the XML version is pretty gross 😕
AAAPackageDev plugin for sublimeText can convert between xml, YAML, and JSON.
I was under the impression there were other standard syntax formats but not seeing any
github’s “linguist” uses these tmLanguage files, but pygments does not.
Hmm emacs and vim seem to have their own internal thing, maybe tmLanguage is a good spec
(for converting to edn and adapting for the parsing lib of your choice)
I think so, more and more. It seems to be organized well enough to support the kind of region-identifying stuff I’ll need.
And it seems like I can make a more general version of the “rewrite-clj” lib that’s based on these.
(and I don’t have to make them all!)
@eraserhd cool ping me if you start putting something together :simple_smile: