@exercism/codemirror-lang-kotlin 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +11 -28
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0.1
2
+
3
+ The README is restructured. This release is the first published from GitHub Actions, with npm provenance.
4
+
1
5
  ## 1.0.0
2
6
 
3
7
  This is Exercism's first release of the package, published as
package/README.md CHANGED
@@ -1,29 +1,9 @@
1
1
  # @exercism/codemirror-lang-kotlin [![NPM version](https://img.shields.io/npm/v/@exercism/codemirror-lang-kotlin.svg)](https://www.npmjs.org/package/@exercism/codemirror-lang-kotlin)
2
2
 
3
- This is Exercism's fork of
4
- [@codincod/codemirror-lang-kotlin](https://codeberg.org/reeven/codemirror-lang-kotlin),
5
- written by CodinCod. Exercism uses it for Kotlin in the editor on
6
- [exercism.org](https://exercism.org). Our changes are on the `main` branch,
7
- and the rest of this README is upstream's, apart from the sections on
8
- completion and the package name.
9
-
10
- The fork adds:
11
-
12
- - completion for the names declared in the file (functions, classes,
13
- properties, parameters, locals, loop variables and imports), offered only
14
- where each name is in scope.
15
- - snippets for functions, classes, `when`, loops, `if` and `try`.
16
- - completion for standard library functions. Functions called on their own are
17
- offered in ordinary positions, and functions called on a value are offered
18
- after a `.`. Nothing is offered inside strings or comments.
19
- - parsing of a primary constructor that starts on the line after the class
20
- name.
21
-
22
- ---
23
-
24
3
  This package implements Kotlin language support for the
25
4
  [CodeMirror](https://codemirror.net/) code editor, using a
26
5
  [Lezer](https://lezer.codemirror.net/) grammar written for this package.
6
+ Exercism uses it in the Kotlin editor on [exercism.org](https://exercism.org).
27
7
 
28
8
  CodeMirror 6 has never shipped Kotlin, and no Lezer grammar for it existed
29
9
  before this one. What gets used instead is the C-family stream mode ported from
@@ -32,11 +12,7 @@ above it can fold a function, indent a `when` or ask what the word under the
32
12
  cursor is. It also predates most of the language: string templates, raw
33
13
  strings, labels and annotations all come out as plain text.
34
14
 
35
- Written in part for [CodinCod](https://codincod.com/), a competitive coding
36
- platform, where it colours the editor people solve puzzles in.
37
-
38
- This code is released under an
39
- [MIT license](https://codeberg.org/reeven/codemirror-lang-kotlin/src/branch/master/LICENSE).
15
+ This code is released under an [MIT license](LICENSE).
40
16
 
41
17
  ## Install
42
18
 
@@ -72,8 +48,9 @@ const view = new EditorView({
72
48
  class member anywhere in its class, and a top level declaration anywhere in
73
49
  the file. A lambda with no parameters offers `it`.
74
50
 
75
- Neither source offers anything inside a string, a comment or a name being
76
- declared. `snippets` holds the snippets on their own.
51
+ Neither source offers anything inside a string, a comment, or where you
52
+ declare a new name. The snippets cover functions, classes, `when`, loops, `if` and
53
+ `try`. The package also exports them on their own as `snippets`.
77
54
 
78
55
  ## Coverage
79
56
 
@@ -84,6 +61,7 @@ typealiases, extension functions and properties, generics with variance and
84
61
  `suspend`, lambdas and trailing lambdas, callable references, destructuring,
85
62
  labels and labelled jumps, `when` with and without a subject, and every way
86
63
  Kotlin writes a string, including the multi dollar raw strings 2.2 added.
64
+ A primary constructor may start on the line after the class name.
87
65
 
88
66
  Measured against 6 589 Kotlin files from six open source projects (ktor,
89
67
  detekt, kotlinx.coroutines, Exposed, kotlinx.serialization and okio), which is
@@ -147,3 +125,8 @@ npm install # installs the dependencies and builds dist/
147
125
  npm run build # regenerates the parser and rebuilds dist/
148
126
  npm test # builds, then runs the tests
149
127
  ```
128
+
129
+ ## Contributing
130
+
131
+ Please read about how to [contribute to Exercism](https://exercism.org/docs/building).
132
+ Be sure to read the Exercism [Code of Conduct](https://exercism.org/docs/using/legal/code-of-conduct).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exercism/codemirror-lang-kotlin",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Kotlin language support for the CodeMirror code editor",
5
5
  "keywords": [
6
6
  "editor",
@@ -47,7 +47,7 @@
47
47
  "homepage": "https://github.com/exercism/codemirror-lang-kotlin",
48
48
  "repository": {
49
49
  "type": "git",
50
- "url": "https://github.com/exercism/codemirror-lang-kotlin"
50
+ "url": "git+https://github.com/exercism/codemirror-lang-kotlin.git"
51
51
  },
52
52
  "bugs": {
53
53
  "url": "https://github.com/exercism/codemirror-lang-kotlin/issues"