From fa54bfe71d44f9442ae66837574e1013676cc029 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sun, 18 Sep 2022 05:07:15 -0500 Subject: [PATCH] feat(nvim): make ltex use vim dictionary --- .../config/lua/plugins/configs/lsp.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dots/.nvim-environments/primary/config/lua/plugins/configs/lsp.lua b/dots/.nvim-environments/primary/config/lua/plugins/configs/lsp.lua index 69cdac9f..d91232b0 100755 --- a/dots/.nvim-environments/primary/config/lua/plugins/configs/lsp.lua +++ b/dots/.nvim-environments/primary/config/lua/plugins/configs/lsp.lua @@ -281,6 +281,25 @@ lspconfig.powershell_es.setup({ on_attach = on_attach, }) +local path = vim.fn.stdpath("config") .. "/spell/en.utf-8.add" +local words = {} + +for word in io.open(path, "r"):lines() do + table.insert(words, word) +end + +lspconfig.ltex.setup({ + settings = { + ltex = { + dictionary = { + ["en-US"] = words, + }, + }, + }, + capabilities = lsp_capabilities, + on_attach = on_attach, +}) + -- NOTE: GENERIC LSP SERVERS for _, server in ipairs({ "clangd",