-- Leo's gemini proxy
-- Connecting to gemini.hitchhiker-linux.org:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini;lang=en-US
I had an email reply to one of my posts this morning which pointed out a spelling error. Well, there was more to the reply, but for the sake of this post that's the important bit. Anyway, what's funny is that I was just last night looking at the possibility of adding spellcheck to my NeoVim configuration.
It turns out that NeoVim has a spell checker built in as of version 0.8. That's fantastic. You can turn it on with the command `:set spell`, or if you are using a language other than en_US `:set spelllang=<LANG>` where <LANG> would be your language code. But I really like having things like this mapped to an easy to remember keybind whenever possible, so I wanted to be able to toggle it on and off using `<leader>sc`. Well, that was pretty easy as well with the following snippet in init.lua.
-- Toggle spellcheck local function toggle_spell_check() vim.opt.spell = not(vim.opt.spell:get()) end vim.keymap.set('n', '<leader>sc', toggle_spell_check, {noremap=true})
I love having lua available in NeoVim.
All content for this site is licensed as CC BY-SA.
© 2023 by JeanG3nie
-- Response ended
-- Page fetched on Mon May 20 11:39:54 2024