triple quoted strings, presentation compiler for syntax highlighting?

16 views
Skip to first unread message

Rob Nikander

unread,
Dec 25, 2012, 9:39:52 AM12/25/12
to ens...@googlegroups.com
Hi,

I just downloaded ensime and am testing it out on some simple files. I notice that triple quoted strings do not parse and highlight correctly in emacs:

    val s = """foo " bar """
    // it thinks this is inside a string

I assume this is a bug in scala mode. Do you know if the Scala presentation compiler has an API for getting this kind of syntactic/parse information? Could emacs use that, instead of its regex hacks, for parsing and syntax highlighting? 

Rob


Seth Tisue

unread,
Dec 25, 2012, 12:22:20 PM12/25/12
to ens...@googlegroups.com
On Tue, Dec 25, 2012 at 9:39 AM, Rob Nikander <rob.ni...@gmail.com> wrote:
> I just downloaded ensime and am testing it out on some simple files. I
> notice that triple quoted strings do not parse and highlight correctly in
> emacs:
> val s = """foo " bar """
> // it thinks this is inside a string
> I assume this is a bug in scala mode.

This is a scala-mode thing, not an ENSIME thing per se.

Instead of the old scala-mode, try the new scala-mode2 instead:
https://github.com/hvesalai/scala-mode2

It handles your triple-quote example fine.

--
Seth Tisue | Northwestern University | http://tisue.net
developer, NetLogo: http://ccl.northwestern.edu/netlogo/
Reply all
Reply to author
Forward
0 new messages