Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javascript-typescript-stdio is deprecated #566

Closed
kouhin opened this issue Nov 20, 2020 · 5 comments
Closed

javascript-typescript-stdio is deprecated #566

kouhin opened this issue Nov 20, 2020 · 5 comments

Comments

@kouhin
Copy link

kouhin commented Nov 20, 2020

javascript-typescript-langserver is no longer maintained, see https://github.com/sourcegraph/javascript-typescript-langserver

Theia's TypeScript language server may be a better choice.

@muffinmad
Copy link
Collaborator

muffinmad commented Nov 20, 2020 via email

@terlar
Copy link

terlar commented Nov 24, 2020

Using the suggested typescript-language-server I got the following error, looking at the JSON serialize function it includes both utf-16 and utf-32 in offset encoding, the latter being used as a lookup symbol somewhere:

Debugger entered--Lisp error: (wrong-type-argument symbolp "utf-32")
json-serialize((:jsonrpc "2.0" :id 1 :method "initialize" :params (:processId 2839 :rootPath "/home/terje.larsen/src/github.com/terlar/exercism-workspace/" :rootUri "file:///home/terje.larsen/src/github.com/terlar/ex..." :initializationOptions #<hash-table eql 0/65 0x3d19d4d> :capabilities (:workspace (:applyEdit t :executeCommand (:dynamicRegistration :json-false) :workspaceEdit (:documentChanges :json-false) :didChangeWatchedFiles (:dynamicRegistration t) :symbol (:dynamicRegistration :json-false) :configuration t) :textDocument (:synchronization (:dynamicRegistration :json-false :willSave t :willSaveWaitUntil t :didSave t) :completion (:dynamicRegistration :json-false :completionItem (:snippetSupport t) :contextSupport t) :hover (:dynamicRegistration :json-false :contentFormat ["markdown" "plaintext"]) :signatureHelp (:dynamicRegistration :json-false :signatureInformation (:parameterInformation (:labelOffsetSupport t))) :references (:dynamicRegistration :json-false) :definition (:dynamicRegistration :json-false) :declaration (:dynamicRegistration :json-false) :implementation (:dynamicRegistration :json-false) :typeDefinition (:dynamicRegistration :json-false) :documentSymbol (:dynamicRegistration :json-false :hierarchicalDocumentSymbolSupport t :symbolKind (:valueSet [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26])) :documentHighlight (:dynamicRegistration :json-false) :codeAction (:dynamicRegistration :json-false :codeActionLiteralSupport (:codeActionKind (:valueSet ...)) :isPreferredSupport t) :formatting (:dynamicRegistration :json-false) :rangeFormatting (:dynamicRegistration :json-false) :rename (:dynamicRegistration :json-false) :publishDiagnostics (:relatedInformation :json-false)) :experimental #<hash-table eql 0/65 0x3d19d4d> :xfilesProvider t :xcontentProvider t :offsetEncoding ("utf-32" "utf-16")))) :false-object :json-false :null-object nil)

@jangid
Copy link

jangid commented Feb 1, 2021

The default value can be overridden using following snippet and works really nice.

  (add-to-list 'eglot-server-programs
               '((js-mode typescript-mode)
                 "typescript-language-server" "--stdio"))

For the above code to work, you must install typescript-language-server:

npm install -g typescript-language-server

Yes. I install all the dev-tools globally.

typescript-language-server is well maintained - https://github.com/theia-ide/typescript-language-server. @joaotavora, what is the criteria to include that as default. I think that is a better choice. Although, that might break some friends' config. But we a warning this can be updated.

@joaotavora
Copy link
Owner

I'm using that one as well. Feel free to make a pull request.

@joaotavora
Copy link
Owner

I tested a bit and pushed a commit that does this.

joaotavora pushed a commit that referenced this issue Nov 13, 2021
Since #566 switched to using typescript-language-server as the default
JavaScript LSP, the javascript-basic test should also use it.

* eglot-tests.el (javascript-basic): Switch the LSP server from
javascript-typescript-stdio to typescript-language-server.

Copyright-paperwork-exempt: yes
bhankas pushed a commit to bhankas/emacs that referenced this issue Sep 18, 2022
* README.md (Connecting to a server): Prefer
typescript-language-server.

* eglot.el (eglot-server-programs): Use
typescript-language-server.
bhankas pushed a commit to bhankas/emacs that referenced this issue Sep 19, 2022
* README.md (Connecting to a server): Prefer
typescript-language-server.

* eglot.el (eglot-server-programs): Use
typescript-language-server.
bhankas pushed a commit to bhankas/emacs that referenced this issue Sep 19, 2022
* README.md (Connecting to a server): Prefer
typescript-language-server.

* eglot.el (eglot-server-programs): Use
typescript-language-server.

#566: joaotavora/eglot#566
jollaitbot pushed a commit to sailfishos-mirror/emacs that referenced this issue Oct 12, 2022
* README.md (Connecting to a server): Prefer
typescript-language-server.

* eglot.el (eglot-server-programs): Use
typescript-language-server.

GitHub-reference: close joaotavora/eglot#566
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants