diff --git a/lua/neogit/buffers/editor/init.lua b/lua/neogit/buffers/editor/init.lua index ca3842734..80f832868 100644 --- a/lua/neogit/buffers/editor/init.lua +++ b/lua/neogit/buffers/editor/init.lua @@ -77,6 +77,7 @@ function M:open(kind) name = self.filename, filetype = filetype, load = true, + spell_check = true, buftype = "", kind = kind, modifiable = true, diff --git a/lua/neogit/lib/buffer.lua b/lua/neogit/lib/buffer.lua index 76b7d6647..788566d10 100644 --- a/lua/neogit/lib/buffer.lua +++ b/lua/neogit/lib/buffer.lua @@ -554,6 +554,7 @@ end ---@field user_mappings table|nil ---@field autocmds table|nil ---@field user_autocmds table|nil +---@field spell_check boolean|nil ---@field initialize function|nil ---@field after function|nil ---@field on_detach function|nil @@ -651,7 +652,7 @@ function Buffer.create(config) vim.opt_local.fillchars:append("fold: ") end) - buffer:set_window_option("spell", false) + buffer:set_window_option("spell", config.spell_check or false) buffer:set_window_option("wrap", false) buffer:set_window_option("foldmethod", "manual") -- TODO: Need to find a way to turn this off properly when unloading plugin