Summary Files Commits Branches @commit @diff @stats
path: root / lua / filetype.lua
diff options
context:
space:
mode:
1 files changed, 4 insertions, 6 deletions
-rw-r--r--lua/filetype.lua10
diff --git a/lua/filetype.lua b/lua/filetype.lua
index 9f7e2b3..c814a3b 100644
--- a/lua/filetype.lua
+++ b/lua/filetype.lua
@@ -1,11 +1,9 @@
--[=[ Terminal buffers ]=]--
-vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, { callback = function (ev)
- if vim.bo.buftype == "terminal" then
- vim.wo.number = false
- vim.cmd("startinsert")
- end
-end })
+vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, {
+ pattern = "term://*",
+ command = "setlocal nonu | startinsert",
+})
vim.api.nvim_create_autocmd("TermClose", {
command = "quit!"
})