emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/scala-mode 27efa44 019/217: updated README, added LICENSE


From: ELPA Syncer
Subject: [nongnu] elpa/scala-mode 27efa44 019/217: updated README, added LICENSE
Date: Sun, 29 Aug 2021 11:30:36 -0400 (EDT)

branch: elpa/scala-mode
commit 27efa440cffd20b1382eb42b0dcc66b742ed26c9
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalainen@yahoo.com>

    updated README, added LICENSE
---
 LICENSE |  7 ++++++
 README  | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 2 files changed, 84 insertions(+), 12 deletions(-)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..5466088
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,7 @@
+Copyright (C) 2012 Heikki Vesalainen
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.
\ No newline at end of file
diff --git a/README b/README
index 2d2283b..f1452d4 100644
--- a/README
+++ b/README
@@ -1,24 +1,89 @@
-A new scala-mode for emacs.
+# scala-mode2 -- A new scala-mode for emacs
 
-The current scala-mode with for emacs that comes scala-dist is beyond
-repair. It is overly complex and hard to maintain.
+This is a new scala major mode for emacs. It is a complete rewrite based on 
scala language specification 2.9.
 
-This new major mode intends to be simple, yet provide the following:
-- indenting
-- highlighting
+The mode intends to provide the basic emacs support, including
+- indenting of code, comments and multi-line strings
 - motion commands
+- highlighting
 
-The mode will target scala code written in a functinal style.
+Currently the indenting of code has been finalized. Highlighting is
+under work. No scala specific motion commands have been added, but
+standard emacs motions work ofcourse.
 
-Check out Example.scala to see how it indents.
+## Indenting modes
 
-Special thanks for valuable feedback:
-- Eiríkr Åsheim (aka Erik Osheim)
+The indenting engine has two modes for handling run-on lines. The
+'reluctant' (default) mode is geared toward a general style of coding
+and the 'eager' for strictly functional style. A third mode called
+'operators' is between the two.  You can configure the mode from the
+mode customization menu (run M-x customize-mode).
+
+The difference between the modes is how they treat run-on lines. For
+example, the 'eager' mode will indent 'map' in the following code
+
+```
+val x = List(1, 2, 3)
+  map(x => x + 1)
+```
+
+The 'operators' and 'eager' modes will indent the second row in the
+following code:
+
+```
+val x = 20 
+  + 21
+```
+
+The 'reluctant' mode (default) will not indent the line in either
+case. 
+
+You can use empty lines in 'eager' mode to stop it from indenting a
+line. For example
+
+```
+val x = foo("bar")
+           ("zot", "kala") // indented as curry
+
+val y = foo("bar")
+
+("zot", "kala")
+```
+
+However, in all three modes pressing tab repeatedly on a line
+will toggle between the modes.
 
 TODO:
 - indent scaladoc left margin correctly
 - indenting a row should remove trailing whitespace and converts tabs to spaces
-- highlight number (decimal, octal, hex, double, float) literals as constants
 - indent and fill multi-line strings with margin correctly
+
+## Motion
+
+Basic emacs motion will work. Use 
+
+M-C-f or M-C-Right to move forward one expression
+M-C-b or M-C-Left to move back one expression
+
+TODO: 
+
+- movement commands to move to previous or next definition (val,
+var, def, class, trait, object)
+
+## Code highlighting
+
+Highlighting code is still a work in progress. Feedback on how it
+should work is welcomed as issues to this github project.
+
+TODO:
 - highlight headings and annotations inside scaladoc specially (use underline 
for headings)
-- highlight variables in string interpolation
\ No newline at end of file
+- highlight variables in string interpolation (scala 2.10)
+
+## Other features
+- supports multi-line strings
+- highlights only properly formatted string and character constants
+- fills scaladoc comments properly (TODO row comments)
+
+Special thanks for valuable feedback:
+- Eiríkr Åsheim (aka Erik Osheim)
+- Seth Tisue
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]