commit f3c83e2e6d6440490a8561b00ade5dd7a5b83edf
parent 2e0a811590e8e5990efb5ccb66714af6b8301c24
Author: Thomas Vigouroux <thomas.vigouroux@protonmail.com>
Date: Mon, 5 Sep 2022 16:00:28 +0200
fix: enhance spellchecking setup
Diffstat:
8 files changed, 54 insertions(+), 17 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,4 +1,4 @@
-spell
plugin/packer_compiled.vim
parser/
plugin/packer_compiled.lua
+spell/*.spl
diff --git a/after/ftplugin/tex.lua b/after/ftplugin/tex.lua
@@ -5,6 +5,8 @@ vim.opt_local.conceallevel = 0
vim.opt_local.foldmethod = "marker"
vim.opt_local.foldmarker = "%(,%)"
vim.opt_local.wrap = false
+vim.opt_local.spell = true
+vim.opt_local.spellcapcheck = "\\(verb.\\+\\)\\@<![.?!]\\_[\\])'\"\t\n]\\+"
vim.cmd [[normal zx]]
diff --git a/dict/default.txt b/dict/default.txt
@@ -1,14 +0,0 @@
-MaxMCSat
-MaxPMCSat
-Vigouroux
-CEGAR
-Amossys
-LLVM
-VERIMAG
-DBA
-VEX
-TAVA
-bitvector
-Dolev
-Yao
-FMCAD
diff --git a/init.lua b/init.lua
@@ -27,7 +27,8 @@ o.splitright = true
o.lazyredraw = true
o.foldenable = false
o.spelllang = { "en", "fr" }
-o.spellfile = vim.fn.stdpath("config") .. "/spell/correct.UTF-8.add"
+vim.o.spellfile = table.concat(vim.api.nvim_get_runtime_file("spell/*.add", true) or {}, ",")
+o.spelloptions:append "noplainbuffer"
o.textwidth = 100
o.colorcolumn = "+0"
o.signcolumn = "yes:1"
diff --git a/lua/tele_config.lua b/lua/tele_config.lua
@@ -24,7 +24,6 @@ map('n', '<Leader>oc', lua_call('telescope.builtin', 'fd', { cwd = vim.fn.stdpat
map('n', '<Leader>b', lua_call('telescope.builtin', 'buffers'))
map('n', '<Leader>q', lua_call('telescope.builtin', 'quickfix'))
map('n', '<Leader>r', lua_call('telescope.builtin', 'live_grep'))
-map('n', 'z=', lua_call('telescope.builtin', 'spell_suggest'))
tele.load_extension('fzy_native')
local sorters = require'telescope.sorters'
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm
@@ -0,0 +1,14 @@
+(
+ (word) @spell
+ (#not-has-ancestor? @spell
+ "inline_formula"
+ "displayed_equation"
+ "citation"
+ "command_name"
+ "label_reference"
+ "begin"
+ "end"
+ "key_value_pair"
+ "label_definition"
+ )
+)
diff --git a/spell/default.utf-8.add b/spell/default.utf-8.add
@@ -0,0 +1,35 @@
+MaxMCSat
+MaxPMCSat
+Vigouroux
+CEGAR
+Amossys
+LLVM
+VERIMAG
+DBA
+VEX
+TAVA
+bitvector
+Dolev
+Yao
+FMCAD
+CEGAR
+compositionnels
+non-linéaires
+décorrélation
+API
+pseudo-contrôlabilité
+réimplémentation
+hyper-propriétés
+Informellement
+l'allocateur
+d'allocateurs
+compositionnelle
+l'overflow
+concolique
+surapproximation
+bas-niveau
+incrémental
+qu'industriels
+GDR
+GT
+bugs
diff --git a/dict/fr.txt b/spell/fr.utf-8.add