rundis / lt-snippets

Snippets/templates support for Light Table
MIT License
12 stars 4 forks source link

Namespace name normalization and safety/convenience mkdir #19

Closed clojens closed 9 years ago

clojens commented 9 years ago

Figured you may wanted a few simple fixes I put through. First time use of the plugin throws dump to console when fallback directory is not present and didn't check for it. Also I 'normalized' some of the namespace names, the lt- or lt_ is really unconventional. In order to prevent a lt.plugins.snippets.snippets, I renamed the latter to a mere snip (src/lt/plugins/snippets/snip.cljs) but left a few other anomalies in tact for now so to speak (behavior naming convention and underscore commands are typically not done either but this might impact experience by user preferences hard referencing those names - in other words: to remain backwards compatible, unless people eval strings in their settings but that is impossible to not break otherwise)

rundis commented 9 years ago

Cheers !

This plugin was one of my first adventures into clojure/clojurescript land. There are probably lots of less than idiomatic implementation details. Using the project name as the root namespace name is not totally unheard of, (clj-http springs to mind), but yeah it the exception rather than the norm. But the lt-snittets.clj file naming makes little sense and there is a lovely mix of underscore and hyphens (:

With regards to the directory issue, I actually have created a fix for that but hadn't pushed (and set the default to a sub dir of the user plugin instead)

If you feel inspired to submit addtional pr's in the future, leave the compiled stuff out. (I'll put a contribute section in the readme).

Cheers for you contribution. Glad to see that someone is using the plugin !