@valtzu/codemirror-lang-el 0.7.0 → 0.9.0

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 0.9
5
+ ---
6
+
7
+ * **BC BREAK:** Separate files are no longer included in the release (due to using `cm-buildhelper`)
8
+ * Tests are now in TypeScript too
9
+ * Autocomplete is now less aggressive
10
+ * Severity of "too many arguments" linter error was lowered from error -> warning
11
+
12
+ 0.8
13
+ ---
14
+
15
+ * Lint type of call arguments, if defined
16
+
4
17
  0.7
5
18
  ---
6
19
 
package/README.md CHANGED
@@ -6,19 +6,33 @@
6
6
 
7
7
  #### Linting
8
8
 
9
- ![image](https://github.com/valtzu/codemirror-lang-el/assets/652734/dd221b7d-7cc6-494f-9823-dae8a55eca03)
9
+ ![image](https://github.com/user-attachments/assets/7f7dca5b-51fb-41d0-bfe2-d64a6ac6bf85)
10
+
11
+ 1. Lint variable & function names
12
+ 1. Lint object properties & methods, even on expression result
13
+ 1. Lint argument count (only max. count checked for now)
14
+ 1. Lint argument types
10
15
 
11
16
  #### Autocompletion
12
17
 
13
18
  ![image](https://github.com/valtzu/codemirror-lang-el/assets/652734/a5a7bfdc-2869-4cbb-98f6-0abe361d55ba)
14
19
 
20
+ 1. Complete variables & functions
21
+ 1. Complete object properties & methods, even on expression result
22
+ 1. Complete operator keywords (like `starts with`)
23
+ 1. Show list of all available keywords (using `Ctrl+space` by default)
24
+
15
25
  #### Hover tooltip
16
26
 
17
27
  ![image](https://github.com/valtzu/codemirror-lang-el/assets/652734/3cfd7a49-4503-491c-972d-26d209ea26f3)
18
28
 
29
+ 1. Show description about a variable / function / object member / keyword
30
+
19
31
  #### Function argument hints
20
32
 
21
- ![image](https://github.com/valtzu/codemirror-lang-el/assets/652734/129eb510-a2aa-479e-b1de-dd0232b33299)
33
+ ![image](https://github.com/user-attachments/assets/571e056a-3947-4eda-b118-4f1850428fc4)
34
+
35
+ 1. Show function argument name when the editor cursor is exactly at starting position of the argument
22
36
 
23
37
  ---
24
38
 
@@ -50,27 +64,6 @@ yarn add @valtzu/codemirror-lang-el
50
64
 
51
65
  ```html
52
66
  <div id="editor"></div>
53
- <script type="importmap">
54
- {
55
- "imports": {
56
- "codemirror": "https://esm.sh/*codemirror@6.0.1",
57
- "@codemirror/state": "https://esm.sh/*@codemirror/state@6.4.1",
58
- "@codemirror/search": "https://esm.sh/*@codemirror/search@6.5.6",
59
- "@codemirror/autocomplete": "https://esm.sh/*@codemirror/autocomplete@6.9.0",
60
- "@codemirror/view": "https://esm.sh/*@codemirror/view@6.26.3",
61
- "@codemirror/commands": "https://esm.sh/*@codemirror/commands@6.2.5",
62
- "@codemirror/language": "https://esm.sh/*@codemirror/language@6.9.0",
63
- "@codemirror/lint": "https://esm.sh/*@codemirror/lint@6.4.1",
64
- "@lezer/lr": "https://esm.sh/*@lezer/lr@1.3.9",
65
- "@lezer/highlight": "https://esm.sh/*@lezer/highlight@1.1.6",
66
- "@lezer/common": "https://esm.sh/*@lezer/common@1.2.1",
67
- "style-mod": "https://esm.sh/*style-mod@4.1.2",
68
- "w3c-keyname": "https://esm.sh/*w3c-keyname@2.2.8",
69
- "crelt": "https://esm.sh/*crelt@1.0.6",
70
- "@valtzu/codemirror-lang-el": "https://esm.sh/*@valtzu/codemirror-lang-el@0.6.3"
71
- }
72
- }
73
- </script>
74
67
  <script type="module">
75
68
  import { EditorView, basicSetup } from "codemirror";
76
69
  import { acceptCompletion } from "@codemirror/autocomplete";
@@ -103,7 +96,7 @@ yarn add @valtzu/codemirror-lang-el
103
96
  { name: "user", type: ["User"], info: 'This is the user' },
104
97
  ],
105
98
  functions: [
106
- { name: "is_granted", args: ["subject", "object"], info: 'Check if subject has permission to the object', returnType: ['bool'] },
99
+ { name: "is_granted", args: [{name: "attributes", type: ["string"]}, {name: "object", type: ["object"], optional: true}], info: 'Check if subject has permission to the object', returnType: ['bool'] },
107
100
  ],
108
101
  })
109
102
  ],
@@ -115,4 +108,4 @@ yarn add @valtzu/codemirror-lang-el
115
108
 
116
109
  ### Contributing
117
110
 
118
- Contributions are accepted.
111
+ Contributions are welcome.