@@ -206,5 +206,110 @@ particular FILE-NAME and MODE."
206
206
:activation-fn 'lsp-clients-flow-activate-p
207
207
:server-id 'flow-ls ))
208
208
209
+ (defgroup lsp-deno nil
210
+ " LSP support for the Deno language server."
211
+ :group 'lsp-mode
212
+ :link '(url-link " https://deno.land/" ))
213
+
214
+ (defcustom lsp-clients-deno-server " deno"
215
+ " The Deno executable to use.
216
+ Leave as just the executable name to use the default behavior of
217
+ finding the executable with variable `exec-path' ."
218
+ :group 'lsp-deno
219
+ :risky t
220
+ :type 'file
221
+ :package-version '(lsp-mode . " 7.1.0" ))
222
+
223
+ (defcustom lsp-clients-deno-server-args '(" lsp" )
224
+ " Extra arguments for starting the Deno language server."
225
+ :group 'lsp-deno
226
+ :risky t
227
+ :type '(repeat string)
228
+ :package-version '(lsp-mode . " 7.1.0" ))
229
+
230
+ (defcustom lsp-clients-deno-enable-lint t
231
+ " Controls if linting information will be provided by the Deno Language Server."
232
+ :group 'lsp-deno
233
+ :risky t
234
+ :type 'boolean
235
+ :package-version '(lsp-mode . " 7.1.0" ))
236
+
237
+ (defcustom lsp-clients-deno-enable-code-lens-references t
238
+ " Enables or disables the display of code lens information."
239
+ :group 'lsp-deno
240
+ :risky t
241
+ :type 'boolean
242
+ :package-version '(lsp-mode . " 7.1.0" ))
243
+
244
+ (defcustom lsp-clients-deno-enable-code-lens-references-all-functions t
245
+ " Enables or disables the display of code lens information for all functions.
246
+ Setting this variable to `non-nil' implicitly enables
247
+ `lsp-clients-deno-enable-code-lens-references' ."
248
+ :group 'lsp-deno
249
+ :risky t
250
+ :type 'boolean
251
+ :package-version '(lsp-mode . " 7.1.0" ))
252
+
253
+ (defcustom lsp-clients-deno-enable-code-lens-implementations t
254
+ " Enables or disables the display of code lens information for implementations."
255
+ :group 'lsp-deno
256
+ :risky t
257
+ :type 'boolean
258
+ :package-version '(lsp-mode . " 7.1.0" ))
259
+
260
+ (defcustom lsp-clients-deno-config nil
261
+ " The file path to a tsconfig.json file.
262
+ The path can be either be relative to the workspace, or an
263
+ absolute path.
264
+
265
+ Examples: `./tsconfig.json' ,
266
+ `/path/to/tsconfig.json' , `C:\\path\\to\\tsconfig.json' "
267
+ :group 'lsp-deno
268
+ :risky t
269
+ :type 'file
270
+ :package-version '(lsp-mode . " 7.1.0" ))
271
+
272
+ (defcustom lsp-clients-deno-import-map nil
273
+ " The file path to an import map.
274
+ Import maps provide a way to relocate modules based on their
275
+ specifiers. The path can either be relative to the workspace, or
276
+ an absolute path.
277
+
278
+ Examples: `./import-map.json' ,
279
+ `/path/to/import-map.json' , `C:\\path\\to\\import-map.json' ."
280
+ :group 'lsp-deno
281
+ :risky t
282
+ :type 'file
283
+ :package-version '(lsp-mode . " 7.1.0" ))
284
+
285
+ (defcustom lsp-clients-deno-enable-unstable nil
286
+ " Controls if code will be type checked with Deno's unstable APIs."
287
+ :group 'lsp-deno
288
+ :risky t
289
+ :type 'boolean
290
+ :package-version '(lsp-mode . " 7.1.0" ))
291
+
292
+ (defun lsp-clients-deno--make-init-options ()
293
+ " Initialization options for the Deno language server."
294
+ `(:enable t
295
+ :config , lsp-clients-deno-config
296
+ :importMap , lsp-clients-deno-import-map
297
+ :lint ,(lsp-json-bool lsp-clients-deno-enable-lint)
298
+ :unstable ,(lsp-json-bool lsp-clients-deno-enable-unstable)
299
+ :codeLens (:implementations ,(lsp-json-bool lsp-clients-deno-enable-code-lens-implementations)
300
+ :references ,(lsp-json-bool (or lsp-clients-deno-enable-code-lens-references
301
+ lsp-clients-deno-enable-code-lens-references-all-functions))
302
+ :referencesAllFunctions ,(lsp-json-bool lsp-clients-deno-enable-code-lens-references-all-functions))))
303
+
304
+ (lsp-register-client
305
+ (make-lsp-client :new-connection
306
+ (lsp-stdio-connection (lambda ()
307
+ (cons lsp-clients-deno-server
308
+ lsp-clients-deno-server-args)))
309
+ :initialization-options #'lsp-clients-deno--make-init-options
310
+ :priority -5
311
+ :activation-fn #'lsp-typescript-javascript-tsx-jsx-activate-p
312
+ :server-id 'deno-ls ))
313
+
209
314
(provide 'lsp-javascript )
210
315
; ;; lsp-javascript.el ends here
0 commit comments