feat: updated zenmode and updated autocmds for latex management

This commit is contained in:
Ceferino Patino 2025-07-01 13:17:55 -05:00
commit f9f1133c6d
Signed by: c4patino
SSH key fingerprint: SHA256:9fQ9TsujGrdNNi76mnsu63v7dS5JOmHRZEqBOl49OR8
2 changed files with 32 additions and 4 deletions

View file

@ -2,12 +2,39 @@
autoCmd = [
{
event = "TextYankPost";
callback.__raw = ''function() vim.highlight.on_yank({ higroup = "IncSearch", timeout = 40, }) end'';
callback.__raw = ''
function()
vim.highlight.on_yank({ higroup = "IncSearch", timeout = 50, });
end
'';
}
{
event = ["FileType"];
pattern = ["nix" "typescript" "javascript" "typescriptreact" "javascriptreact" "astro"];
callback.__raw = ''function() vim.opt_local.tabstop = 2; vim.opt_local.shiftwidth = 2; vim.opt_local.expandtab = true; end'';
event = "FileType";
pattern = ["astro" "javascript" "javascriptreact" "nix" "tex" "typescript" "typescriptreact"];
callback.__raw = ''
function()
vim.opt_local.tabstop = 2;
vim.opt_local.shiftwidth = 2;
vim.opt_local.expandtab = true;
end
'';
}
{
event = "FileType";
pattern = "tex";
callback.__raw = ''
function()
vim.opt_local.wrap = true;
vim.opt_local.linebreak = true;
vim.keymap.set("n", "<leader>zz", function()
if require("zen-mode.view").is_open() then
require("zen-mode").toggle()
else
require("zen-mode").toggle({ window = { width = 85 } })
end
end, { buffer = true, desc = "ZenMode toggle" })
end
'';
}
];
}

View file

@ -10,6 +10,7 @@
tabstop = 4;
shiftwidth = 4;
expandtab = true;
wrap = false;