diff options
Diffstat (limited to 'Common/nvim/lua/helper_functions.lua')
-rwxr-xr-x | Common/nvim/lua/helper_functions.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Common/nvim/lua/helper_functions.lua b/Common/nvim/lua/helper_functions.lua index cd84fc9..515854f 100755 --- a/Common/nvim/lua/helper_functions.lua +++ b/Common/nvim/lua/helper_functions.lua @@ -66,6 +66,17 @@ end, {range = true, desc = 'Format JSON'}) vim.keymap.set('n', '<leader>jq', FormatJson, { noremap = true, silent = true }) vim.keymap.set('v', '<leader>jq', ':FormatJson<CR>', { noremap = true, silent = true }) +function English() + vim.opt.spell = true + vim.opt.spelllang = "en_us" +end +vim.api.nvim_create_user_command('English', English, {bang=false, desc='Enables spellchecking for english'}) +function Norsk() + vim.opt.spell = true + vim.opt.spelllang = "nb_no" +end +vim.api.nvim_create_user_command('Norsk', Norsk, {bang=false, desc='Enables spellchecking for norsk bokmål'}) + -- Close buffer without closing window --[[ vim.cmd [[ |