WIP: update to 23.11
This commit is contained in:
parent
ab9c5297fc
commit
330d7c2338
22 changed files with 765 additions and 835 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{ pkgs, config, lib, ... }: {
|
||||
home.packages = (builtins.attrValues {
|
||||
inherit (pkgs) nixpkgs-fmt nixfmt nix-prefetch-scripts nix-review nix-tree;
|
||||
}) ++ lib.optionals config.programs.helix.enable [ pkgs.nil ]
|
||||
++ lib.optionals config.programs.kakoune.enable [ pkgs.rnix-lsp ];
|
||||
home.packages =
|
||||
(builtins.attrValues { inherit (pkgs) nixpkgs-fmt nixfmt nix-prefetch-scripts nixpkgs-review nix-tree; })
|
||||
++ lib.optionals config.programs.helix.enable [ pkgs.nil ]
|
||||
++ lib.optionals config.programs.kakoune.enable [ pkgs.rnix-lsp ];
|
||||
programs.neovim.plugins = [ pkgs.vimPlugins.vim-nix ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
programs.exa = {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
enableAliases = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -90,39 +90,46 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Filippo Berto";
|
||||
userEmail = "berto.f@protonmail.com";
|
||||
# signing = {
|
||||
# key = "berto.f@protonmail.com";
|
||||
# signByDefault = true;
|
||||
# };
|
||||
extraConfig = {
|
||||
"add.interactive".useBuiltin = false;
|
||||
commit.gpgSign = true;
|
||||
core.editor = "hx";
|
||||
# credential.helper = "git-credential-libsecret";
|
||||
delta.side-by-side = true;
|
||||
delta.line-numbers = true;
|
||||
delta.navigate = true;
|
||||
delta.wrap-max-lines = "unlimited";
|
||||
diff.colorMoved = "default";
|
||||
diff.guitool = "meld";
|
||||
diff.tool = "meld";
|
||||
# init.defaultBranch = "main";
|
||||
merge.conflictstyle = "diff3";
|
||||
merge.guitool = "meld";
|
||||
merge.tool = "meld";
|
||||
pull.rebase = true;
|
||||
rebase.autoStash = true;
|
||||
user.signingKey = "berto.f@protonmail.com";
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "Filippo Berto";
|
||||
userEmail = "berto.f@protonmail.com";
|
||||
# signing = {
|
||||
# key = "berto.f@protonmail.com";
|
||||
# signByDefault = true;
|
||||
# };
|
||||
extraConfig = {
|
||||
"add.interactive".useBuiltin = false;
|
||||
commit.gpgSign = true;
|
||||
core.editor = "hx";
|
||||
# credential.helper = "git-credential-libsecret";
|
||||
delta = {
|
||||
line-numbers = true;
|
||||
navigate = true;
|
||||
side-by-side = true;
|
||||
wrap-max-lines = "unlimited";
|
||||
};
|
||||
diff = {
|
||||
colorMoved = "default";
|
||||
guitool = "meld";
|
||||
tool = "meld";
|
||||
};
|
||||
# init.defaultBranch = "main";
|
||||
merge = {
|
||||
conflictstyle = "diff3";
|
||||
guitool = "meld";
|
||||
tool = "meld";
|
||||
};
|
||||
pull.rebase = true;
|
||||
rebase.autoStash = true;
|
||||
user.signingKey = "berto.f@protonmail.com";
|
||||
};
|
||||
lfs.enable = true;
|
||||
delta.enable = true;
|
||||
};
|
||||
lfs.enable = true;
|
||||
delta.enable = true;
|
||||
bash.shellAliases = shellAliases;
|
||||
zsh.shellAliases = shellAliases;
|
||||
};
|
||||
programs.bash.shellAliases = shellAliases;
|
||||
programs.zsh.shellAliases = shellAliases;
|
||||
home.packages =
|
||||
builtins.attrValues { inherit (pkgs) gh git-secret glab meld; };
|
||||
home.packages = builtins.attrValues { inherit (pkgs) gh git-secret glab meld; };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,145 +1,124 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.bash.shellAliases = { x = "hx"; };
|
||||
programs.zsh.shellAliases = { x = "hx"; };
|
||||
home.sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
VISUAL = "hx";
|
||||
home = {
|
||||
sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; };
|
||||
packages = builtins.attrValues {
|
||||
inherit (pkgs) nil; # Nix language server
|
||||
# inherit desktopItem;
|
||||
};
|
||||
};
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs) nil; # Nix language server
|
||||
# inherit desktopItem;
|
||||
};
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
package = pkgs.unstable_pkgs.helix;
|
||||
languages.language = [{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
}];
|
||||
languages.language-server = {
|
||||
nil.config.nil = {
|
||||
formatting.command = [ "nixpkgs-fmt" ];
|
||||
autoEvalInputs = true;
|
||||
};
|
||||
texlab.config.texlab = {
|
||||
formatterLineLength = 0;
|
||||
bibtexFormatter = "latexindent";
|
||||
latexindent.modifyLineBreaks = false;
|
||||
# chktex.onOpenAndSave = true;
|
||||
chktex.onEdit = true;
|
||||
};
|
||||
yaml-language-server.config.yaml = {
|
||||
keyOrdering = false;
|
||||
schemas = {
|
||||
kubernetes = "*.yaml";
|
||||
"http://json.schemastore.org/github-workflow" = ".github/workflows/*";
|
||||
"http://json.schemastore.org/github-action" = ".github/action.{yml,yaml}";
|
||||
"http://json.schemastore.org/ansible-stable-2.9" = "roles/tasks/*.{yml,yaml}";
|
||||
"http://json.schemastore.org/prettierrc" = ".prettierrc.{yml,yaml}";
|
||||
"http://json.schemastore.org/kustomization" = "kustomization.{yml,yaml}";
|
||||
"http://json.schemastore.org/ansible-playbook" = "*play*.{yml,yaml}";
|
||||
"http://json.schemastore.org/chart" = "Chart.{yml,yaml}";
|
||||
"https://json.schemastore.org/dependabot-v2" = ".github/dependabot.{yml,yaml}";
|
||||
"https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json" = "*gitlab-ci*.{yml,yaml}";
|
||||
"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json" = "*api*.{yml,yaml}";
|
||||
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json" = "*docker-compose*.{yml,yaml}";
|
||||
"https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json" = "*flow*.{yml,yaml}";
|
||||
programs = {
|
||||
bash.shellAliases = { x = "hx"; };
|
||||
zsh.shellAliases = { x = "hx"; };
|
||||
helix = {
|
||||
enable = true;
|
||||
package = pkgs.unstable_pkgs.helix;
|
||||
languages.language = [{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
}];
|
||||
languages.language-server = {
|
||||
nil.config.nil = {
|
||||
formatting.command = [ "nixpkgs-fmt" ];
|
||||
autoEvalInputs = true;
|
||||
};
|
||||
texlab.config.texlab = {
|
||||
formatterLineLength = 0;
|
||||
bibtexFormatter = "latexindent";
|
||||
latexindent.modifyLineBreaks = false;
|
||||
# chktex.onOpenAndSave = true;
|
||||
chktex.onEdit = true;
|
||||
};
|
||||
yaml-language-server.config.yaml = {
|
||||
keyOrdering = false;
|
||||
schemas = {
|
||||
kubernetes = "*.yaml";
|
||||
"http://json.schemastore.org/github-workflow" = ".github/workflows/*";
|
||||
"http://json.schemastore.org/github-action" = ".github/action.{yml,yaml}";
|
||||
"http://json.schemastore.org/ansible-stable-2.9" = "roles/tasks/*.{yml,yaml}";
|
||||
"http://json.schemastore.org/prettierrc" = ".prettierrc.{yml,yaml}";
|
||||
"http://json.schemastore.org/kustomization" = "kustomization.{yml,yaml}";
|
||||
"http://json.schemastore.org/ansible-playbook" = "*play*.{yml,yaml}";
|
||||
"http://json.schemastore.org/chart" = "Chart.{yml,yaml}";
|
||||
"https://json.schemastore.org/dependabot-v2" = ".github/dependabot.{yml,yaml}";
|
||||
"https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json" = "*gitlab-ci*.{yml,yaml}";
|
||||
"https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/schemas/v3.1/schema.json" = "*api*.{yml,yaml}";
|
||||
"https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json" = "*docker-compose*.{yml,yaml}";
|
||||
"https://raw.githubusercontent.com/argoproj/argo-workflows/master/api/jsonschema/schema.json" = "*flow*.{yml,yaml}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
theme = "nightfox";
|
||||
editor = {
|
||||
lsp.display-messages = true;
|
||||
lsp.display-inlay-hints = true;
|
||||
scrolloff = 5;
|
||||
soft-wrap.enable = true;
|
||||
true-color = true;
|
||||
};
|
||||
keys.normal = {
|
||||
"C-A-l" = ":format";
|
||||
"A-r" = ":reload";
|
||||
"C-A-r" = ":reload-all";
|
||||
};
|
||||
};
|
||||
themes =
|
||||
let
|
||||
transparent = "none";
|
||||
gray = "#665c54";
|
||||
dark-gray = "#3c3836";
|
||||
white = "#fbf1c7";
|
||||
black = "#282828";
|
||||
red = "#fb4934";
|
||||
green = "#b8bb26";
|
||||
yellow = "#fabd2f";
|
||||
orange = "#fe8019";
|
||||
blue = "#83a598";
|
||||
magenta = "#d3869b";
|
||||
cyan = "#8ec07c";
|
||||
in
|
||||
{
|
||||
base16 = {
|
||||
"ui.menu" = transparent;
|
||||
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
|
||||
"ui.linenr" = {
|
||||
fg = gray;
|
||||
bg = dark-gray;
|
||||
};
|
||||
"ui.popup" = { modifiers = [ "reversed" ]; };
|
||||
"ui.linenr.selected" = {
|
||||
fg = white;
|
||||
bg = black;
|
||||
modifiers = [ "bold" ];
|
||||
};
|
||||
"ui.selection" = {
|
||||
fg = black;
|
||||
bg = blue;
|
||||
};
|
||||
"ui.selection.primary" = { modifiers = [ "reversed" ]; };
|
||||
"comment" = { fg = gray; };
|
||||
"ui.statusline" = {
|
||||
fg = white;
|
||||
bg = dark-gray;
|
||||
};
|
||||
"ui.statusline.inactive" = {
|
||||
fg = dark-gray;
|
||||
bg = white;
|
||||
};
|
||||
"ui.help" = {
|
||||
fg = dark-gray;
|
||||
bg = white;
|
||||
};
|
||||
"ui.cursor" = { modifiers = [ "reversed" ]; };
|
||||
"variable" = red;
|
||||
"variable.builtin" = orange;
|
||||
"constant.numeric" = orange;
|
||||
"constant" = orange;
|
||||
"attributes" = yellow;
|
||||
"type" = yellow;
|
||||
"ui.cursor.match" = {
|
||||
fg = yellow;
|
||||
modifiers = [ "underlined" ];
|
||||
};
|
||||
"string" = green;
|
||||
"variable.other.member" = red;
|
||||
"constant.character.escape" = cyan;
|
||||
"function" = blue;
|
||||
"constructor" = blue;
|
||||
"special" = blue;
|
||||
"keyword" = magenta;
|
||||
"label" = magenta;
|
||||
"namespace" = blue;
|
||||
"diff.plus" = green;
|
||||
"diff.delta" = yellow;
|
||||
"diff.minus" = red;
|
||||
"diagnostic" = { modifiers = [ "underlined" ]; };
|
||||
"ui.gutter" = { bg = black; };
|
||||
"info" = blue;
|
||||
"hint" = dark-gray;
|
||||
"debug" = dark-gray;
|
||||
"warning" = yellow;
|
||||
"error" = red;
|
||||
settings = {
|
||||
theme = "nightfox";
|
||||
editor = {
|
||||
lsp.display-messages = true;
|
||||
lsp.display-inlay-hints = true;
|
||||
scrolloff = 5;
|
||||
soft-wrap.enable = true;
|
||||
true-color = true;
|
||||
};
|
||||
keys.normal = {
|
||||
"C-A-l" = ":format";
|
||||
"A-r" = ":reload";
|
||||
"C-A-r" = ":reload-all";
|
||||
};
|
||||
};
|
||||
themes =
|
||||
let
|
||||
transparent = "none";
|
||||
gray = "#665c54";
|
||||
dark-gray = "#3c3836";
|
||||
white = "#fbf1c7";
|
||||
black = "#282828";
|
||||
red = "#fb4934";
|
||||
green = "#b8bb26";
|
||||
yellow = "#fabd2f";
|
||||
orange = "#fe8019";
|
||||
blue = "#83a598";
|
||||
magenta = "#d3869b";
|
||||
cyan = "#8ec07c";
|
||||
in
|
||||
{
|
||||
base16 = {
|
||||
"ui.menu" = transparent;
|
||||
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
|
||||
"ui.linenr" = { fg = gray; bg = dark-gray; };
|
||||
"ui.popup" = { modifiers = [ "reversed" ]; };
|
||||
"ui.linenr.selected" = { fg = white; bg = black; modifiers = [ "bold" ]; };
|
||||
"ui.selection" = { fg = black; bg = blue; };
|
||||
"ui.selection.primary" = { modifiers = [ "reversed" ]; };
|
||||
"comment" = { fg = gray; };
|
||||
"ui.statusline" = { fg = white; bg = dark-gray; };
|
||||
"ui.statusline.inactive" = { fg = dark-gray; bg = white; };
|
||||
"ui.help" = { fg = dark-gray; bg = white; };
|
||||
"ui.cursor" = { modifiers = [ "reversed" ]; };
|
||||
"variable" = red;
|
||||
"variable.builtin" = orange;
|
||||
"constant.numeric" = orange;
|
||||
"constant" = orange;
|
||||
"attributes" = yellow;
|
||||
"type" = yellow;
|
||||
"ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; };
|
||||
"string" = green;
|
||||
"variable.other.member" = red;
|
||||
"constant.character.escape" = cyan;
|
||||
"function" = blue;
|
||||
"constructor" = blue;
|
||||
"special" = blue;
|
||||
"keyword" = magenta;
|
||||
"label" = magenta;
|
||||
"namespace" = blue;
|
||||
"diff.plus" = green;
|
||||
"diff.delta" = yellow;
|
||||
"diff.minus" = red;
|
||||
"diagnostic" = { modifiers = [ "underlined" ]; };
|
||||
"ui.gutter" = { bg = black; };
|
||||
"info" = blue;
|
||||
"hint" = dark-gray;
|
||||
"debug" = dark-gray;
|
||||
"warning" = yellow;
|
||||
"error" = red;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,207 +63,210 @@ let
|
|||
|
||||
in
|
||||
{
|
||||
programs.bash.shellAliases = { k = "kak"; };
|
||||
programs.zsh.shellAliases = { k = "kak"; };
|
||||
home.packages = packages;
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
config = {
|
||||
colorScheme = "nord";
|
||||
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;
|
||||
};
|
||||
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 = "Search"; key = "/"; effect = "/(?i)"; }
|
||||
# { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; }
|
||||
];
|
||||
hooks = [
|
||||
{
|
||||
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'";
|
||||
}
|
||||
];
|
||||
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
|
||||
};
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
"# Custom commands"
|
||||
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||
"eval %sh{kak-lsp --kakoune -s $kak_session}"
|
||||
"lsp-enable"
|
||||
''
|
||||
def -hidden insert-c-n %{
|
||||
try %{
|
||||
lsp-snippets-select-next-placeholders
|
||||
exec '<a-;>d'
|
||||
} catch %{
|
||||
exec -with-hooks '<c-n>'
|
||||
programs = {
|
||||
bash.shellAliases = { k = "kak"; };
|
||||
zsh.shellAliases = { k = "kak"; };
|
||||
kakoune = {
|
||||
enable = true;
|
||||
config = {
|
||||
colorScheme = "nord";
|
||||
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;
|
||||
};
|
||||
keyMappings = [
|
||||
{
|
||||
mode = "normal";
|
||||
docstring = "Edit file";
|
||||
key = "<c-e>";
|
||||
effect = ":edit<space>";
|
||||
}
|
||||
}
|
||||
''
|
||||
"require-module powerline"
|
||||
"require-module connect-broot"
|
||||
"require-module connect-lf"
|
||||
"require-module connect-rofi"
|
||||
];
|
||||
plugins = with pkgs.kakounePlugins; [
|
||||
prelude-kak
|
||||
kak-lsp
|
||||
auto-pairs-kak
|
||||
powerline-kak
|
||||
connect-kak
|
||||
];
|
||||
{
|
||||
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 = [
|
||||
{
|
||||
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'";
|
||||
}
|
||||
];
|
||||
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
|
||||
};
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
"# Custom commands"
|
||||
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||
"eval %sh{kak-lsp --kakoune -s $kak_session}"
|
||||
"lsp-enable"
|
||||
''
|
||||
def -hidden insert-c-n %{
|
||||
try %{
|
||||
lsp-snippets-select-next-placeholders
|
||||
exec '<a-;>d'
|
||||
} catch %{
|
||||
exec -with-hooks '<c-n>'
|
||||
}
|
||||
}
|
||||
''
|
||||
"require-module powerline"
|
||||
"require-module connect-broot"
|
||||
"require-module connect-lf"
|
||||
"require-module connect-rofi"
|
||||
];
|
||||
plugins = with pkgs.kakounePlugins; [
|
||||
prelude-kak
|
||||
kak-lsp
|
||||
auto-pairs-kak
|
||||
powerline-kak
|
||||
connect-kak
|
||||
];
|
||||
};
|
||||
};
|
||||
home.packages = packages;
|
||||
|
||||
|
||||
# THEME FILE
|
||||
xdg.configFile."kak/colors/nord.kak".text = themeBuilder
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ pkgs, ... }: { home.packages = [ pkgs.kicad-with-packages3d ]; }
|
||||
{ pkgs, ... }: { home.packages = [ pkgs.kicad ]; }
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ in
|
|||
{
|
||||
home.packages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
ardour breeze-icons carla mamba mixxx rnnoise
|
||||
ardour breeze-icons carla mixxx rnnoise
|
||||
#mamba
|
||||
# zrythm
|
||||
|
||||
# Plugins
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
enableSyntaxHighlighting = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
plugins = [ ];
|
||||
initExtraBeforeCompInit = ''
|
||||
zstyle ':completion:*' menu select
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue