devicetree-language-server 0.4.10 → 0.5.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.
- package/README.md +45 -44
- package/dist/server.js +205 -211
- package/package.json +58 -58
package/README.md
CHANGED
|
@@ -19,30 +19,31 @@ This extension needs a client that supports Configuration Capability. The format
|
|
|
19
19
|
|
|
20
20
|
```typescript
|
|
21
21
|
interface Context {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
ctxName?: string | number;
|
|
23
|
+
cwd?: string;
|
|
24
|
+
includePaths?: string[];
|
|
25
|
+
dtsFile: string;
|
|
26
|
+
overlays?: string[];
|
|
27
|
+
bindingType?: BindingType;
|
|
28
|
+
zephyrBindings?: string[];
|
|
29
|
+
deviceOrgTreeBindings?: string[];
|
|
30
|
+
deviceOrgBindingsMetaSchema?: string[];
|
|
31
|
+
lockRenameEdits?: string[];
|
|
32
|
+
compileCommands?: string;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
interface Settings {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
cwd?: string;
|
|
37
|
+
defaultBindingType?: BindingType;
|
|
38
|
+
defaultZephyrBindings?: string[];
|
|
39
|
+
defaultDeviceOrgTreeBindings?: string[];
|
|
40
|
+
defaultDeviceOrgBindingsMetaSchema?: string[];
|
|
41
|
+
defaultIncludePaths?: string[];
|
|
42
|
+
contexts?: Context[];
|
|
43
|
+
preferredContext?: string | number;
|
|
44
|
+
defaultLockRenameEdits?: string[];
|
|
45
|
+
autoChangeContext?: boolean;
|
|
46
|
+
allowAdhocContexts?: boolean;
|
|
46
47
|
}
|
|
47
48
|
```
|
|
48
49
|
|
|
@@ -78,18 +79,18 @@ EOF
|
|
|
78
79
|
|
|
79
80
|
```json
|
|
80
81
|
{
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
82
|
+
"devicetree": {
|
|
83
|
+
"cwd": "/Users/user/Workspace/linux/",
|
|
84
|
+
"defaultIncludePaths": ["include"],
|
|
85
|
+
"defaultBindingType": "DevicetreeOrg",
|
|
86
|
+
"defaultDeviceOrgBindingsMetaSchema": [
|
|
87
|
+
"/Users/user/Workspace/linuxBindings/dt-schema/dtschema/meta-schemas" // https://github.com/devicetree-org/dt-schema/tree/main/dtschema/meta-schemas
|
|
88
|
+
],
|
|
89
|
+
"defaultDeviceOrgTreeBindings": [
|
|
90
|
+
"/Users/user/Workspace/linuxBindings/dt-schema/dtschema/schemas", // https://github.com/devicetree-org/dt-schema/tree/main/dtschema/schemas
|
|
91
|
+
"/Users/user/Workspace/linux/Documentation/devicetree/bindings" // https://github.com/torvalds/linux/tree/master/Documentation/devicetree/bindings
|
|
92
|
+
]
|
|
93
|
+
}
|
|
93
94
|
}
|
|
94
95
|
```
|
|
95
96
|
|
|
@@ -122,10 +123,10 @@ Every element in the document will have document symbols to help navigate the do
|
|
|
122
123
|
#### Types
|
|
123
124
|
|
|
124
125
|
- Supports standard types as defined in chapter 2 of Devicetree Specification Release v0.4
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
- Reports property type mismatch errors
|
|
127
|
+
- Reports prop-encoded-values errors when these need to follow some pattern e.g interrupts
|
|
128
|
+
- Compares the node address and ensures that it matches the reg property, and that the reg values use the appropriate number of values as defined by other properties
|
|
129
|
+
- And more... (See Chapter 2 of Devicetree Specification Release v0.4 https://devicetree.org)
|
|
129
130
|
|
|
130
131
|
### Document Formatting
|
|
131
132
|
|
|
@@ -144,19 +145,19 @@ Completions are context aware of the document state on the line the action is re
|
|
|
144
145
|
- Node path completion
|
|
145
146
|
- Label reference completion in property assign values
|
|
146
147
|
- Delete Node:
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
- Suggests appropriate type e.g. by reference or node name
|
|
149
|
+
- Does not suggest keyword if no delete is possible
|
|
149
150
|
- Delete Property:
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
- Suggests property names available in that context
|
|
152
|
+
- Does not suggest keyword if no delete is possible
|
|
152
153
|
- Default values for standard types (e.g state)
|
|
153
154
|
|
|
154
155
|
### Code Actions
|
|
155
156
|
|
|
156
157
|
- Adds missing syntax e.g. ';', '<', '>', ',' etc...
|
|
157
158
|
- Removes syntactically incorrect spaces:
|
|
158
|
-
|
|
159
|
-
|
|
159
|
+
- Between node name, '@' and address
|
|
160
|
+
- In node path reference
|
|
160
161
|
- Removes ';' when used without any statement
|
|
161
162
|
- Suggests solutions for incomplete /delete-node/ keywords
|
|
162
163
|
- Suggests solutions for incomplete /delete-property/ keywords
|
|
@@ -204,7 +205,7 @@ Given that in some cases the files included in a devicetree might come from an S
|
|
|
204
205
|
### Road Map
|
|
205
206
|
|
|
206
207
|
- Formatting
|
|
207
|
-
|
|
208
|
+
- Clean up trailing white spaces
|
|
208
209
|
- Implement syntax for Ternary operator
|
|
209
210
|
- Implement "Device Node Requirements" (chapter 3 - Devicetree Specification Release v0.4)
|
|
210
211
|
- Write more unit tests
|