Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions clients/lsp-javascript.el
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@
(warn (concat "The javascript-typescript-langserver (jsts-ls) is unmaintained; "
"it is recommended to use ts-ls or deno-ls instead.")))))



Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with all these extra newlines? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are page-break characters ^L, not new line.
I've separated each server into a page

(defgroup lsp-typescript nil
"LSP support for TypeScript, using Theia/Typefox's TypeScript Language Server."
:group 'lsp-mode
Expand Down Expand Up @@ -881,6 +883,7 @@ to run the command in."
error-callback)
error-callback))))



(defgroup lsp-flow nil
"LSP support for the Flow Javascript type checker."
Expand Down Expand Up @@ -956,6 +959,8 @@ particular FILE-NAME and MODE."
:activation-fn 'lsp-clients-flow-activate-p
:server-id 'flow-ls))



(defgroup lsp-deno nil
"LSP support for the Deno language server."
:group 'lsp-mode
Expand Down Expand Up @@ -1061,6 +1066,47 @@ Examples: `./import-map.json',
:activation-fn #'lsp-typescript-javascript-tsx-jsx-activate-p
:server-id 'deno-ls))



(defgroup lsp-tsgo nil
"LSP support for the TypeScript (Go native) language server."
:group 'lsp-mode
:link '(url-link "https://github.com/microsoft/typescript-go"))

(defcustom lsp-clients-tsgo-path "tsgo"
"Path to the tsgo binary."
:group 'lsp-tsgo
:risky t
:type 'string)

(defcustom lsp-clients-tsgo-args '("--lsp" "--stdio")
"Extra arguments for the tsgo language server."
:group 'lsp-tsgo
:risky t
:type '(repeat string))

(lsp-dependency 'tsgo
'(:system lsp-clients-tsgo-path)
'(:npm :package "@typescript/native-preview"
:path "tsgo"))

(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection (lambda ()
`(,(lsp-package-path 'tsgo)
,@lsp-clients-tsgo-args)))
:activation-fn 'lsp-typescript-javascript-tsx-jsx-activate-p
:priority -4
:completion-in-comments? t
:initialized-fn (lambda (_workspace))
:server-id 'tsgo
:download-server-fn (lambda (_client callback error-callback _update?)
(lsp-package-ensure
'tsgo
callback
error-callback))))



(lsp-consistency-check lsp-javascript)

(provide 'lsp-javascript)
Expand Down