lsp-ltex
lsp-mode
client leveraging LTEX Language Server.
💾 Quickstart
(use-package lsp-ltex
:ensure t
:hook (text-mode . (lambda ()
(require 'lsp-ltex)
(lsp))) ; or lsp-deferred
:init
(setq lsp-ltex-version "15.2.0")) ; make sure you have set this, see below
For lsp-ltex
to run you need to have ltex-ls
installed and available.
Go to https://valentjn.github.io/ltex/ltex-ls/installation.html, download
the appropriate version, uncompress, and place it under ~/.emacs.d/.cache/lsp/ltex-ls
. As explained there, if you download the archive that corresponds to
your platform, no Java installation is needed. If you use the platform-independent
file, you will need Java in your computer and you will need to set the JAVA_HOME
environment variable.
In the configuration for lsp-ltex
you will probably want to set the version
you want to use; for example (setq lsp-ltex-version "15.2.0")
in the init
section of use-package
.
📇 Commands
Commands | Description |
---|---|
lsp-ltex-upgrade-ls | Upgrade LTEX server, if not found install it instead. |
🔧 Configuration
lsp-ltex
supports following configuration. Each configuration is described in
detail in LTEX Settings.
ltex.enabled
vialsp-ltex-enabled
ltex.language
vialsp-ltex-language
ltex.dictionary
vialsp-ltex-dictionary
ltex.disabledRules
vialsp-ltex-disabled-rules
ltex.enabledRules
vialsp-ltex-enabled-rules
ltex.hiddenFalsePositives
vialsp-ltex-hidden-false-positives
ltex.bibtex.fields
vialsp-ltex-bibtex-fields
ltex.latex.commands
vialsp-ltex-latex-commands
ltex.latex.environments
vialsp-ltex-latex-environments
ltex.markdown.nodes
vialsp-ltex-markdown-nodes
ltex.additionalRules.enablePickyRules
vialsp-ltex-additional-rules-enable-picky-rules
ltex.additionalRules.motherTongue
vialsp-ltex-mother-tongue
ltex.additionalRules.languageModel
vialsp-ltex-additional-rules-language-model
ltex.additionalRules.neuralNetworkModel
vialsp-ltex-additional-rules-neural-network-model
ltex.additionalRules.word2VecModel
vialsp-ltex-additional-rules-word-2-vec-model
ltex.languageToolHttpServerUri
vialsp-ltex-languagetool-http-server-uri
ltex.languageToolOrg.username
vialsp-ltex-languagetool-org-username
ltex.languageToolOrg.apiKey
vialsp-ltex-languagetool-org-api-key
ltex.ltex-ls.path
vialsp-ltex-ls-path
ltex.ltex-ls.logLevel
vialsp-ltex-log-level
ltex.java.path
vialsp-ltex-java-path
ltex.java.initialHeapSize
vialsp-ltex-java-initial-heap-size
ltex.java.maximumHeapSize
vialsp-ltex-java-maximum-heap-size
ltex.sentenceCacheSize
vialsp-ltex-sentence-cache-size
ltex.completionEnabled
vialsp-ltex-completion-enabled
(currently, not implemented)ltex.diagnosticSeverity
vialsp-ltex-diagnostic-severity
ltex.checkFrequency
vialsp-ltex-check-frequency
ltex.clearDiagnosticsWhenClosingFile
vialsp-ltex-clear-diagnostics-when-closing-file
ltex.statusBarItem
vialsp-ltex-status-bar-item
(currently, not implemented)ltex.trace.server
vialsp-ltex-trace-server
Contribute
If you would like to contribute to this project, you may either clone and make pull requests to this repository. Or you can clone the project and establish your own branch of this tool. Any methods are welcome!