working emacs
This commit is contained in:
parent
a920b04973
commit
8ced160207
6 changed files with 71 additions and 23 deletions
|
@ -87,8 +87,8 @@
|
||||||
};
|
};
|
||||||
editors = {
|
editors = {
|
||||||
emacs = {
|
emacs = {
|
||||||
enable = false;
|
enable = true;
|
||||||
doom.enable = true;
|
doom.enable = false;
|
||||||
};
|
};
|
||||||
helix.enable = true;
|
helix.enable = true;
|
||||||
kakoune.enable = true;
|
kakoune.enable = true;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
_: {imports = [./emacs.nix ./helix.nix ./kakoune.nix ./nvf];}
|
_: {imports = [./emacs.nix ./helix.nix ./kakoune ./nvf];}
|
||||||
|
|
|
@ -48,10 +48,6 @@ in {
|
||||||
# :tools editorconfig
|
# :tools editorconfig
|
||||||
editorconfig-core-c # per-project style config
|
editorconfig-core-c # per-project style config
|
||||||
# :tools lookup & :lang org +roam
|
# :tools lookup & :lang org +roam
|
||||||
sqlite
|
|
||||||
# :lang latex & :lang org (latex previews)
|
|
||||||
# :lang beancount
|
|
||||||
beancount
|
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.variables.PATH = ["/home/vali/.config/emacs/bin"];
|
environment.variables.PATH = ["/home/vali/.config/emacs/bin"];
|
||||||
|
|
|
@ -2,17 +2,19 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.modules.other.system) username;
|
inherit (config.modules.other.system) username;
|
||||||
cfg = config.modules.editors.kakoune;
|
cfg = config.modules.editors.kakoune;
|
||||||
inherit (lib) mkIf mkEnableOption;
|
inherit (lib) mkIf mkEnableOption;
|
||||||
in {
|
in {
|
||||||
|
imports = [./mappings.nix];
|
||||||
options.modules.editors.kakoune.enable = mkEnableOption "kakoune";
|
options.modules.editors.kakoune.enable = mkEnableOption "kakoune";
|
||||||
config.home-manager.users.${username}.programs.kakoune = mkIf cfg.enable {
|
config.home-manager.users.${username}.programs.kakoune = mkIf cfg.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
autoComplete = true;
|
autoComplete = ["insert"];
|
||||||
autoReload = true;
|
autoReload = "yes";
|
||||||
indentWidth = 4;
|
indentWidth = 4;
|
||||||
tabStop = 4;
|
tabStop = 4;
|
||||||
incrementalSearch = false;
|
incrementalSearch = false;
|
||||||
|
@ -27,24 +29,26 @@ in {
|
||||||
lines = 4;
|
lines = 4;
|
||||||
columns = 4;
|
columns = 4;
|
||||||
};
|
};
|
||||||
|
wrapLines = {
|
||||||
|
enable = true;
|
||||||
|
indent = true;
|
||||||
|
word = true;
|
||||||
|
};
|
||||||
|
|
||||||
ui = {
|
ui = {
|
||||||
enableMouse = true;
|
enableMouse = true;
|
||||||
assistant = "none";
|
assistant = "none";
|
||||||
statusLine = "bottom";
|
statusLine = "bottom";
|
||||||
wrapLines = {
|
|
||||||
enable = true;
|
|
||||||
indent = true;
|
|
||||||
word = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
plugins = with pkgs.kakounePlugins; [
|
|
||||||
auto-pairs-kak
|
|
||||||
fzf-kak
|
|
||||||
powerline-kak
|
|
||||||
byline-kak
|
|
||||||
kakoune-lsp
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
plugins = with pkgs.kakounePlugins; [
|
||||||
|
auto-pairs-kak
|
||||||
|
fzf-kak
|
||||||
|
powerline-kak
|
||||||
|
byline-kak
|
||||||
|
kakoune-lsp
|
||||||
|
];
|
||||||
|
# extraConfig = ./kakrc;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (config.modules.other.system) username;
|
||||||
|
in {
|
||||||
|
config.home-manager.users.${username}.programs.kakoune.config.keyMappings = [
|
||||||
|
{
|
||||||
|
mode = "normal";
|
||||||
|
key = "<esc>";
|
||||||
|
effect = ";,";
|
||||||
|
docstring = "Press escape to clear highlighted text and collapse cursors";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "normal";
|
||||||
|
key = "<c-v>";
|
||||||
|
effect = ":comment-line<ret>";
|
||||||
|
docstring = "Comment a line with <c-v>!";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "normal";
|
||||||
|
key = "b";
|
||||||
|
effect = ":db<ret>";
|
||||||
|
docstring = "close current buffer";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
mode = "normal";
|
||||||
|
key = "n";
|
||||||
|
effect = ":bp<ret>";
|
||||||
|
docstring = "go to next buffer";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "normal";
|
||||||
|
key = "m";
|
||||||
|
effect = ":bn<ret>";
|
||||||
|
docstring = "go to next buffer";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "normal";
|
||||||
|
key = " f";
|
||||||
|
effect = ":fzf-mode<ret>";
|
||||||
|
docstring = "open fzf";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
|
@ -66,8 +66,8 @@ in {
|
||||||
additionalRuntimePaths = [
|
additionalRuntimePaths = [
|
||||||
#(mkRuntimeDir "after")
|
#(mkRuntimeDir "after")
|
||||||
#(mkRuntimeDir "spell")
|
#(mkRuntimeDir "spell")
|
||||||
./runtime/spell
|
./runtime
|
||||||
./runtime/after
|
./runtime
|
||||||
];
|
];
|
||||||
|
|
||||||
# while I should be doing this in luaConfigRC below
|
# while I should be doing this in luaConfigRC below
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue