inventionate / grammar-guard.nvim

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

🚧 Status

This plugin is currently on alpha stage, expect some changes to the API.

ℹ️ 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.
  • LATEX, Markdown or plain text grammar checking.
  • Integrates well with nvim-lspconfig.
  • Using nvim-lsp-installer for ltex install.
  • 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({
	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.

License:Apache License 2.0


Languages

Language:Lua 93.2%Language:Vim Script 6.8%