summaryrefslogtreecommitdiff
path: root/ar/.config/TheSiahxyz/lua/thesiahxyz/core
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-04 11:53:12 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-06-04 11:53:12 +0900
commitd29b84c02475e9cbd72c59528ad9950e9f26ad65 (patch)
treeb20df92be3c1dbbfbfe932729e389953052f80ff /ar/.config/TheSiahxyz/lua/thesiahxyz/core
parenta8391ceeeb3311905fcb8c7c455413d0c72dcf0e (diff)
modified core/autocmds.lua, modified plugins/markdown.lua, modified plugins/mini.lua, modified tmux/tmux.conf
Diffstat (limited to 'ar/.config/TheSiahxyz/lua/thesiahxyz/core')
-rw-r--r--ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
index 5ff20f9..e6eba4c 100644
--- a/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
+++ b/ar/.config/TheSiahxyz/lua/thesiahxyz/core/autocmds.lua
@@ -142,10 +142,10 @@ autocmd("BufWritePre", {
group = file_save,
pattern = "*",
callback = function()
- -- Remove trailing spaces
- vim.cmd([[ %s/\s\+$//e ]])
- -- Remove trailing newlines
- vim.cmd([[ %s/\n\+\%$//e ]])
+ local cursor_pos = vim.api.nvim_win_get_cursor(0)
+ vim.cmd([[ %s/\s\+$//e ]]) -- Remove trailing spaces
+ vim.cmd([[ %s/\n\+\%$//e ]]) -- Remove trailing newlines
+ vim.api.nvim_win_set_cursor(0, cursor_pos)
end,
})
@@ -256,9 +256,9 @@ vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
})
-- TeX for .tex files
-vim.api.nvim_create_autocmd("VimLeavePre", {
- pattern = "*.tex",
- command = "!latexmk -c %",
+vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
+ pattern = { "*.tex" },
+ command = "set filetype=tex",
})
-- When shortcut files are updated, renew bash and lf configs with new material: