Reformat + swap odin SSD
This commit is contained in:
parent
1bc27dde82
commit
2f3d05a802
83 changed files with 1448 additions and 931 deletions
|
|
@ -1,33 +1,34 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
themeBuilder = palette: with palette; ''
|
||||
set-face global value rgb:${normal.magenta},default
|
||||
set-face global type rgb:${bright.white},default
|
||||
set-face global identifier rgb:${normal.cyan},default
|
||||
set-face global string rgb:${normal.green},default
|
||||
set-face global error rgb:${normal.red},default
|
||||
set-face global keyword rgb:${normal.blue},default
|
||||
set-face global operator rgb:${normal.blue},default
|
||||
set-face global attribute rgb:${bright.blue},default
|
||||
set-face global comment rgb:${bright.blue},default
|
||||
set-face global meta rgb:${normal.yellow},default
|
||||
set-face global Default rgb:${normal.white},default
|
||||
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
|
||||
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
|
||||
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
|
||||
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
|
||||
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
|
||||
set-face global MenuBackground default,rgb:${normal.black}
|
||||
set-face global MenuInfo default,rgb:${normal.black}
|
||||
set-face global Information rgb:${dark.black},rgb:${normal.cyan}
|
||||
set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
|
||||
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
|
||||
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
|
||||
set-face global BufferPadding default,default
|
||||
'';
|
||||
themeBuilder = palette:
|
||||
with palette; ''
|
||||
set-face global value rgb:${normal.magenta},default
|
||||
set-face global type rgb:${bright.white},default
|
||||
set-face global identifier rgb:${normal.cyan},default
|
||||
set-face global string rgb:${normal.green},default
|
||||
set-face global error rgb:${normal.red},default
|
||||
set-face global keyword rgb:${normal.blue},default
|
||||
set-face global operator rgb:${normal.blue},default
|
||||
set-face global attribute rgb:${bright.blue},default
|
||||
set-face global comment rgb:${bright.blue},default
|
||||
set-face global meta rgb:${normal.yellow},default
|
||||
set-face global Default rgb:${normal.white},default
|
||||
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
|
||||
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
|
||||
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
|
||||
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
|
||||
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
|
||||
set-face global MenuBackground default,rgb:${normal.black}
|
||||
set-face global MenuInfo default,rgb:${normal.black}
|
||||
set-face global Information rgb:${dark.black},rgb:${normal.cyan}
|
||||
set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
|
||||
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
|
||||
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
|
||||
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
|
||||
set-face global BufferPadding default,default
|
||||
'';
|
||||
|
||||
packages = with pkgs; [
|
||||
yaml-language-server
|
||||
|
|
@ -40,33 +41,32 @@ let
|
|||
aspellDicts.en-science
|
||||
aspellDicts.it
|
||||
|
||||
(pkgs.makeDesktopItem
|
||||
{
|
||||
name = "kakoune";
|
||||
exec = "kak %F";
|
||||
icon = "kakoune";
|
||||
desktopName = "Kakoune";
|
||||
comment = "Kakoune text editor";
|
||||
terminal = true;
|
||||
categories = [ "Development" ];
|
||||
mimeTypes = [
|
||||
"text/english"
|
||||
"text/plain"
|
||||
"text/x-makefile"
|
||||
"text/x-c++hdr"
|
||||
"text/x-c++src"
|
||||
"text/x-chdr"
|
||||
"text/x-csrc"
|
||||
"text/x-java"
|
||||
"text/x-moc"
|
||||
"text/x-pascal"
|
||||
"text/x-tcl"
|
||||
"text/x-tex"
|
||||
"application/x-shellscript"
|
||||
"text/x-c"
|
||||
"text/x-c++"
|
||||
];
|
||||
})
|
||||
(pkgs.makeDesktopItem {
|
||||
name = "kakoune";
|
||||
exec = "kak %F";
|
||||
icon = "kakoune";
|
||||
desktopName = "Kakoune";
|
||||
comment = "Kakoune text editor";
|
||||
terminal = true;
|
||||
categories = [ "Development" ];
|
||||
mimeTypes = [
|
||||
"text/english"
|
||||
"text/plain"
|
||||
"text/x-makefile"
|
||||
"text/x-c++hdr"
|
||||
"text/x-c++src"
|
||||
"text/x-chdr"
|
||||
"text/x-csrc"
|
||||
"text/x-java"
|
||||
"text/x-moc"
|
||||
"text/x-pascal"
|
||||
"text/x-tcl"
|
||||
"text/x-tex"
|
||||
"application/x-shellscript"
|
||||
"text/x-c"
|
||||
"text/x-c++"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
in
|
||||
|
|
@ -81,40 +81,166 @@ in
|
|||
tabStop = 2;
|
||||
indentWidth = 2;
|
||||
alignWithTabs = true;
|
||||
scrollOff = { lines = 5; columns = 3; };
|
||||
ui = { setTitle = true; changeColors = true; enableMouse = true; };
|
||||
wrapLines = { enable = true; word = true; };
|
||||
numberLines = { enable = true; highlightCursor = true; };
|
||||
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 = "Edit file"; key = "<c-e>"; effect = ":edit<space>"; }
|
||||
{ mode = "user"; docstring = "Code actions"; key = "a"; effect = ":lsp-code-actions<ret>"; }
|
||||
{ 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 = "Copy to clipboard"; key = "y"; effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>"; }
|
||||
{ mode = "user"; docstring = "Format code with formatter"; key = "f"; effect = ":format<ret>"; }
|
||||
{ mode = "user"; docstring = "Format code with LSP"; key = "F"; effect = ":lsp-formatting-sync<ret>"; }
|
||||
{ mode = "user"; docstring = "Jump to definition"; key = "d"; effect = ":lsp-definition<ret>"; }
|
||||
{ mode = "user"; docstring = "Rename object"; key = "r"; effect = ":lsp-rename-prompt<ret>"; }
|
||||
{ mode = "user"; docstring = "Jump to type definition"; key = "t"; effect = ":lsp-type-definition<ret>"; }
|
||||
{ mode = "user"; docstring = "List project diagnostics"; key = "i"; effect = ":lsp-diagnostics<ret>"; }
|
||||
{ mode = "user"; docstring = "Paste from clipboard (after)"; key = "P"; effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||
{ mode = "user"; docstring = "Paste from clipboard (before)"; key = "p"; effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||
{ mode = "user"; docstring = "Show hover info"; key = "q"; effect = ":lsp-hover<ret>"; }
|
||||
{ mode = "user"; docstring = "Spellcheck English"; key = "S"; effect = ":spell en<ret>"; }
|
||||
{ mode = "user"; docstring = "Spellcheck"; key = "s"; effect = ":spell "; }
|
||||
{ mode = "normal"; docstring = "Try next snippet placeholder"; key = "<c-n>"; effect = "<a-;>: insert-c-n<ret>"; }
|
||||
{
|
||||
mode = "normal";
|
||||
docstring = "Edit file";
|
||||
key = "<c-e>";
|
||||
effect = ":edit<space>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Code actions";
|
||||
key = "a";
|
||||
effect = ":lsp-code-actions<ret>";
|
||||
}
|
||||
{
|
||||
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 = "Copy to clipboard";
|
||||
key = "y";
|
||||
effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Format code with formatter";
|
||||
key = "f";
|
||||
effect = ":format<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Format code with LSP";
|
||||
key = "F";
|
||||
effect = ":lsp-formatting-sync<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Jump to definition";
|
||||
key = "d";
|
||||
effect = ":lsp-definition<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Rename object";
|
||||
key = "r";
|
||||
effect = ":lsp-rename-prompt<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Jump to type definition";
|
||||
key = "t";
|
||||
effect = ":lsp-type-definition<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "List project diagnostics";
|
||||
key = "i";
|
||||
effect = ":lsp-diagnostics<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Paste from clipboard (after)";
|
||||
key = "P";
|
||||
effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Paste from clipboard (before)";
|
||||
key = "p";
|
||||
effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Show hover info";
|
||||
key = "q";
|
||||
effect = ":lsp-hover<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Spellcheck English";
|
||||
key = "S";
|
||||
effect = ":spell en<ret>";
|
||||
}
|
||||
{
|
||||
mode = "user";
|
||||
docstring = "Spellcheck";
|
||||
key = "s";
|
||||
effect = ":spell ";
|
||||
}
|
||||
{
|
||||
mode = "normal";
|
||||
docstring = "Try next snippet placeholder";
|
||||
key = "<c-n>";
|
||||
effect = "<a-;>: insert-c-n<ret>";
|
||||
}
|
||||
# { mode = "normal"; docstring = "Search"; key = "/"; effect = "/(?i)"; }
|
||||
# { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; }
|
||||
];
|
||||
hooks = with pkgs; [
|
||||
{ name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||
{
|
||||
name = "BufCreate";
|
||||
option = ".*";
|
||||
commands = "editorconfig-load";
|
||||
}
|
||||
# { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
||||
{ name = "ModuleLoaded"; option = "powerline"; commands = "powerline-enable; powerline-start"; }
|
||||
{ name = "BufSetOption"; option = "filetype=latex"; commands = "set-option buffer formatcmd latexindent"; }
|
||||
{ name = "BufSetOption"; option = "filetype=python"; commands = "set-option buffer formatcmd 'black -'"; }
|
||||
{ name = "BufSetOption"; option = "filetype=(markdown|html|json|yaml|css|scss|less)"; commands = "set-option buffer formatcmd prettier"; }
|
||||
{ name = "BufSetOption"; option = "filetype=rust"; commands = "set-option buffer formatcmd 'rustfmt'"; }
|
||||
{ name = "BufSetOption"; option = "filetype=sh"; commands = "set-option buffer formatcmd 'rustfmt'"; }
|
||||
{
|
||||
name = "ModuleLoaded";
|
||||
option = "powerline";
|
||||
commands = "powerline-enable; powerline-start";
|
||||
}
|
||||
{
|
||||
name = "BufSetOption";
|
||||
option = "filetype=latex";
|
||||
commands = "set-option buffer formatcmd latexindent";
|
||||
}
|
||||
{
|
||||
name = "BufSetOption";
|
||||
option = "filetype=python";
|
||||
commands = "set-option buffer formatcmd 'black -'";
|
||||
}
|
||||
{
|
||||
name = "BufSetOption";
|
||||
option = "filetype=(markdown|html|json|yaml|css|scss|less)";
|
||||
commands = "set-option buffer formatcmd prettier";
|
||||
}
|
||||
{
|
||||
name = "BufSetOption";
|
||||
option = "filetype=rust";
|
||||
commands = "set-option buffer formatcmd 'rustfmt'";
|
||||
}
|
||||
{
|
||||
name = "BufSetOption";
|
||||
option = "filetype=sh";
|
||||
commands = "set-option buffer formatcmd 'rustfmt'";
|
||||
}
|
||||
];
|
||||
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
|
||||
};
|
||||
|
|
@ -148,7 +274,8 @@ in
|
|||
};
|
||||
|
||||
# THEME FILE
|
||||
xdg.configFile."kak/colors/nord.kak".text = themeBuilder (pkgs.lib.rice.palette.toRgbShortHex pkgs.rice.colorPalette);
|
||||
xdg.configFile."kak/colors/nord.kak".text =
|
||||
themeBuilder (pkgs.lib.rice.palette.toRgbShortHex pkgs.rice.colorPalette);
|
||||
|
||||
xdg.configFile."kak-lsp/kak-lsp.toml".text = ''
|
||||
snippet_support = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue