made cursor center on entering insert mode and commented out svelte autocommand

This commit is contained in:
2026-08-16 09:42:59 +01:00
parent 5cab6466dd
commit ce3c64b2b0
2 changed files with 12 additions and 7 deletions

View File

@@ -27,12 +27,12 @@ vim.api.nvim_create_autocmd("VimEnter", {
end,
})
vim.api.nvim_create_autocmd("FileType", {
pattern = { "svelte" },
callback = function()
vim.treesitter.start()
end,
})
-- vim.api.nvim_create_autocmd("FileType", {
-- pattern = { "svelte" },
-- callback = function()
-- vim.treesitter.start()
-- end,
-- })
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
@@ -80,3 +80,9 @@ vim.api.nvim_create_autocmd("User", {
print("AutoSave disabled")
end,
})
-- Center cursor on screen whenver insert mode is activated
-- (Stops fucky wucky shit with scrollEOF)
vim.api.nvim_create_autocmd("InsertEnter", {
command = "normal! zz",
})

View File

@@ -14,7 +14,6 @@ Keymap("n", "<leader>bd", function() -- delete buffer
end)
for _, bind in ipairs({ "i", "a", "A", "I" }) do
-- Pass { expr = true } as the fourth argument
Keymap("n", bind, function()
if vim.fn.getline("."):match("^%s*$") then
return [["_cc]]