Skip to content

Commit 52ad1d3

Browse files
committed
Better predicate for the server command
1 parent a2edca4 commit 52ad1d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lsp-ltex.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,10 @@ This file is use to activate the language server."
398398
(make-lsp-client
399399
:new-connection (lsp-stdio-connection
400400
#'lsp-ltex--server-command
401-
(lambda () (and (file-executable-p (lsp-ltex--server-entry)) (file-exists-p (lsp-ltex--server-entry)))))
401+
(lambda () (let ((entry (lsp-ltex--server-entry)))
402+
(and (file-exists-p entry)
403+
(not (file-directory-p entry))
404+
(file-executable-p entry)))))
402405
:activation-fn (lambda (&rest _) (apply #'derived-mode-p lsp-ltex-active-modes))
403406
:priority -2
404407
:add-on? t

0 commit comments

Comments
 (0)