editors

Discussion about all editors used for Clojure/ClojureScript
2015-12-01T00:02:40.000090Z

anybody good with .tmLanguage parsers? I'm trying to figure out if I can capture a regex followed by a single #include

2015-12-01T00:03:38.000091Z

sort of like this without an end pattern

special_form:
    name: meta.special_form.clojure
    begin: ([\`\~\'\@]+)
    end: ()
    contentName: meta.specialized.clojure
    patterns:
    - include: '#sexpr'

eraserhd 2015-12-01T05:07:41.000092Z

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

2015-12-01T06:22:12.000095Z

and the .YAML-tmLanguage https://gist.github.com/selfsame/4e56db234a88590bd640

eraserhd 2015-12-01T16:24:28.000097Z

@selfsame: What are .tmLanguage parsers? (I’ve been thinking about syntax highlighting for a bit.)

timgilbert 2015-12-01T16:31:11.000098Z

That's the format TextMate uses, also importable to Sublime Text

2015-12-01T16:36:50.000101Z

@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

eraserhd 2015-12-01T16:39:54.000102Z

Maybe… but I’m not sure I want to have to define every single language :simple_smile: The YAML format looks kind of clean.

eraserhd 2015-12-01T16:43:21.000103Z

Ugh, the XML version is pretty gross 😕

2015-12-01T16:48:45.000104Z

AAAPackageDev plugin for sublimeText can convert between xml, YAML, and JSON.

2015-12-01T16:50:15.000105Z

I was under the impression there were other standard syntax formats but not seeing any

eraserhd 2015-12-01T16:57:42.000106Z

github’s “linguist” uses these tmLanguage files, but pygments does not.

2015-12-01T17:04:11.000107Z

Hmm emacs and vim seem to have their own internal thing, maybe tmLanguage is a good spec

2015-12-01T17:09:03.000108Z

(for converting to edn and adapting for the parsing lib of your choice)

eraserhd 2015-12-01T17:13:11.000109Z

I think so, more and more. It seems to be organized well enough to support the kind of region-identifying stuff I’ll need.

eraserhd 2015-12-01T17:13:31.000110Z

And it seems like I can make a more general version of the “rewrite-clj” lib that’s based on these.

eraserhd 2015-12-01T17:14:06.000111Z

(and I don’t have to make them all!)

2015-12-01T17:20:43.000112Z

@eraserhd cool ping me if you start putting something together :simple_smile:

eraserhd 2015-12-01T17:47:24.000113Z

@selfsame: Sure!