-
-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support string interpolation syntax highlighting (and maybe even linting) #443
Comments
I've totally missed I think this could prove a bit tricky. But there are ways to allow for subsyntaxes in the tmLanguage definitions... So for instance I think it might be possible to include the clojure syntax inside those |
with JS I used string interpolation a lot, so it was one of the first things I looked for in Clojure 😅 I much prefer to write out why do you think it would not be possible if there's already working solutions with js string interpolation? for example, here's how gql queries look like for me using apollo-vscode: what's even cooler is it integrates with |
it'd be great if Calva could provide a basic interface for interpolation highlighting/lighting that could be extended for custom formats (i.e. i'd be cool if the |
I didn't say not possible. 😄 I just don't think it is easy. But might be not so hard for someone who's experienced with tmLanguage grammar. To make it user extendible is probably in the very tricky realm, however. |
It's from a library, though, right? Considering it's age, I don't think it's seriously proposed for inclusion in Clojure. |
What is |
feel free to close this issue - opened it when I was learning Clojure since I used string interpolation a lot coming from JS, but just had to relearn some habits :) @bpringe looks like it's in clojure core.incubator: https://clojure.github.io/core.incubator/clojure.core.strint-api.html |
Thanks for the info! Learned something new 😄 |
for example, in the snippet below, it'd be great if
name
could have the same syntax highlighting as other variables:taking this a step further, it'd be great if there was a config that allowed us to extend the string interpolation syntax highlighting for custom formats, based on the symbol that is calling it.
i.e. for graphql
or for sql
currently apollo supports this for
gql
string literals in apollo-vscodeanother example is styled-components which supports this for
css
string literals in their vscode-styled-componentsthis would go a long way in integrating Clojure with other languages, since one of the main reason for converting everything into maps and
edn
formats seems to be lack of editor supportThe text was updated successfully, but these errors were encountered: