julia-emacs icon indicating copy to clipboard operation
julia-emacs copied to clipboard

Highlight string interpolation

Open yuyichao opened this issue 9 years ago • 6 comments

Ref https://github.com/JuliaLang/julia/issues/9025

ruby-mode does this, it would be nice to do it in julia-mode too. E.g. println("hello $user") should highlight $user differently.

Also https://github.com/JuliaLang/julia/issues/9025#issuecomment-63487240

This seems to require parsing arbitrary expressions. I would say not worth it just for this.

yuyichao avatar Mar 31 '16 14:03 yuyichao

I'm really for at least a simple variant of this. As long $ is not "escaping", it can be really confusing:

Selection_004

This actually prints the literal string , expr.head, ( (what I intended was of course $(...something...)().

phipsgabler avatar May 20 '20 15:05 phipsgabler

why not check how vscode do that ? it highlight string interpolation

kurt-steiner avatar Feb 15 '23 12:02 kurt-steiner

I think VS Code uses tree sitter. That's what we aim to do here too (cf #174 for progress).

tpapp avatar Feb 15 '23 13:02 tpapp

so how is the progress ?

kurt-steiner avatar Feb 15 '23 13:02 kurt-steiner

Try it out at https://github.com/ronisbr/julia-ts-mode.

tpapp avatar Feb 15 '23 14:02 tpapp

I have been trying julia-ts-mode out. This works.

chriselrod avatar Feb 15 '23 15:02 chriselrod