Large module update
This commit is contained in:
parent
492ae9d92a
commit
a61bfe3c50
18 changed files with 463 additions and 87 deletions
|
|
@ -1,19 +1,14 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
nixpkgs = import <nixpkgs> {};
|
||||
kakCmd = "kak";
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
kak-lsp
|
||||
rnix-lsp
|
||||
gocode
|
||||
gogetdoc
|
||||
jq
|
||||
aspell
|
||||
aspellDicts.it
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
aspellDicts.en-science
|
||||
];
|
||||
home.sessionVariables = {
|
||||
EDITOR = kakCmd;
|
||||
VISUAL = kakCmd;
|
||||
};
|
||||
programs.bash.shellAliases = { k = kakCmd; };
|
||||
programs.zsh.shellAliases = { k = kakCmd; };
|
||||
|
||||
programs.kakoune = {
|
||||
enable = true;
|
||||
|
|
@ -21,6 +16,7 @@ in {
|
|||
colorScheme = "nord";
|
||||
tabStop = 2;
|
||||
indentWidth = 2;
|
||||
alignWithTabs = true;
|
||||
scrollOff = {
|
||||
lines = 5;
|
||||
columns = 3;
|
||||
|
|
@ -55,8 +51,8 @@ in {
|
|||
{ 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 = "WinSetOption"; option = "filetype=(rust|python|c|cpp|latex|javascript|go|nix)"; commands = builtins.concatStringsSep "\n" [ "lsp-enable-window" ]; }
|
||||
# { name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||
{ name = "ModuleLoaded"; option = "powerline"; commands = builtins.concatStringsSep "\n" [ "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>" ]; }
|
||||
|
|
@ -64,20 +60,30 @@ in {
|
|||
];
|
||||
};
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
"# Extra"
|
||||
"define-command -docstring 'save and quit' x 'write-all; quit'"
|
||||
"add-highlighter global/ regex \\h+$ 0:Error # "
|
||||
"eval %sh{kak-lsp --kakoune -s \$kak_session} # Start kak-lsp"
|
||||
"require-module auto-pairs"
|
||||
"require-module powerline"
|
||||
"# Custom commands"
|
||||
"define-command -docstring 'save and quit' x 'write-all; quit' # Save and quit with 'x'"
|
||||
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||
"eval %sh{kak-lsp --kakoune -s \$kak_session} # Start kak-lsp"
|
||||
"# require-module auto-pairs"
|
||||
"require-module powerline"
|
||||
];
|
||||
plugins = (with pkgs.kakounePlugins; [
|
||||
kak-auto-pairs
|
||||
]) ++ (with nixpkgs; [
|
||||
kakounePlugins.prelude-kak
|
||||
plugins = (with pkgs; [
|
||||
aspell
|
||||
aspellDicts.en
|
||||
aspellDicts.en-computers
|
||||
aspellDicts.en-science
|
||||
aspellDicts.it
|
||||
kak-lsp
|
||||
kakounePlugins.powerline-kak
|
||||
rnix-lsp
|
||||
]) ++ (with nixpkgs; [
|
||||
# kakounePlugins.kak-lsp
|
||||
# kakounePlugins.prelude-kak
|
||||
# kakounePlugins.auto-pairs-kak
|
||||
]);
|
||||
};
|
||||
|
||||
xdg.configFile."kak-lsp/kak-lsp.toml".source = ../configs/kak-lsp/kak-lsp.toml;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue