summaryrefslogtreecommitdiff
path: root/lua/talha/autocmds.lua
diff options
context:
space:
mode:
authortalha <talha@talhaamir.xyz>2024-01-04 00:05:58 +0500
committertalha <talha@talhaamir.xyz>2024-01-04 00:05:58 +0500
commit19ae0b8a623fcf2d5945d34484159ca6a7138806 (patch)
tree879ca6ecbb1ca91488a6a64af03c430e127478e0 /lua/talha/autocmds.lua
parenta2776ea78525cf4aeae8d099ff0b85dc3450374d (diff)
parentd17d01afef784a5277fa99b26bf7a9ba2ffa6357 (diff)
Merge branch 'main' of ta_git:/var/www/git/nvim
Diffstat (limited to 'lua/talha/autocmds.lua')
-rw-r--r--lua/talha/autocmds.lua14
1 files changed, 2 insertions, 12 deletions
diff --git a/lua/talha/autocmds.lua b/lua/talha/autocmds.lua
index a892fa2..4ce8ae4 100644
--- a/lua/talha/autocmds.lua
+++ b/lua/talha/autocmds.lua
@@ -1,19 +1,9 @@
local autocmd_group = vim.api.nvim_create_augroup("Custom auto-commands", { clear = true })
-vim.api.nvim_create_autocmd({ "BufWritePost" }, {
- pattern = { "*.py" },
- desc = "Auto-format python files after saving",
- callback = function()
- local filename = vim.api.nvim_buf_get_name(0)
- vim.cmd(":silent !autopep8 -i " .. filename)
- vim.cmd(":silent !isort " .. filename)
- end,
- group = autocmd_group,
-})
-
vim.api.nvim_create_autocmd({ "CursorHold" }, {
desc = "reload the file on changes",
- command = "checktime",
+ command = "silent! checktime",
group = autocmd_group,
})
+