emacs-languagetool / eglot-ltex

Eglot Clients for LTEX
GNU General Public License v3.0
34 stars 9 forks source link

ltex-ls returns 9, eglot times out #13

Open bandithedoge opened 7 months ago

bandithedoge commented 7 months ago

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 commented 7 months ago

Do you have the server installed? 🤔

bandithedoge commented 7 months ago

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

jcs090218 commented 7 months ago

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

bandithedoge commented 7 months ago

Correct.

Dev380 commented 6 months ago

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 commented 1 month ago

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