From 9cc3fda069eef8ae7c916a4d0641dfa405c6cb50 Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Tue, 23 Apr 2024 10:51:28 +0200 Subject: [PATCH] Toggle spell checking --- init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.lua b/init.lua index 036eefb8..f179ee8e 100644 --- a/init.lua +++ b/init.lua @@ -190,6 +190,12 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- Toggle spell checking +vim.keymap.set('n', 'ts', function() + vim.opt.spell = not vim.o.spell + print('Spell checking is', (vim.o.spell and 'enabled' or 'disabled')) +end, { desc = '[T]oggle [S]pell' }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands`