summaryrefslogtreecommitdiffstats
path: root/.config/nvim/plugin/50-spell.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/plugin/50-spell.lua')
-rw-r--r--.config/nvim/plugin/50-spell.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/.config/nvim/plugin/50-spell.lua b/.config/nvim/plugin/50-spell.lua
index a25bcff..89898c8 100644
--- a/.config/nvim/plugin/50-spell.lua
+++ b/.config/nvim/plugin/50-spell.lua
@@ -1,5 +1,11 @@
--
--- Spell check plugin
+-- 50-spell.lua
+--
+-- User commands:
+-- `SpellToggle`: Toggle spell checking
+-- `SpellSetEn`: Set spell language to English
+-- `SpellSetFr`: Set spell language to French
+-- `SpellSetEnFr`: Set spell languages to both English and French
--
local function toggle_spell()
@@ -18,6 +24,8 @@ local function set_spell_en_fr()
vim.opt.spelllang = { "en_us", "fr" }
end
+----------------------------------------------------------------------------------------------------
+
vim.opt.spelllang = "en_us" -- Initial spell language
vim.opt.spellfile = { -- Spellfiles for zg, zw, z=, etc
vim.fn.stdpath("config") .. "/spell/en.utf-8.add",