From 711318610226b161af1fa4f918fb6b38a6a4f24e Mon Sep 17 00:00:00 2001 From: louib Date: Sun, 5 May 2024 12:02:24 -0400 Subject: [PATCH] fix: allow disabling dictionaries --- flakes/nvim/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flakes/nvim/init.lua b/flakes/nvim/init.lua index 29d73c3..c698d48 100644 --- a/flakes/nvim/init.lua +++ b/flakes/nvim/init.lua @@ -521,8 +521,13 @@ local function configure_auto_completion() -- vim.o.completeopt = 'menu,menuone,noselect' vim.o.completeopt = 'menu,menuone,noselect,preview' + local dictionaries = {} + if os.getenv('NVIM_ENABLE_DICTIONARIES') == 'true' then + dictionaries = { '/usr/share/dict/words' } + end + require('cmp_dictionary').setup({ - paths = { '/usr/share/dict/words' }, + paths = dictionaries, exact_length = 2, first_case_insensitive = true, document = {