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

Error initializing typescript-language-server on windows #310

Closed
blikblum opened this issue Aug 11, 2024 · 3 comments
Closed

Error initializing typescript-language-server on windows #310

blikblum opened this issue Aug 11, 2024 · 3 comments
Assignees
Labels
bug Something isn't working ready for release

Comments

@blikblum
Copy link

Using ecode 0.6 on windows 10

Opening a folder with a js project i receive a notification: "LSP Server typescript-language-server failed to initialize, received some error:"

Installed typescript-language-server using npm install -g typescript-language-server typescript as described in typescript-language-server project

Languages health tool recognizes typescript-language-server

Running typescript-language-server --stdio on terminal works

App log:

2024-08-10 22:09:59 - INFO: Texture ID 26 loaded in 4.036 ms.
2024-08-10 22:09:59 - WARNING: LSPClientServer server typescript-language-server Send for non-running server: typescript-language-server
2024-08-10 22:09:59 - INFO: Displayed notification:
LSP Server typescript-language-server failed to initialize, received some error:
2024-08-10 22:09:59 - INFO: Texture ID 27 loaded in 0.718 ms.
2024-08-10 22:10:03 - INFO: Texture ID 28 loaded in 0.639 ms.
2024-08-10 22:10:03 - ERROR: ERROR WinAPI: A ౥a de dados transferida para uma chamada do sistema 短uito pequena.
2024-08-10 22:10:03 - WARNING: LSPClientServer server typescript-language-server Send for non-running server: typescript-language-server
2024-08-10 22:10:30 - WARNING: LSPClientServer server typescript-language-server Send for non-running server: typescript-language-server
2024-08-10 22:11:17 - WARNING: LSPClientServer server typescript-language-server Send for non-running server: typescript-language-server
2024-08-10 22:13:09 - WARNING: LSPClientServer server typescript-language-server Send for non-running server: typescript-language-server
2024-08-10 22:13:20 - WARNING: LSPClientServer server typescript-language-server Send for non-running server: typescript-language-server

System info

Version: eepp version 2.8.0 (codename: "Siddhi")	Build time: Jul 20 2024 00:53:31
	Platform: Windows
	OS: Microsoft Windows 10
	Arch: x64
	CPU Cores: 8
	Process Path: C:\bin\code\ecode\
	Current Working Directory: C:\bin\code\ecode
	Disk Free Space: 16.70 GiB
	Window/Input Backend: SDL 2.30.3
	GL Backend: OpenGL 2
	GL Vendor: Intel
	GL Renderer: Intel(R) HD Graphics 630
	GL Version: 4.6.0 - Build 31.0.101.2128
	GL Shading Language Version: 4.60 - Build 31.0.101.2128
	Resolution: 1920x1017
@SpartanJ SpartanJ self-assigned this Aug 11, 2024
@SpartanJ SpartanJ added the bug Something isn't working label Aug 11, 2024
@SpartanJ
Copy link
Owner

Oh, I never used the ts server on Windows, it seems that it's distributed with several binaries with the same name but different extension, the server won't run unless you set the full path of the LSP. With the current ecode version you can go to:
Settings -> Tools -> Plugin Manager -> select/click LSP Client -> Click Preferences -> edit the file adding your server configuration, it will look like:

{
  "config": {
    "disable_semantic_highlighting_lang": [],
    "hover_delay": "1s",
    "semantic_highlighting": true,
    "server_close_after_idle_time": "1m",
    "silent": false,
    "trim_logs": false
  },
  "keybindings": {
    "lsp-format-range": "alt+shift+f",
    "lsp-go-to-declaration": "",
    "lsp-go-to-definition": "f2",
    "lsp-go-to-implementation": "shift+f2",
    "lsp-memory-usage": "",
    "lsp-plugin-restart": "",
    "lsp-refresh-semantic-highlighting": "",
    "lsp-rename-symbol-under-cursor": "mod+shift+r",
    "lsp-switch-header-source": "",
    "lsp-symbol-code-action": "alt+return",
    "lsp-symbol-info": "f1",
    "lsp-symbol-references": "mod+shift+u",
    "lspz-go-to-type-definition": ""
  },
  "servers": [
    {
      "command": "C:\\Program Files\\nodejs\\typescript-language-server.cmd",
      "command_parameters": "--stdio",
      "name": "typescript-language-server"
    }
  ]
}

The relevant part is the configured server with the full path.
A patch to fix this issue will be pushed after this message.

SpartanJ added a commit to SpartanJ/eepp that referenced this issue Aug 11, 2024
@SpartanJ
Copy link
Owner

This is a patched ecode that should get the typescript-language-server working out of the box
ecode-windows-0.6.0-x86_64.zip.

@blikblum
Copy link
Author

Works like a charm

Many thanks

@SpartanJ SpartanJ reopened this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready for release
Projects
None yet
Development

No branches or pull requests

2 participants