diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-10-15 05:22:02 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-10-15 05:48:18 +0900 |
| commit | 598c42b9ac4f44582caa5e1253b796a1860963c3 (patch) | |
| tree | 0b5bb35807009f0c92ac8bd1e1f7195b5d7e3f91 /.config | |
| parent | f30efaf4cb5debcecd06f3c8c94d199de9f30bfe (diff) | |
| download | dotfiles-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.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/vimrc/plugins.lua | 9 |
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, |
