devicetree-language-server 0.5.4 → 0.5.6
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 +92 -0
- package/dist/THIRD_PARTY_LICENSES.txt +356 -0
- package/dist/server.js +153 -154
- package/package.json +10 -11
package/README.md
CHANGED
|
@@ -47,6 +47,10 @@ interface Settings {
|
|
|
47
47
|
}
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
### Sample configurations
|
|
51
|
+
|
|
52
|
+
#### kakoune
|
|
53
|
+
|
|
50
54
|
Sample configuration in for `kakoune` with `Zephyr` 3.7.99 or later.
|
|
51
55
|
Contribution by [topisani](https://github.com/topisani)
|
|
52
56
|
|
|
@@ -75,6 +79,94 @@ EOF
|
|
|
75
79
|
}
|
|
76
80
|
```
|
|
77
81
|
|
|
82
|
+
#### neovim
|
|
83
|
+
|
|
84
|
+
Example setup using [lazygit](https://github.com/jesseduffield/lazygit)
|
|
85
|
+
|
|
86
|
+
```lua
|
|
87
|
+
return {
|
|
88
|
+
"neovim/nvim-lspconfig",
|
|
89
|
+
opts = function(_, opts)
|
|
90
|
+
-- Don't let Mason try to handle this custom server
|
|
91
|
+
opts.servers.devicetree_ls = nil
|
|
92
|
+
|
|
93
|
+
local lspconfig = require("lspconfig")
|
|
94
|
+
local configs = require("lspconfig.configs")
|
|
95
|
+
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
|
96
|
+
|
|
97
|
+
-- Enable semantic tokens
|
|
98
|
+
capabilities.textDocument = capabilities.textDocument or {}
|
|
99
|
+
capabilities.textDocument.semanticTokens = {
|
|
100
|
+
dynamicRegistration = false,
|
|
101
|
+
requests = {
|
|
102
|
+
range = false,
|
|
103
|
+
full = true,
|
|
104
|
+
},
|
|
105
|
+
tokenTypes = {
|
|
106
|
+
"namespace", "class", "enum", "interface", "struct", "typeParameter", "type",
|
|
107
|
+
"parameter", "variable", "property", "enumMember", "decorator", "event", "function",
|
|
108
|
+
"method", "macro", "label", "comment", "string", "keyword", "number", "regexp", "operator",
|
|
109
|
+
},
|
|
110
|
+
tokenModifiers = {
|
|
111
|
+
"declaration", "definition", "readonly", "static", "deprecated", "abstract",
|
|
112
|
+
"async", "modification", "documentation", "defaultLibrary",
|
|
113
|
+
},
|
|
114
|
+
formats = {'relative'}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
-- Enable formatting
|
|
118
|
+
capabilities.textDocument.formatting = {
|
|
119
|
+
dynamicRegistration = false
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
-- Enable folding range support
|
|
123
|
+
capabilities.textDocument.foldingRange = {
|
|
124
|
+
dynamicRegistration = false,
|
|
125
|
+
lineFoldingOnly = true,
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if not configs.devicetree_ls then
|
|
129
|
+
configs.devicetree_ls = {
|
|
130
|
+
default_config = {
|
|
131
|
+
cmd = { "devicetree-language-server", "--stdio" },
|
|
132
|
+
filetypes = { "dts", "dtsi" },
|
|
133
|
+
root_dir = lspconfig.util.root_pattern("zephyr", ".git", "."),
|
|
134
|
+
settings = {
|
|
135
|
+
devicetree = {
|
|
136
|
+
defaultIncludePaths = {
|
|
137
|
+
"./zephyr/dts",
|
|
138
|
+
"./zephyr/dts/arm",
|
|
139
|
+
"./zephyr/dts/arm64/",
|
|
140
|
+
"./zephyr/dts/riscv",
|
|
141
|
+
"./zephyr/dts/common",
|
|
142
|
+
"./zephyr/dts/vendor",
|
|
143
|
+
"./zephyr/include"
|
|
144
|
+
},
|
|
145
|
+
cwd = "${workspaceFolder}",
|
|
146
|
+
defaultBindingType = "Zephyr",
|
|
147
|
+
defaultZephyrBindings = {
|
|
148
|
+
"./zephyr/dts/bindings"
|
|
149
|
+
},
|
|
150
|
+
autoChangeContext = true,
|
|
151
|
+
allowAdhocContexts = true,
|
|
152
|
+
contexts = {},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
capabilities = capabilities,
|
|
156
|
+
},
|
|
157
|
+
}
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
vim.notify("Custom devicetree_ls LSP loaded with semantic tokens & folding")
|
|
161
|
+
|
|
162
|
+
-- Setup the LSP
|
|
163
|
+
lspconfig.devicetree_ls.setup({
|
|
164
|
+
capabilities = capabilities,
|
|
165
|
+
})
|
|
166
|
+
end,
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
78
170
|
## Using Devicetree-Org bindings example settings
|
|
79
171
|
|
|
80
172
|
```json
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
THIRD-PARTY LICENSES
|
|
2
|
+
|
|
3
|
+
@hyperjump/browser@1.2.0
|
|
4
|
+
License: MIT
|
|
5
|
+
Repository: https://github.com/hyperjump-io/browser
|
|
6
|
+
|
|
7
|
+
----------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
@hyperjump/json-pointer@1.1.0
|
|
10
|
+
License: MIT
|
|
11
|
+
Repository: https://github.com/hyperjump-io/json-pointer
|
|
12
|
+
|
|
13
|
+
----------------------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
@hyperjump/json-schema@1.10.1
|
|
16
|
+
License: MIT
|
|
17
|
+
Repository: https://github.com/hyperjump-io/json-schema
|
|
18
|
+
|
|
19
|
+
----------------------------------------------------------------------
|
|
20
|
+
|
|
21
|
+
@hyperjump/pact@1.3.0
|
|
22
|
+
License: MIT
|
|
23
|
+
Repository: https://github.com/hyperjump-io/pact
|
|
24
|
+
|
|
25
|
+
----------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+
@hyperjump/uri@1.2.2
|
|
28
|
+
License: MIT
|
|
29
|
+
Repository: https://github.com/hyperjump-io/uri
|
|
30
|
+
|
|
31
|
+
----------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
@isaacs/cliui@8.0.2
|
|
34
|
+
License: ISC
|
|
35
|
+
Repository: https://github.com/yargs/cliui
|
|
36
|
+
|
|
37
|
+
----------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
ajv@8.17.1
|
|
40
|
+
License: MIT
|
|
41
|
+
Repository: https://github.com/ajv-validator/ajv
|
|
42
|
+
|
|
43
|
+
----------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
ansi-regex@5.0.1
|
|
46
|
+
License: MIT
|
|
47
|
+
Repository: https://github.com/chalk/ansi-regex
|
|
48
|
+
|
|
49
|
+
----------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
ansi-regex@6.1.0
|
|
52
|
+
License: MIT
|
|
53
|
+
Repository: https://github.com/chalk/ansi-regex
|
|
54
|
+
|
|
55
|
+
----------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
ansi-styles@4.3.0
|
|
58
|
+
License: MIT
|
|
59
|
+
Repository: https://github.com/chalk/ansi-styles
|
|
60
|
+
|
|
61
|
+
----------------------------------------------------------------------
|
|
62
|
+
|
|
63
|
+
ansi-styles@6.2.1
|
|
64
|
+
License: MIT
|
|
65
|
+
Repository: https://github.com/chalk/ansi-styles
|
|
66
|
+
|
|
67
|
+
----------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
balanced-match@1.0.2
|
|
70
|
+
License: MIT
|
|
71
|
+
Repository: https://github.com/juliangruber/balanced-match
|
|
72
|
+
|
|
73
|
+
----------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
brace-expansion@2.0.2
|
|
76
|
+
License: MIT
|
|
77
|
+
Repository: https://github.com/juliangruber/brace-expansion
|
|
78
|
+
|
|
79
|
+
----------------------------------------------------------------------
|
|
80
|
+
|
|
81
|
+
color-convert@2.0.1
|
|
82
|
+
License: MIT
|
|
83
|
+
Repository: https://github.com/Qix-/color-convert
|
|
84
|
+
|
|
85
|
+
----------------------------------------------------------------------
|
|
86
|
+
|
|
87
|
+
color-name@1.1.4
|
|
88
|
+
License: MIT
|
|
89
|
+
Repository: https://github.com/colorjs/color-name
|
|
90
|
+
|
|
91
|
+
----------------------------------------------------------------------
|
|
92
|
+
|
|
93
|
+
content-type@1.0.5
|
|
94
|
+
License: MIT
|
|
95
|
+
Repository: https://github.com/jshttp/content-type
|
|
96
|
+
|
|
97
|
+
----------------------------------------------------------------------
|
|
98
|
+
|
|
99
|
+
cross-spawn@7.0.6
|
|
100
|
+
License: MIT
|
|
101
|
+
Repository: https://github.com/moxystudio/node-cross-spawn
|
|
102
|
+
|
|
103
|
+
----------------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
devicetree-language-server@0.5.6
|
|
106
|
+
License: Apache-2.0
|
|
107
|
+
Repository: https://github.com/kylebonnici/dts-lsp
|
|
108
|
+
|
|
109
|
+
----------------------------------------------------------------------
|
|
110
|
+
|
|
111
|
+
eastasianwidth@0.2.0
|
|
112
|
+
License: MIT
|
|
113
|
+
Repository: https://github.com/komagata/eastasianwidth
|
|
114
|
+
|
|
115
|
+
----------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
emoji-regex@8.0.0
|
|
118
|
+
License: MIT
|
|
119
|
+
Repository: https://github.com/mathiasbynens/emoji-regex
|
|
120
|
+
|
|
121
|
+
----------------------------------------------------------------------
|
|
122
|
+
|
|
123
|
+
emoji-regex@9.2.2
|
|
124
|
+
License: MIT
|
|
125
|
+
Repository: https://github.com/mathiasbynens/emoji-regex
|
|
126
|
+
|
|
127
|
+
----------------------------------------------------------------------
|
|
128
|
+
|
|
129
|
+
fast-deep-equal@3.1.3
|
|
130
|
+
License: MIT
|
|
131
|
+
Repository: https://github.com/epoberezkin/fast-deep-equal
|
|
132
|
+
|
|
133
|
+
----------------------------------------------------------------------
|
|
134
|
+
|
|
135
|
+
fast-uri@3.0.6
|
|
136
|
+
License: BSD-3-Clause
|
|
137
|
+
Repository: https://github.com/fastify/fast-uri
|
|
138
|
+
|
|
139
|
+
----------------------------------------------------------------------
|
|
140
|
+
|
|
141
|
+
foreground-child@3.3.0
|
|
142
|
+
License: ISC
|
|
143
|
+
Repository: https://github.com/tapjs/foreground-child
|
|
144
|
+
|
|
145
|
+
----------------------------------------------------------------------
|
|
146
|
+
|
|
147
|
+
glob@11.0.0
|
|
148
|
+
License: ISC
|
|
149
|
+
Repository: https://github.com/isaacs/node-glob
|
|
150
|
+
|
|
151
|
+
----------------------------------------------------------------------
|
|
152
|
+
|
|
153
|
+
is-fullwidth-code-point@3.0.0
|
|
154
|
+
License: MIT
|
|
155
|
+
Repository: https://github.com/sindresorhus/is-fullwidth-code-point
|
|
156
|
+
|
|
157
|
+
----------------------------------------------------------------------
|
|
158
|
+
|
|
159
|
+
isexe@2.0.0
|
|
160
|
+
License: ISC
|
|
161
|
+
Repository: https://github.com/isaacs/isexe
|
|
162
|
+
|
|
163
|
+
----------------------------------------------------------------------
|
|
164
|
+
|
|
165
|
+
jackspeak@4.0.2
|
|
166
|
+
License: BlueOak-1.0.0
|
|
167
|
+
Repository: https://github.com/isaacs/jackspeak
|
|
168
|
+
|
|
169
|
+
----------------------------------------------------------------------
|
|
170
|
+
|
|
171
|
+
json-schema-traverse@1.0.0
|
|
172
|
+
License: MIT
|
|
173
|
+
Repository: https://github.com/epoberezkin/json-schema-traverse
|
|
174
|
+
|
|
175
|
+
----------------------------------------------------------------------
|
|
176
|
+
|
|
177
|
+
json-stringify-deterministic@1.0.12
|
|
178
|
+
License: MIT
|
|
179
|
+
Repository: https://github.com/kikobeats/json-stringify-deterministic
|
|
180
|
+
|
|
181
|
+
----------------------------------------------------------------------
|
|
182
|
+
|
|
183
|
+
just-curry-it@5.3.0
|
|
184
|
+
License: MIT
|
|
185
|
+
Repository: https://github.com/angus-c/just
|
|
186
|
+
|
|
187
|
+
----------------------------------------------------------------------
|
|
188
|
+
|
|
189
|
+
lru-cache@11.0.2
|
|
190
|
+
License: ISC
|
|
191
|
+
Repository: https://github.com/isaacs/node-lru-cache
|
|
192
|
+
|
|
193
|
+
----------------------------------------------------------------------
|
|
194
|
+
|
|
195
|
+
media-typer@0.3.0
|
|
196
|
+
License: MIT
|
|
197
|
+
Repository: https://github.com/jshttp/media-typer
|
|
198
|
+
|
|
199
|
+
----------------------------------------------------------------------
|
|
200
|
+
|
|
201
|
+
mime-db@1.52.0
|
|
202
|
+
License: MIT
|
|
203
|
+
Repository: https://github.com/jshttp/mime-db
|
|
204
|
+
|
|
205
|
+
----------------------------------------------------------------------
|
|
206
|
+
|
|
207
|
+
mime-types@2.1.35
|
|
208
|
+
License: MIT
|
|
209
|
+
Repository: https://github.com/jshttp/mime-types
|
|
210
|
+
|
|
211
|
+
----------------------------------------------------------------------
|
|
212
|
+
|
|
213
|
+
minimatch@10.0.1
|
|
214
|
+
License: ISC
|
|
215
|
+
Repository: https://github.com/isaacs/minimatch
|
|
216
|
+
|
|
217
|
+
----------------------------------------------------------------------
|
|
218
|
+
|
|
219
|
+
minipass@7.1.2
|
|
220
|
+
License: ISC
|
|
221
|
+
Repository: https://github.com/isaacs/minipass
|
|
222
|
+
|
|
223
|
+
----------------------------------------------------------------------
|
|
224
|
+
|
|
225
|
+
package-json-from-dist@1.0.1
|
|
226
|
+
License: BlueOak-1.0.0
|
|
227
|
+
Repository: https://github.com/isaacs/package-json-from-dist
|
|
228
|
+
|
|
229
|
+
----------------------------------------------------------------------
|
|
230
|
+
|
|
231
|
+
path-key@3.1.1
|
|
232
|
+
License: MIT
|
|
233
|
+
Repository: https://github.com/sindresorhus/path-key
|
|
234
|
+
|
|
235
|
+
----------------------------------------------------------------------
|
|
236
|
+
|
|
237
|
+
path-scurry@2.0.0
|
|
238
|
+
License: BlueOak-1.0.0
|
|
239
|
+
Repository: https://github.com/isaacs/path-scurry
|
|
240
|
+
|
|
241
|
+
----------------------------------------------------------------------
|
|
242
|
+
|
|
243
|
+
require-from-string@2.0.2
|
|
244
|
+
License: MIT
|
|
245
|
+
Repository: https://github.com/floatdrop/require-from-string
|
|
246
|
+
|
|
247
|
+
----------------------------------------------------------------------
|
|
248
|
+
|
|
249
|
+
shebang-command@2.0.0
|
|
250
|
+
License: MIT
|
|
251
|
+
Repository: https://github.com/kevva/shebang-command
|
|
252
|
+
|
|
253
|
+
----------------------------------------------------------------------
|
|
254
|
+
|
|
255
|
+
shebang-regex@3.0.0
|
|
256
|
+
License: MIT
|
|
257
|
+
Repository: https://github.com/sindresorhus/shebang-regex
|
|
258
|
+
|
|
259
|
+
----------------------------------------------------------------------
|
|
260
|
+
|
|
261
|
+
signal-exit@4.1.0
|
|
262
|
+
License: ISC
|
|
263
|
+
Repository: https://github.com/tapjs/signal-exit
|
|
264
|
+
|
|
265
|
+
----------------------------------------------------------------------
|
|
266
|
+
|
|
267
|
+
string-width@4.2.3
|
|
268
|
+
License: MIT
|
|
269
|
+
Repository: https://github.com/sindresorhus/string-width
|
|
270
|
+
|
|
271
|
+
----------------------------------------------------------------------
|
|
272
|
+
|
|
273
|
+
string-width@5.1.2
|
|
274
|
+
License: MIT
|
|
275
|
+
Repository: https://github.com/sindresorhus/string-width
|
|
276
|
+
|
|
277
|
+
----------------------------------------------------------------------
|
|
278
|
+
|
|
279
|
+
strip-ansi@6.0.1
|
|
280
|
+
License: MIT
|
|
281
|
+
Repository: https://github.com/chalk/strip-ansi
|
|
282
|
+
|
|
283
|
+
----------------------------------------------------------------------
|
|
284
|
+
|
|
285
|
+
strip-ansi@7.1.0
|
|
286
|
+
License: MIT
|
|
287
|
+
Repository: https://github.com/chalk/strip-ansi
|
|
288
|
+
|
|
289
|
+
----------------------------------------------------------------------
|
|
290
|
+
|
|
291
|
+
type-is@1.6.18
|
|
292
|
+
License: MIT
|
|
293
|
+
Repository: https://github.com/jshttp/type-is
|
|
294
|
+
|
|
295
|
+
----------------------------------------------------------------------
|
|
296
|
+
|
|
297
|
+
uuid@9.0.1
|
|
298
|
+
License: MIT
|
|
299
|
+
Repository: https://github.com/uuidjs/uuid
|
|
300
|
+
|
|
301
|
+
----------------------------------------------------------------------
|
|
302
|
+
|
|
303
|
+
vscode-jsonrpc@8.2.0
|
|
304
|
+
License: MIT
|
|
305
|
+
Repository: https://github.com/Microsoft/vscode-languageserver-node
|
|
306
|
+
|
|
307
|
+
----------------------------------------------------------------------
|
|
308
|
+
|
|
309
|
+
vscode-languageserver-protocol@3.17.5
|
|
310
|
+
License: MIT
|
|
311
|
+
Repository: https://github.com/Microsoft/vscode-languageserver-node
|
|
312
|
+
|
|
313
|
+
----------------------------------------------------------------------
|
|
314
|
+
|
|
315
|
+
vscode-languageserver-textdocument@1.0.11
|
|
316
|
+
License: MIT
|
|
317
|
+
Repository: https://github.com/Microsoft/vscode-languageserver-node
|
|
318
|
+
|
|
319
|
+
----------------------------------------------------------------------
|
|
320
|
+
|
|
321
|
+
vscode-languageserver-types@3.17.5
|
|
322
|
+
License: MIT
|
|
323
|
+
Repository: https://github.com/Microsoft/vscode-languageserver-node
|
|
324
|
+
|
|
325
|
+
----------------------------------------------------------------------
|
|
326
|
+
|
|
327
|
+
vscode-languageserver@9.0.1
|
|
328
|
+
License: MIT
|
|
329
|
+
Repository: https://github.com/Microsoft/vscode-languageserver-node
|
|
330
|
+
|
|
331
|
+
----------------------------------------------------------------------
|
|
332
|
+
|
|
333
|
+
which@2.0.2
|
|
334
|
+
License: ISC
|
|
335
|
+
Repository: https://github.com/isaacs/node-which
|
|
336
|
+
|
|
337
|
+
----------------------------------------------------------------------
|
|
338
|
+
|
|
339
|
+
wrap-ansi@7.0.0
|
|
340
|
+
License: MIT
|
|
341
|
+
Repository: https://github.com/chalk/wrap-ansi
|
|
342
|
+
|
|
343
|
+
----------------------------------------------------------------------
|
|
344
|
+
|
|
345
|
+
wrap-ansi@8.1.0
|
|
346
|
+
License: MIT
|
|
347
|
+
Repository: https://github.com/chalk/wrap-ansi
|
|
348
|
+
|
|
349
|
+
----------------------------------------------------------------------
|
|
350
|
+
|
|
351
|
+
yaml@2.6.1
|
|
352
|
+
License: ISC
|
|
353
|
+
Repository: https://github.com/eemeli/yaml
|
|
354
|
+
|
|
355
|
+
----------------------------------------------------------------------
|
|
356
|
+
|