aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-10-15 05:22:02 +0900
committernsfisis <nsfisis@gmail.com>2025-10-15 05:48:18 +0900
commit598c42b9ac4f44582caa5e1253b796a1860963c3 (patch)
tree0b5bb35807009f0c92ac8bd1e1f7195b5d7e3f91 /.config
parentf30efaf4cb5debcecd06f3c8c94d199de9f30bfe (diff)
downloaddotfiles-598c42b9ac4f44582caa5e1253b796a1860963c3.tar.gz
dotfiles-598c42b9ac4f44582caa5e1253b796a1860963c3.tar.zst
dotfiles-598c42b9ac4f44582caa5e1253b796a1860963c3.zip
nvim: always enable 'spell' on gitcommit buffer
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/after/ftplugin/gitcommit.lua3
-rw-r--r--.config/nvim/lua/vimrc/plugins.lua9
2 files changed, 10 insertions, 2 deletions
diff --git a/.config/nvim/after/ftplugin/gitcommit.lua b/.config/nvim/after/ftplugin/gitcommit.lua
new file mode 100644
index 0000000..b7662fa
--- /dev/null
+++ b/.config/nvim/after/ftplugin/gitcommit.lua
@@ -0,0 +1,3 @@
+vimrc.after_ftplugin('gitcommit', function(conf)
+ vim.o.spell = true
+end)
diff --git a/.config/nvim/lua/vimrc/plugins.lua b/.config/nvim/lua/vimrc/plugins.lua
index 395cc58..217f21c 100644
--- a/.config/nvim/lua/vimrc/plugins.lua
+++ b/.config/nvim/lua/vimrc/plugins.lua
@@ -507,9 +507,14 @@ return {
{
'rhysd/committia.vim',
config = function()
+ -- Disable 'spell' option, which is inherited from gitcommit buffer.
+ -- See also: ../../after/ftplugin/gitcommit.lua
vim.g.committia_hooks = {
- edit_open = function(_info)
- vim.wo.spell = true
+ diff_open = function(_info)
+ vim.o.spell = false
+ end,
+ status_open = function(_info)
+ vim.o.spell = false
end,
}
end,