Part the first
In a hybrid clj/cljs project, when I create a new namespace in the ClojureScript section of the source paths, Cursive suggests making a .clj file, not .cljs. I can imagine improving this by adding a few heuristics to guess the filetype like:
- Use whatever Kind the user last selected (perhaps scoped to this source path)
- Suggesting file type that majority of sibling files are
- If a previous source path is /clj or /cljs then choosing that
- Looking at :cljsbuild/project.clj settings (I'm using bare clojurescript build scripts so this wouldn't apply in my case)
- If Cursive can't figure it out then just defaulting to .clj (as it seems to now)
- Perhaps other heuristics too
It's quite possible I'm doing something wrong and this is meant to be automatic, I checked the docs and couldn't see anything about it though. There's also lots of ambiguity and dynamicism in how people structure projects so this might be too complex. Also it's a pretty minor point.
Part the second
The other possibility would be to detect when people intend a cljs file to be created from the extension. Currently if I type

I get

If Cursive just detected that I typed .cljs it could change the Kind to ClojureScript, but people could change it back if they actually wanted handlers/cljs.clj.
Part the third
I'm also aware that up and down arrows change the type and maybe I should just use them instead :)
Part the first
In a hybrid clj/cljs project, when I create a new namespace in the ClojureScript section of the source paths, Cursive suggests making a .clj file, not .cljs. I can imagine improving this by adding a few heuristics to guess the filetype like:
It's quite possible I'm doing something wrong and this is meant to be automatic, I checked the docs and couldn't see anything about it though. There's also lots of ambiguity and dynamicism in how people structure projects so this might be too complex. Also it's a pretty minor point.
Part the second
The other possibility would be to detect when people intend a cljs file to be created from the extension. Currently if I type
I get
If Cursive just detected that I typed .cljs it could change the Kind to ClojureScript, but people could change it back if they actually wanted
handlers/cljs.clj.Part the third
I'm also aware that up and down arrows change the type and maybe I should just use them instead :)