summaryrefslogtreecommitdiffstats
path: root/.config/nvim/plugin/50-spell.lua
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-06-13 11:17:32 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-06-13 11:17:32 +0200
commit48b8993dacd948ce3f1426c35039c3ec38ae21e3 (patch)
tree5d33b41609e9c930ccf67a039418a3e54c68427e /.config/nvim/plugin/50-spell.lua
parent828790b2f206691d252abfc007564284c9b75806 (diff)
downloaddotfiles-48b8993dacd948ce3f1426c35039c3ec38ae21e3.tar.gz
dotfiles-48b8993dacd948ce3f1426c35039c3ec38ae21e3.zip
refactor(nvim): rename functions and edit comments
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",