From fc346c28cba09ac49ca7b20f0b03be57b10a28be Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 5 Nov 2023 22:35:04 +0100 Subject: [PATCH] feat: disable spellcheck in terminals --- lua/core/plugins/toggleterm.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/core/plugins/toggleterm.lua b/lua/core/plugins/toggleterm.lua index 27472929..14849d05 100644 --- a/lua/core/plugins/toggleterm.lua +++ b/lua/core/plugins/toggleterm.lua @@ -17,11 +17,12 @@ local M = { shading_factor = "1", -- the percentage by which to lighten terminal background, default: -30 (gets multiplied by -3 if background is light) direction = "vertical", -- 'vertical' | 'horizontal' | 'window' | 'float', }) - map("t", "", "", { noremap = true }) -- back to normal mode in Terminal + + local opts = { noremap = true } + map("t", "", "", opts) -- back to normal mode in Terminal -- Better navigation to and from terminal local set_terminal_keymaps = function() - local opts = { noremap = true } buf_map(0, "t", "", [[]], opts) buf_map(0, "t", "", [[h]], opts) buf_map(0, "t", "", [[j]], opts) @@ -33,6 +34,7 @@ local M = { pattern = "term://*", callback = function() set_terminal_keymaps() + vim.cmd([[setlocal nospell]]) end, desc = "Mappings for navigation with a terminal", })