I want to use the ltex server of lsp for grammar checking in emacs.I put the file downloaded from ltex in the path ~/.emacsfile/app/ltex-ls/ltex-ls-16.0.0
. And my configuration file in .emacs.d
is
(use-package lsp-ltex
:ensure t
:hook ((LaTeX-mode . (lambda ()
(require 'lsp-ltex)
(lsp-deferred)))
(org-mode . (lambda ()
(require 'lsp-ltex)
(lsp-deferred)))
) ;; 使用 lsp-deferred 启动 lsp
:init
(setq lsp-ltex-version "16.0.0"
lsp-ltex-ls-path "~/.emacsfile/app/ltex-ls/ltex-ls-16.0.0"
lsp-ltex-settings '(:language "en-US"
:diagnosticSeverity "information"
:additionalRules '(:motherTongue "en"
:enabledRuleIds ["EN_A_VS_AN"]
:disabledRuleIds ["WHITESPACE_RULE"])
:trace "verbose")
lsp-log-io t
))
However, the lsp cannot identify the ltex which in the configuration. And everytime I run emacs for org file, the lsp says that it cannot find the ltex and have to download, which can not download a proper version of ltex.
How to set lsp-ltex correctly in the configuration file? Thank you!
Travis Chen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.