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 starting clojure-lsp #28

Closed
scotts777 opened this issue Dec 28, 2019 · 2 comments
Closed

Error starting clojure-lsp #28

scotts777 opened this issue Dec 28, 2019 · 2 comments

Comments

@scotts777
Copy link

Trying to start up acme-lsp with a config.toml file that is specifying the clojure-lsp server. Running on Mac OS X 10.15.2

My PATH contains the location of clojure-lsp. Typing clojure.lsp in the shell runs it successfully. I have used this lsp server with VSCode and Neovim successfully.

The error I am getting is:
failed to create file manager: failed to execute language server: fork/exec /usr/local/clojure-lsp/clojure-lsp: exec format error

That is the correct location to clojure-lsp. There are no log messages in the LogFile or StderrFile or the clojure-lsp log.

Config is:
`ProxyNetwork = "unix"
ProxyAddress = "/tmp/ns.ses.:0/acme-lsp.rpc"
AcmeNetwork = "unix"
AcmeAddress = "/tmp/ns.ses.:0/acme"
WorkspaceDirectories = ["/Users/ses/Projects/Clojure/finance"]
RootDirectory = "/"
FormatOnPut = true
CodeActionsOnPut = ["source.organizeImports"]

[Servers]
[Servers.clojure]
Command = ["clojure-lsp"]
Address = ""
StderrFile = "/Users/ses/Library/Caches/acme-lsp/clojure.stderr.log"
LogFile = "/Users/ses/Library/Caches/acme-lsp/clojure.log"
[Servers.clojure.Options]
hoverKind = "FullDocumentation"

[[FilenameHandlers]]
Pattern = "(\.deps)|(\.clj)$"
ServerKey = "clojure"`

@fhs
Copy link
Collaborator

fhs commented Dec 28, 2019

clojure-lsp is doing something clever to make it execute in unix shells:

$ sed 4q clojure-lsp 
:;exec java -Xmx1g -server -Dclojure-lsp.version=0.1.0-SNAPSHOT -jar $0 "$@"
@echo off
java -Xmx1g -server -Dclojure-lsp.version=0.1.0-SNAPSHOT -jar "%~f0" %*
goto :eof

This will probably work:

 Command = ["sh", "-c", "clojure-lsp"]

(Note: rc -c clojure-lsp doesn't work.)

@fhs fhs closed this as completed Dec 28, 2019
@scotts777
Copy link
Author

yep worked. Thanks for the assistance. This looks like you did a very nice job with the lsp feature. Good work.

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

2 participants