try ltex grammar
This commit is contained in:
parent
e4a3e41ddd
commit
8dc2477c09
34
init.lua
34
init.lua
|
@ -74,6 +74,9 @@ require('packer').startup(function(use)
|
|||
-- filetype plugin allows me to associate mdx files with markdown
|
||||
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
|
||||
local has_plugins, plugins = pcall(require, 'custom.plugins')
|
||||
if has_plugins then
|
||||
|
@ -382,7 +385,7 @@ require('mason').setup()
|
|||
|
||||
-- Enable the following language servers
|
||||
-- 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
|
||||
require('mason-lspconfig').setup {
|
||||
|
@ -474,14 +477,27 @@ cmp.setup {
|
|||
},
|
||||
}
|
||||
|
||||
require'lspconfig'.grammarly.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = on_attach,
|
||||
cmd = { "/work/grammarly/extension/node_modules/.bin/grammarly-languageserver", "--stdio" },
|
||||
filetypes = { "markdown", "text" },
|
||||
init_options = {
|
||||
clientId = 'client_BaDkMgx4X19X9UxxYRCXZo',
|
||||
},
|
||||
require("grammar-guard").init()
|
||||
|
||||
-- setup LSP config
|
||||
require("lspconfig").grammar_guard.setup({
|
||||
cmd = { '/home/droscigno/.local/share/nvim/mason/packages/ltex-ls/ltex-ls/bin/ltex-ls' },
|
||||
settings = {
|
||||
ltex = {
|
||||
enabled = { "latex", "tex", "bib", "markdown" },
|
||||
language = "en",
|
||||
diagnosticSeverity = "information",
|
||||
setenceCacheSize = 2000,
|
||||
additionalRules = {
|
||||
enablePickyRules = true,
|
||||
motherTongue = "en",
|
||||
},
|
||||
trace = { server = "verbose" },
|
||||
dictionary = {},
|
||||
disabledRules = {},
|
||||
hiddenFalsePositives = {},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Use Marksman for markdown
|
||||
|
|
Loading…
Reference in New Issue