This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-28
Channels
- # announcements (1)
- # beginners (205)
- # calva (30)
- # cider (5)
- # cljdoc (25)
- # cljs-dev (2)
- # clojure (119)
- # clojure-brasil (5)
- # clojure-conj (7)
- # clojure-europe (2)
- # clojure-hamburg (7)
- # clojure-italy (14)
- # clojure-nl (2)
- # clojure-russia (13)
- # clojure-spec (79)
- # clojure-uk (58)
- # clojurescript (54)
- # core-logic (2)
- # core-matrix (2)
- # cursive (40)
- # datascript (2)
- # datomic (18)
- # duct (2)
- # emacs (14)
- # figwheel (3)
- # figwheel-main (7)
- # fulcro (30)
- # funcool (1)
- # graphql (10)
- # jobs (1)
- # juxt (13)
- # lumo (1)
- # mount (1)
- # off-topic (56)
- # other-languages (2)
- # pedestal (17)
- # powderkeg (2)
- # protorepl (2)
- # re-frame (10)
- # reagent (1)
- # reitit (7)
- # ring-swagger (10)
- # schema (2)
- # shadow-cljs (70)
- # spacemacs (13)
- # specter (4)
- # sql (9)
- # tools-deps (26)
@tony.kay The action is Code->Generate…, you can check the key it’s bound to in the menu.
@polymeris Only by me doing it, sadly. Is there one in particular you’re interested in?
The other issue is that presumably you want these replaced at certain points in function/macro calls - that part would have to be extensible too.
currently they are just stuff like
(def fragment-shader-source
"
void main() {
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}")
Hmm, I see - that’s tricky because it’s hard to attach to anything, i.e. there’s no way for Cursive to know that that string is GLSL.
A simple workaround would be to use something like (deffragment my-fragment "<GLSL code>")
class Scratch {
public static void main(String[] args) {
//language=GLSL
String foo = "void main() { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); }";
}
}
Like thisIt allows you to choose to either just inject the language (I suppose it stores it in .idea
somewhere) or to add the comment
Hmm, I wonder how that works. The problem is that I don’t know how it identifies an individual string in the source code without the comment.
The (deffragment ....
idea would be cool as well (since it doesn't contaminate the code with cursive-specific comments), but the annotation might be more flexible
In fact I think idea comes with some predefined functions for some languages where it will guess the injected lang