[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/scala-mode 49bd528 045/217: working on README
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/scala-mode 49bd528 045/217: working on README |
Date: |
Sun, 29 Aug 2021 11:30:40 -0400 (EDT) |
branch: elpa/scala-mode
commit 49bd5287ad4db651b7e9f62a5ed1fe3a503ff46a
Author: Heikki Vesalainen <heikkivesalainen@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalainen@yahoo.com>
working on README
---
README.md | 72 +++++++++++++++++++++++++++++++++------------------------------
1 file changed, 38 insertions(+), 34 deletions(-)
diff --git a/README.md b/README.md
index 7eef185..561d8c0 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# scala-mode2 — A new scala-mode for emacs
-This is a new scala major mode for emacs. It is a complete rewrite based on
scala language specification 2.9.
+This is a new scala major mode for emacs. It is a complete rewrite
+based on scala language specification 2.9.
The mode intends to provide the basic emacs support, including
- indenting of code, comments and multi-line strings
@@ -13,7 +14,7 @@ standard emacs motions work ofcourse.
## Setting the mode up for use
-1. Download the files to a local directory, you can use the 'git'
+1. Download the files to a local directory, you can use the *git*
command. This will create a directory called scala-mode2.
```
> git git://github.com/hvesalai/scala-mode2.git
@@ -25,38 +26,38 @@ command. This will create a directory called scala-mode2.
(require 'scala-mode)
```
-3. That's it. Next you can start emacs and take look at the
-customization menu for scala-mode.
+3. That's it. Next you can start emacs and take a look at the
+customization menu for scala-mode (use **M-x** *customize-mode* when
+in scala-mode or use **M-x** *customize-variable* to customize one
+variable).
-Free emacs tip: if you are using emacs from a text terminal and you
-are having trouble with colors, try setting the customization variable
-'frame-background-mode' to 'dark' (use M-x customize-variable).
+Free emacs tip: if you are using emacs from a text terminal with dark
+background and you are having trouble with colors, try setting the
+customization variable *frame-background-mode* to *dark* (use **M-x**
+*customize-variable*).
## Indenting modes
-Where four developers meet, there are four opinions on how code should
+*Where four developers meet, there are four opinions on how code should
be indented. Luckily scala-mode already supports 2^4 different
-ways of indenting.
-
-You can configure the scala-mode indentation from the mode
-customization menu (use M-x customize-mode when in scala-mode).
+ways of indenting.*
### Run-on lines (scala-indent:default-run-on-strategy)
The indenting engine has three 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.
+*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.
The difference between the modes is how they treat run-on lines. For
-example, the 'eager' mode will indent 'map' in the following code
+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
+The *operators* and *eager* modes will indent the second row in the
following code:
```
@@ -64,10 +65,10 @@ val x = 20
+ 21
```
-The 'reluctant' mode (default) will not indent the line in either
+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
+You can use empty lines in *eager* mode to stop it from indenting a
line. For example
```
@@ -84,9 +85,9 @@ will toggle between the modes.
### Value expressions (scala-indent:indent-value-expression)
-When this variable is set to non-nil (default), blocks in value
-expressions will be indented one extra step to make the 'val', 'var'
-or 'def' stand out. For example:
+When this variable is set to *t* (default), blocks in value
+expressions will be indented one extra step to make the *val*, *var*
+or *def* stand out. For example:
```
val x = try {
@@ -98,7 +99,7 @@ val x = try {
}
```
-When the variable is set to nil, the same will indent as:
+When the variable is set to *nil*, the same will indent as:
```
val x = try {
@@ -112,7 +113,7 @@ val x = try {
### Parameter lists (scala-indent:align-parameters)
-When this variable is set to non-nil (default), parameters and run-on
+When this variable is set to *t* (default), parameters and run-on
lines in parameter lists will always align under and acording to the
first parameter.
@@ -124,7 +125,7 @@ val y = List( "Alpha", "Bravo",
"Charlie" )
```
-When the variable is set to nil, the same will be as:
+When the variable is set to *nil*, the same will be as:
```
val x = equals(List(1,2,3) map (x =>
@@ -136,7 +137,7 @@ val y = List( "Alpha", "Bravo",
### Forms (scala-indent:align-forms)
-When this variable is set to non-nil (default), `if`, `for` and `try`
+When this variable is set to *t* (default), *if*, *for* and *try*
forms are aligned.
```
@@ -155,7 +156,7 @@ val xs = for (i <- 1 to 10)
yield i
```
-When the variable is set to nil, the same will be as:
+When the variable is set to *nil*, the same will be as:
```
val x = if (kala)
@@ -175,9 +176,9 @@ val xs = for (i <- 1 to 10)
## Motion
-Basic emacs motion will work as expected. The forward-sexp and
-backward-sexp (M-C-f, M-C-b) motion commands will move over reserved
-words, literals, ids and lists.
+Basic emacs motion will work as expected. The *forward-sexp* and
+*backward-sexp* (**M-C-f**, **M-C-b**) motion commands will move over
+reserved words, literals, ids and lists.
## Code highlighting
@@ -185,18 +186,21 @@ Highlighting code is still a work in progress. Feedback
on how it
should work is welcomed as issues to this github project.
## Other features
-- supports multi-line strings
+- supports multi-line strings both in highlight and movement
- highlights only properly formatted string and character constants
-- fills scaladoc comments properly (TODO row comments)
+- fills scaladoc comments properly (**M-q**)
- indenting a code line removes trailing whitespace
## Future work
-- indent scaladoc left margin correctly
+- indent scaladoc left margin correctly (currently scaladoc is not
+ indented at all)
+- fill row comments after code properly (currently produces error)
- indent and fill multi-line strings with margin correctly
- movement commands to move to previous or next definition (val,
var, def, class, trait, object)
-- highlight headings and annotations inside scaladoc specially (use underline
for headings)
+- highlight headings and annotations inside scaladoc specially (use
+ underline for headings)
- highlight variables in string interpolation (scala 2.10)
All suggestions and especially pull requests are welcomed in github
- [nongnu] elpa/scala-mode f61e32d 047/217: Update README.md, (continued)
- [nongnu] elpa/scala-mode f61e32d 047/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 0991658 051/217: Fixes #17: string syntax, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 3174f4c 048/217: Update README.md clone to be a valid command., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode a78716d 046/217: Update README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode ac13b94 061/217: post-self-insert-hooks, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 2201b1c 092/217: Interact nicely with global-font-lock-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 98d22a5 099/217: Added programming languages to README.md code, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 453c012 106/217: fixed bug in string escapes marking, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 6116127 042/217: Updated README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 11a710d 044/217: Correct annotation highlighting., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 49bd528 045/217: working on README,
ELPA Syncer <=
- [nongnu] elpa/scala-mode d357a77 038/217: New 'scala-indent:align-parameters' customization variable, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode af0e387 053/217: Fixes #18: highlight escapes in strings after chars, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode bc446e7 120/217: sbt support is now in sbt-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 597d421 145/217: Seems the imenu var needs to be set in a very local way., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c154f16 139/217: better join-line and fixup-whitespace, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode e277378 143/217: WIP on end-of-defun and beggining of defun which should make writing imenu functionality much easier., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode 811494f 155/217: Support nesting of classes in imenu index creation function., ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode d4885ac 159/217: Use [[:space:]] instead of literal space in syntax end/beggining of, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode c5ab657 160/217: Merge pull request #82 from IvanMalison/support_imenu, ELPA Syncer, 2021/08/29
- [nongnu] elpa/scala-mode b8e835f 161/217: scala-mode:goto-start-of-code close #90, ELPA Syncer, 2021/08/29