feat: updated zenmode and updated autocmds for latex management
This commit is contained in:
parent
07d099ec00
commit
f9f1133c6d
2 changed files with 32 additions and 4 deletions
|
|
@ -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
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
tabstop = 4;
|
||||
shiftwidth = 4;
|
||||
expandtab = true;
|
||||
|
||||
wrap = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue