Fork me on GitHub
#cursive
<
2021-10-24
>
emccue00:10:44

If I make a custom data reader for css, could we make intelliJ do syntax highlight in the string?

cfleming04:10:11

Define “we” 🙂

cfleming04:10:37

The short answer is: it’s possible, but tricky.

AJ Jaro12:10:01

@U3JH98J4R is that for a certain file type? You can create a custom editor for that file type and that editor can have your syntax highlighting, yes

emccue15:10:23

@UGMAVSMUM I was thinking of looking into css directly in cljs files

emccue15:10:00

so instead of page.css and page.cljs having

#css "
.some-class {
   color: red;
}
"

(defn component []
  [p.some-class "hi"])

🆒 1
emccue15:10:07

on the scope of “features i wish we had” - ability to declare macros that introduce new symbols is still more directly useful - but there might be some compile checking of css classes that we could get from something like this

emccue16:10:33

And "we" in this context is the engineers I work with

wotbrew08:10:34

Oh I would love this for SQL/GraphQL

cfleming20:10:21

To answer the original question - I don’t know very much about language injection, but I believe there’s a mechanism by which users can configure where languages should be injected. I’ll try to figure this out, and I might be able to make it flexible enough for that case.

emccue00:10:47

I.E.

#css "
p {
  color: blue
}
"

GGfpc16:10:45

How do I run all tests in a package with cursive?