2024-03-12 14:37:43 -04:00
|
|
|
{
|
|
|
|
|
enable = true;
|
2024-03-24 16:34:09 -04:00
|
|
|
defaultEditor = true;
|
2024-03-12 14:37:43 -04:00
|
|
|
config = {
|
2024-03-21 01:41:11 -04:00
|
|
|
colorScheme = "tomorrow-night";
|
2024-03-12 14:37:43 -04:00
|
|
|
numberLines = {
|
|
|
|
|
enable = true;
|
|
|
|
|
highlightCursor = true;
|
|
|
|
|
};
|
|
|
|
|
hooks = [
|
|
|
|
|
{
|
2024-04-11 15:54:41 -04:00
|
|
|
# When the filetype=latex option is set in a buffer context (automatically), add a new hook to build the latex file on write
|
2024-03-12 14:37:43 -04:00
|
|
|
name = "BufSetOption";
|
|
|
|
|
option = "filetype=latex";
|
2024-04-11 15:54:41 -04:00
|
|
|
commands = "hook buffer BufWritePost .* %{ texlab-build }";
|
2024-03-12 14:37:43 -04:00
|
|
|
}
|
|
|
|
|
];
|
2024-03-24 23:18:13 -04:00
|
|
|
keyMappings = [
|
|
|
|
|
# Define usermode yank/copy and paste
|
|
|
|
|
{
|
|
|
|
|
key = "y";
|
|
|
|
|
mode = "user";
|
|
|
|
|
effect = "<a-|> wl-copy<ret>";
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
key = "p";
|
|
|
|
|
mode = "user";
|
|
|
|
|
effect = "<a-!> wl-paste<ret>;d"; # ;d at the end since newline inserted
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
key = "P";
|
|
|
|
|
mode = "user";
|
|
|
|
|
effect = "! wl-paste<ret>;d"; # ;d at the end since newline inserted
|
|
|
|
|
}
|
|
|
|
|
];
|
2024-03-12 14:37:43 -04:00
|
|
|
};
|
|
|
|
|
extraConfig = ''
|
2024-04-11 15:54:41 -04:00
|
|
|
# highlight trailing whitespace
|
|
|
|
|
add-highlighter global/trailing-whitespace regex '\h+$' 0:Error
|
|
|
|
|
|
|
|
|
|
# don't remove trailing indent
|
|
|
|
|
set global disabled_hooks .*-trim-indent
|
|
|
|
|
|
2024-03-12 14:37:43 -04:00
|
|
|
eval %sh{kak-lsp --kakoune -s $kak_session}
|
|
|
|
|
lsp-enable
|
|
|
|
|
'';
|
|
|
|
|
}
|