summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSquibid <me@zacharyscheiman.com>2023-10-22 18:49:49 -0400
committerSquibid <me@zacharyscheiman.com>2023-10-22 18:49:49 -0400
commit274091478134d56aa61c60373215f475651188bb (patch)
treeee63f6950379e0b67d789189dd7f80771739f3cc
parentfb93992c3fb6bce50ff26a0a4214a17952e3fe89 (diff)
downloadnvim-274091478134d56aa61c60373215f475651188bb.tar.gz
nvim-274091478134d56aa61c60373215f475651188bb.tar.bz2
nvim-274091478134d56aa61c60373215f475651188bb.zip
set spell when entering commit, and use ftplugin instead of autocmds
Diffstat (limited to '')
-rw-r--r--after/ftplugin/gitcommit.lua2
l---------after/ftplugin/gitrebase.lua1
-rw-r--r--lua/core/auto.lua7
3 files changed, 3 insertions, 7 deletions
diff --git a/after/ftplugin/gitcommit.lua b/after/ftplugin/gitcommit.lua
new file mode 100644
index 0000000..8207d63
--- /dev/null
+++ b/after/ftplugin/gitcommit.lua
@@ -0,0 +1,2 @@
+vim.cmd('set spell!')
+vim.cmd('startinsert | 1')
diff --git a/after/ftplugin/gitrebase.lua b/after/ftplugin/gitrebase.lua
new file mode 120000
index 0000000..9619e9a
--- /dev/null
+++ b/after/ftplugin/gitrebase.lua
@@ -0,0 +1 @@
+gitcommit.lua \ No newline at end of file
diff --git a/lua/core/auto.lua b/lua/core/auto.lua
index 4c50357..170f2d7 100644
--- a/lua/core/auto.lua
+++ b/lua/core/auto.lua
@@ -13,13 +13,6 @@ auto('TextYankPost', { -- highlight yanks
end
})
-auto('FileType', { -- start git messages in insert mode
- group = 'bufcheck',
- pattern = { 'gitcommit', 'gitrebase', },
- desc = 'Start git messages in insert mode.',
- command = 'startinsert | 1'
-})
-
auto('BufRead', { -- return to last place
pattern = '*',
command = [[call setpos(".", getpos("'\""))]],