Emacs multiple line methods (syntax highlighting error)
1 reply
Tue, 2011-03-22, 11:24
mads379
Joined: 2010-06-07,
Hi, Is the scala mode for emacs still maintained? When a method spans multiple lines like this: def parseArguments(template: Template, arguments: List[String]): Validation[Error, Environment] = { .... } The second line doesn't get highlighted. Thanks,Mads Hartmann Jensen
Re: Emacs multiple line methods (syntax highlighting error)
I once took a swag at that one awhile back. While I was able to tweak some indentation issues, so for example the second line would properly indent, I never fully solved multiline highlight issue successfully. Use of a 'val' or a 'var' before the "arguments" parameter does trigger correct highlighting. Their absence results in the highlighting vanishing for the parameter.
So I guess I have a partial solution. FWIW, I did not walk away feeling the problem itself is intractable for being pretty close most of the time using emacs textual approach to these things. I guess these days with emacs having a conduit via ensime's communication with the incremental compiler giving type and src position data a perfect solution is now possible with some effort.
My old imperfect tweaks to the base scala mode.https://github.com/RayRacine/scamacs/tree/master/scala
On Tue, Mar 22, 2011 at 6:24 AM, Mads Hartmann Jensen <mads379@gmail.com> wrote:
Hi, Is the scala mode for emacs still maintained? When a method spans multiple lines like this: def parseArguments(template: Template, arguments: List[String]): Validation[Error, Environment] = {
.... } The second line doesn't get highlighted. Thanks,Mads Hartmann Jensen
-- The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane. - Marcus Aurelius
So I guess I have a partial solution. FWIW, I did not walk away feeling the problem itself is intractable for being pretty close most of the time using emacs textual approach to these things. I guess these days with emacs having a conduit via ensime's communication with the incremental compiler giving type and src position data a perfect solution is now possible with some effort.
My old imperfect tweaks to the base scala mode.https://github.com/RayRacine/scamacs/tree/master/scala
On Tue, Mar 22, 2011 at 6:24 AM, Mads Hartmann Jensen <mads379@gmail.com> wrote:
--
The object of life is not to be on the side of the majority, but to escape finding oneself in the ranks of the insane. - Marcus Aurelius