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

ltex-ls returns 9, eglot times out #13

Open
bandithedoge opened this issue Apr 24, 2024 · 7 comments
Open

ltex-ls returns 9, eglot times out #13

bandithedoge opened this issue Apr 24, 2024 · 7 comments

Comments

@bandithedoge
Copy link

Not sure if this is the place to report an issue like this. Running eglot in an Org buffer causes the following:

*Messages*:

[jsonrpc] Server exited with status 9
Error running timer: (error "[eglot] Timed out after 30 seconds")

M-x eglot-events-buffer:

[jsonrpc] D[23:01:01.818] Running language server: ltex-ls
[jsonrpc] e[23:01:01.818] --> initialize[1] {"jsonrpc":"2.0","id":1,"method":"initialize","params":{"processId":172653,"clientInfo":{"name":"Eglot","version":"1.17"},"rootPath":"/home/bandithedoge/dotfiles/","rootUri":"file:///home/bandithedoge/dotfiles","initializationOptions":{},"capabilities":{"workspace":{"applyEdit":true,"executeCommand":{"dynamicRegistration":false},"workspaceEdit":{"documentChanges":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":false},"configuration":true,"workspaceFolders":true},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":false,"deprecatedSupport":true,"resolveSupport":{"properties":["documentation","details","additionalTextEdits"]},"tagSupport":{"valueSet":[1]}},"contextSupport":true},"hover":{"dynamicRegistration":false,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":false,"signatureInformation":{"parameterInformation":{"labelOffsetSupport":true},"documentationFormat":["markdown","plaintext"],"activeParameterSupport":true}},"references":{"dynamicRegistration":false},"definition":{"dynamicRegistration":false,"linkSupport":true},"declaration":{"dynamicRegistration":false,"linkSupport":true},"implementation":{"dynamicRegistration":false,"linkSupport":true},"typeDefinition":{"dynamicRegistration":false,"linkSupport":true},"documentSymbol":{"dynamicRegistration":false,"hierarchicalDocumentSymbolSupport":true,"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":false},"codeAction":{"dynamicRegistration":false,"resolveSupport":{"properties":["edit","command"]},"dataSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"formatting":{"dynamicRegistration":false},"rangeFormatting":{"dynamicRegistration":false},"rename":{"dynamicRegistration":false},"inlayHint":{"dynamicRegistration":false},"publishDiagnostics":{"relatedInformation":false,"codeDescriptionSupport":false,"tagSupport":{"valueSet":[1,2]}}},"window":{"showDocument":{"support":true},"workDoneProgress":true},"general":{"positionEncodings":["utf-32","utf-8","utf-16"]},"experimental":{}},"workspaceFolders":[{"uri":"file:///home/bandithedoge/dotfiles","name":"~/dotfiles/"}]}}
[stderr]  Picked up _JAVA_OPTIONS: -Djava.util.prefs.userRoot=/home/bandithedoge/.config/java
[stderr]  SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[stderr]  SLF4J: Defaulting to no-operation (NOP) logger implementation
[stderr]  SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[stderr]  Apr 24, 2024 11:01:08 PM org.bsplines.ltexls.server.LtexLanguageServer initialize
[stderr]  INFO: ltex-ls 16.0.0 - initializing...
[jsonrpc] i[23:01:31.818] [1] timed-out request ':initialize'
[jsonrpc] D[23:01:31.819] Connection state change: `killed
'

----------b---y---e---b---y---e----------
[stderr]  
[stderr]  
[stderr]  nil
[stderr]  nil
[stderr]  Process EGLOT (dotfiles/(org-mode git-commit-elisp-text-mode bibtex-mode context-mode latex-mode markdown-mode rst-mode text-mode)) stderr finished

And here's my configuration (I'm overriding eglot-ltex--server-entry to pick up ltex-ls from PATH):

(use-package eglot-ltex
  :ghook ('text-mode-hook (lambda ()
                            (require 'eglot-ltex)
                            (eglot-ensure)))
  :custom
  (eglot-ltex-communication-channel 'stdio)
  :init
  (general-add-advice 'eglot-ltex--server-entry :override (lambda () "ltex-ls")))

This happens with eglot-ltex-communication-channel set to either stdio or tcp. I had no issues running ltex-ls using lsp-ltex.

@jcs090218
Copy link
Member

Do you have the server installed? 🤔

@bandithedoge
Copy link
Author

Yes, you can see Java-related things from ltex-ls in the log.

@jcs090218
Copy link
Member

Interesting, so it works on lsp-ltex but not on this package? 🤔

@bandithedoge
Copy link
Author

Correct.

@Dev380
Copy link

Dev380 commented May 5, 2024

I'm having the same issue, and it also doesn't work on markdown for me. I'm not sure why this is happening because it worked a few weeks ago.

@RomanHargrave
Copy link
Contributor

It may be useful to know that I was able to get things up and running with ltex-ls-plus in stdio mode

@namcsi
Copy link

namcsi commented Jan 22, 2025

As a new user I was also unable to make eglot-ltex work with ltex-ls (same error as @bandithedoge), but ltex-ls-plus worked like a charm. Would it make sense to change the README to point new users to ltex-ls-plus instead of ltex-ls, since the latter does not seem to be actively maintained?

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