Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

Grammar Guard is a Neovim plugin that checks your grammar as you write your LaTeX, Markdown or plain text document.

License

Notifications You must be signed in to change notification settings

brymer-meneses/grammar-guard.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  _____                                _____                 __
 / ___/______ ___ _  __ _  ___ _____  / ___/_ _____ ________/ /
/ (_ / __/ _ `/  ' \/  ' \/ _ `/ __/ / (_ / // / _ `/ __/ _  / 
\___/_/  \_,_/_/_/_/_/_/_/\_,_/_/    \___/\_,_/\_,_/_/  \_,_/  
                                                               

🚧 Status

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.

ℹ️ Introduction

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.

Demo

🌟 Features

  • 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.

⚡️ Requirements

  • Neovim >= 0.5.0

📦 Installation

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.

⚙️ Setup

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 = {},
		},
	},
})

Disclaimer:

This plugin is largely based on the following pull request.

About

Grammar Guard is a Neovim plugin that checks your grammar as you write your LaTeX, Markdown or plain text document.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published