Skip to content

Commit

Permalink
Fix credo language server command issues (#4228)
Browse files Browse the repository at this point in the history
* Fix credo-language-server's command

* Update cred-language-server's default version

* Remove binary-path for credo-language-server

The store path and binary path is the same, so we can just set the
store path.
  • Loading branch information
wkirschbaum authored Mar 16, 2024
1 parent b6bf8a5 commit dfac135
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions clients/lsp-credo.el
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@
:link '(url-link "https://github.com/elixir-tools/credo-language-server")
:package-version '(lsp-mode . "8.0.1"))

(defcustom lsp-credo-command '("credo-language-server" "--stdio=true")
(defcustom lsp-credo-command
`(,(f-join lsp-server-install-dir "credo-language-server"
"credo-language-server")
"--stdio=true")
"The command that starts credo-language-server."
:type '(repeat :tag "List of string values" string)
:group 'lsp-credo
:package-version '(lsp-mode . "8.0.1"))

(defcustom lsp-credo-version "0.1.2"
(defcustom lsp-credo-version "0.3.0"
"Credo language server version to download.
It has to be set before `lsp-credo.el' is loaded and it has to
be available here: https://github.com/elixir-tools/credo-language-server/releases."
Expand Down Expand Up @@ -67,15 +70,17 @@ be available here: https://github.com/elixir-tools/credo-language-server/release
(lsp-dependency
'credo-language-server
`(:download :url lsp-credo-download-url
:store-path ,(f-join lsp-server-install-dir
"credo-language-server"
"credo-language-server")
:binary-path lsp-credo-binary-path
:store-path lsp-credo-binary-path
:set-executable? t))

(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection lsp-credo-command)
:new-connection (lsp-stdio-connection
(lambda ()
`(,(or (executable-find
(cl-first lsp-credo-command))
(lsp-package-path 'credo-language-server))
,@(cl-rest lsp-credo-command))))
:activation-fn (lsp-activate-on "elixir")
:priority -1
:add-on? t
Expand Down

0 comments on commit dfac135

Please sign in to comment.