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";
|
|
|
|
}
|
|
|
|
|
2024-12-24 03:27:39 +00:00
|
|
|
# Markdown overrides
|
2024-12-05 03:11:13 +00:00
|
|
|
{
|
|
|
|
event = "FileType";
|
2024-12-20 01:30:06 +00:00
|
|
|
pattern = [ "markdown" ];
|
2024-12-24 03:27:39 +00:00
|
|
|
command = "setlocal spell spelllang=en wrap linebreak ts=2 sw=2 sts=2";
|
2024-12-05 03:11:13 +00:00
|
|
|
}
|
2024-12-05 22:05:07 +00:00
|
|
|
|
2025-01-03 16:55:09 +00:00
|
|
|
# Gitlab CI
|
|
|
|
{
|
|
|
|
event = [ "BufRead" "BufNewFile" ];
|
|
|
|
pattern = "*.gitlab-ci*.{yml,yaml}";
|
|
|
|
callback = { __raw = "function() vim.bo.filetype = 'yaml.gitlab' end"; };
|
|
|
|
}
|
|
|
|
|
2024-12-05 03:11:13 +00:00
|
|
|
];
|
2024-12-05 22:05:07 +00:00
|
|
|
}
|
|
|
|
|