Nix dotfiles
This commit is contained in:
commit
bee359e19d
3 changed files with 312 additions and 0 deletions
131
kakoune.nix
Normal file
131
kakoune.nix
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
{pkgs, ...} :
|
||||
|
||||
{
|
||||
colorScheme = "nord";
|
||||
tabStop = 2;
|
||||
indentWidth = 2;
|
||||
scrollOff = {
|
||||
lines = 5;
|
||||
columns = 3;
|
||||
};
|
||||
ui = {
|
||||
setTitle = true;
|
||||
changeColors = true;
|
||||
enableMouse = true;
|
||||
};
|
||||
wrapLines = {
|
||||
enable = true;
|
||||
word = true;
|
||||
};
|
||||
numberLines = {
|
||||
enable = true;
|
||||
highlightCursor = true;
|
||||
};
|
||||
keyMappings = [{
|
||||
mode = "normal";
|
||||
docstring = "Open file";
|
||||
key = "<c-o>";
|
||||
effect = ":edit<space>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Comment block";
|
||||
key = "b";
|
||||
effect = ":comment-block<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Comment line";
|
||||
key = "l";
|
||||
effect = ":comment-line<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Show hover info";
|
||||
key = "q";
|
||||
effect = ":lsp-hover<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Jump to definition";
|
||||
key = "d";
|
||||
effect = ":lsp-definition<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "List project diagnostics";
|
||||
key = "i";
|
||||
effect = ":lsp-diagnostics<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Jump to type definition";
|
||||
key = "t";
|
||||
effect = ":lsp-type-definition<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Code actions";
|
||||
key = "a";
|
||||
effect = ":lsp-code-actions<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Format code";
|
||||
key = "F";
|
||||
effect = ":lsp-formatting-sync<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Spellcheck";
|
||||
key = "s";
|
||||
effect = ":spell ";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Spellcheck English";
|
||||
key = "S";
|
||||
effect = ":spell en<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Copy to clipboard";
|
||||
key = "y";
|
||||
effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Paste from clipboard (before)";
|
||||
key = "p";
|
||||
effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
|
||||
} {
|
||||
mode = "user";
|
||||
docstring = "Paste from clipboard (after)";
|
||||
key = "P";
|
||||
effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
|
||||
}];
|
||||
hooks = [{
|
||||
name = "WinSetOption";
|
||||
option = "filetype=(rust|python|c|cpp|latex|javascript|go)";
|
||||
commands = builtins.concatStringsSep "\n" [
|
||||
"lsp-enable-window"
|
||||
];
|
||||
} {
|
||||
name = "BufCreate";
|
||||
option = ".*";
|
||||
commands = "editorconfig-load";
|
||||
} {
|
||||
name = "ModuleLoaded";
|
||||
option = "powerline";
|
||||
commands = builtins.concatStringsSep "\n" [
|
||||
# "powerline-theme default"
|
||||
"powerline-enable"
|
||||
];
|
||||
} {
|
||||
name = "ModuleLoaded";
|
||||
option = "auto-pairs";
|
||||
commands = "auto-pairs-enable";
|
||||
} {
|
||||
name = "InsertCompletionShow";
|
||||
option = ".*";
|
||||
commands = builtins.concatStringsSep "\n" [
|
||||
"map window insert <tab> <c-n>"
|
||||
"map window insert <s-tab> <c-p>"
|
||||
];
|
||||
} {
|
||||
name = "InsertCompletionHide";
|
||||
option = ".*";
|
||||
commands = builtins.concatStringsSep "\n" [
|
||||
"unmap window insert <tab> <c-n>"
|
||||
"unmap window insert <s-tab> <c-p>"
|
||||
];
|
||||
}];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue