_____ _____ __
/ ___/______ ___ _ __ _ ___ _____ / ___/_ _____ ________/ /
/ (_ / __/ _ `/ ' \/ ' \/ _ `/ __/ / (_ / // / _ `/ __/ _ /
\___/_/ \_,_/_/_/_/_/_/_/\_,_/_/ \___/\_,_/\_,_/_/ \_,_/
This plugin is archived. It was created when there wasn't an easy way to
install the ltex
language server, prefer using mason.nvim instead.
Grammar Guard is a Neovim plugin that uses ltex-ls to check your grammar.
It uses the built-in Neovim LSP to provide feedback while you're writing your LATEX or Markdown Documents.
- Easy installer, just run
:GrammarInstall
from Neovim (requires nvim-lsp-installer). - LATEX, Markdown or plain text grammar checking.
- Integrates well with nvim-lspconfig.
- Work properly on Windows, Linux, MacOS.
- Neovim >= 0.5.0
Install via your favorite package manager:
To install grammar-guard.nvim
you need to install it with your preferred neovim package manager.
use {
"brymer-meneses/grammar-guard.nvim",
requires = {
"neovim/nvim-lspconfig",
"williamboman/nvim-lsp-installer"
}
}
Run :GrammarInstall
or with nvim-lsp-installer :LspInstall ltex
Run :LspInstallInfo
for more information about installed servers.
Integrate the following to your neovim configuration:
-- hook to nvim-lspconfig
require("grammar-guard").init()
After that, you should tune the LSP configuration to your liking.
Example Configuration:
-- setup LSP config
require("lspconfig").grammar_guard.setup({
cmd = { '/path/to/ltex-ls' }, -- add this if you install ltex-ls yourself
settings = {
ltex = {
enabled = { "latex", "tex", "bib", "markdown" },
language = "en",
diagnosticSeverity = "information",
setenceCacheSize = 2000,
additionalRules = {
enablePickyRules = true,
motherTongue = "en",
},
trace = { server = "verbose" },
dictionary = {},
disabledRules = {},
hiddenFalsePositives = {},
},
},
})
This plugin is largely based on the following pull request.