File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -352,11 +352,13 @@ If current server not found, install it then."
352352 " Return the server entry file.
353353
354354This file is use to activate the language server."
355- (concat (file-name-as-directory (lsp-ltex--extension-root))
356- (file-name-as-directory " bin" )
357- (if (eq system-type 'windows-nt )
358- " ltex-ls.bat"
359- " ltex-ls" )))
355+ (if (lsp-ltex--store-locally-p)
356+ (concat (file-name-as-directory (lsp-ltex--extension-root))
357+ (file-name-as-directory " bin" )
358+ (if (eq system-type 'windows-nt )
359+ " ltex-ls.bat"
360+ " ltex-ls" ))
361+ (executable-find " ltex-ls" )))
360362
361363(defun lsp-ltex--server-command ()
362364 " Startup command for LTEX language server."
@@ -396,7 +398,7 @@ This file is use to activate the language server."
396398 (make-lsp-client
397399 :new-connection (lsp-stdio-connection
398400 #'lsp-ltex--server-command
399- (lambda () (file-exists-p (lsp-ltex--extension-root ))))
401+ (lambda () (and ( file-executable-p (lsp-ltex--server-entry)) ( file- exists-p (lsp-ltex--server-entry) ))))
400402 :activation-fn (lambda (&rest _ ) (apply #'derived-mode-p lsp-ltex-active-modes))
401403 :priority -2
402404 :add-on? t
You can’t perform that action at this time.
0 commit comments