try ltex grammar
This commit is contained in:
parent
e4a3e41ddd
commit
8dc2477c09
32
init.lua
32
init.lua
|
@ -74,6 +74,9 @@ require('packer').startup(function(use)
|
||||||
-- filetype plugin allows me to associate mdx files with markdown
|
-- filetype plugin allows me to associate mdx files with markdown
|
||||||
use { 'nathom/filetype.nvim' }
|
use { 'nathom/filetype.nvim' }
|
||||||
|
|
||||||
|
-- grammar-guard (uses ltex-ls)
|
||||||
|
use { 'brymer-meneses/grammar-guard.nvim' }
|
||||||
|
|
||||||
-- Add custom plugins to packer from /nvim/lua/custom/plugins.lua
|
-- Add custom plugins to packer from /nvim/lua/custom/plugins.lua
|
||||||
local has_plugins, plugins = pcall(require, 'custom.plugins')
|
local has_plugins, plugins = pcall(require, 'custom.plugins')
|
||||||
if has_plugins then
|
if has_plugins then
|
||||||
|
@ -382,7 +385,7 @@ require('mason').setup()
|
||||||
|
|
||||||
-- Enable the following language servers
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed
|
||||||
local servers = { 'grammarly', 'marksman', 'pyright', 'tsserver', 'sumneko_lua' }
|
local servers = { 'ltex', 'marksman', 'pyright', 'tsserver', 'sumneko_lua' }
|
||||||
|
|
||||||
-- Ensure the servers above are installed
|
-- Ensure the servers above are installed
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
|
@ -474,13 +477,26 @@ cmp.setup {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
require'lspconfig'.grammarly.setup({
|
require("grammar-guard").init()
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = on_attach,
|
-- setup LSP config
|
||||||
cmd = { "/work/grammarly/extension/node_modules/.bin/grammarly-languageserver", "--stdio" },
|
require("lspconfig").grammar_guard.setup({
|
||||||
filetypes = { "markdown", "text" },
|
cmd = { '/home/droscigno/.local/share/nvim/mason/packages/ltex-ls/ltex-ls/bin/ltex-ls' },
|
||||||
init_options = {
|
settings = {
|
||||||
clientId = 'client_BaDkMgx4X19X9UxxYRCXZo',
|
ltex = {
|
||||||
|
enabled = { "latex", "tex", "bib", "markdown" },
|
||||||
|
language = "en",
|
||||||
|
diagnosticSeverity = "information",
|
||||||
|
setenceCacheSize = 2000,
|
||||||
|
additionalRules = {
|
||||||
|
enablePickyRules = true,
|
||||||
|
motherTongue = "en",
|
||||||
|
},
|
||||||
|
trace = { server = "verbose" },
|
||||||
|
dictionary = {},
|
||||||
|
disabledRules = {},
|
||||||
|
hiddenFalsePositives = {},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue