dotfiles/home/modules/tui/neovim/autocmds.nix

32 lines
606 B
Nix
Raw Normal View History

2024-12-05 03:11:13 +00:00
{
programs.nixvim.autoCmd = [
# Vertically center document when entering insert mode
{
event = "InsertEnter";
command = "norm zz";
}
# Open help in a vertical split
{
event = "FileType";
pattern = "help";
command = "wincmd L";
}
# Enable spellcheck for some filetypes
{
event = "FileType";
2024-12-20 01:30:06 +00:00
pattern = [ "markdown" ];
2024-12-05 03:11:13 +00:00
command = "setlocal spell spelllang=en";
}
2024-12-05 22:05:07 +00:00
# Enable wrap for some filetypes
{
event = "FileType";
2024-12-20 01:30:06 +00:00
pattern = [ "markdown" ];
2024-12-05 22:05:07 +00:00
command = "setlocal wrap linebreak";
}
2024-12-05 03:11:13 +00:00
];
2024-12-05 22:05:07 +00:00
}