Speed up emacs startup (mostly) and a bunch of smaller changes
This commit is contained in:
parent
45186dacb4
commit
4c800a96d7
8 changed files with 806 additions and 665 deletions
|
@ -11,11 +11,17 @@ let
|
|||
config = ./emacs.el;
|
||||
defaultInitFile = true;
|
||||
package = pkgs.emacs29-pgtk.overrideAttrs (old: { withTreeSitter = true; });
|
||||
alwaysEnsure = true;
|
||||
#alwaysEnsure = true;
|
||||
extraEmacsPackages = epkgs: [
|
||||
pkgs.mu
|
||||
pkgs.mu.mu4e
|
||||
epkgs.treesit-grammars.with-all-grammars
|
||||
epkgs.evil-collection
|
||||
];
|
||||
override = final: prev: {
|
||||
evil-collection = prev.melpaPackages.evil-collection.overrideAttrs
|
||||
(old: { patches = [ ./evil-collection.patch ]; });
|
||||
};
|
||||
});
|
||||
|
||||
in {
|
||||
|
@ -175,6 +181,7 @@ in {
|
|||
neovim
|
||||
go
|
||||
gopls
|
||||
lazygit
|
||||
#network-manager-applet
|
||||
(clang-tools.override {
|
||||
llvmPackages = llvmPackages_17;
|
||||
|
@ -388,7 +395,18 @@ in {
|
|||
|
||||
home-manager.users.knazarov = {
|
||||
# The home.stateVersion option does not have a default and must be set
|
||||
home.stateVersion = "23.05";
|
||||
home.stateVersion = "23.11";
|
||||
|
||||
home.sessionVariables = { EDITOR = "emacs -nw --no-splash"; };
|
||||
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
set sixel true
|
||||
set previewer ${pkgs.chafa}/bin/chafa
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
|
@ -398,11 +416,23 @@ in {
|
|||
&& [[ -f ''${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then
|
||||
source ''${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh
|
||||
fi
|
||||
|
||||
lfcd () {
|
||||
tmp="$(mktemp -uq)"
|
||||
trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT
|
||||
lf -last-dir-path="$tmp" "$@"
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(cat "$tmp")"
|
||||
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
|
||||
fi
|
||||
}
|
||||
bind '"\C-o":"lfcd\n"'
|
||||
'';
|
||||
shellAliases = {
|
||||
nn = "notes.sh -n";
|
||||
ne =
|
||||
''notes.sh -l | fzf --tac --with-nth="2..-1" | xargs -o notes.sh -e'';
|
||||
vim = "emacs -nw --no-splash";
|
||||
|
||||
};
|
||||
};
|
||||
|
@ -471,10 +501,12 @@ in {
|
|||
create = "maildir";
|
||||
|
||||
};
|
||||
neomutt = { enable = true; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.neomutt = { enable = true; };
|
||||
programs.mu = { enable = true; };
|
||||
programs.msmtp.enable = true;
|
||||
|
||||
|
@ -510,54 +542,6 @@ in {
|
|||
|
||||
};
|
||||
|
||||
programs.neovim = let
|
||||
modus-themes = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "modus-themes.nvim";
|
||||
version = "2024-05-06";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "miikanissi";
|
||||
repo = "modus-themes.nvim";
|
||||
rev = "705ea8debb9d9afe4e631166fcc6121782dd0b32";
|
||||
sha256 = "0hs2ylf1rj0655kpwr4blh399r8k7lg0r2a4nbnymy1pbkx1gh1i";
|
||||
};
|
||||
meta.homepage = "https://github.com/miikanissi/modus-themes.nvim/";
|
||||
};
|
||||
|
||||
in {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
vimPlugins.nvim-treesitter
|
||||
vimPlugins.nvim-treesitter.withAllGrammars
|
||||
pkgs.vimPlugins.nvim-treesitter-textobjects
|
||||
vimPlugins.nvim-lspconfig
|
||||
|
||||
vimPlugins.lualine-nvim
|
||||
vimPlugins.telescope-nvim
|
||||
vimPlugins.telescope-fzf-native-nvim
|
||||
vimPlugins.nvim-web-devicons
|
||||
|
||||
vimPlugins.nvim-cmp
|
||||
vimPlugins.cmp-nvim-lsp
|
||||
vimPlugins.cmp-buffer
|
||||
vimPlugins.cmp-cmdline
|
||||
vimPlugins.luasnip
|
||||
|
||||
modus-themes
|
||||
];
|
||||
extraConfig = ''
|
||||
lua << EOF
|
||||
${builtins.readFile nvim/basics.lua}
|
||||
${builtins.readFile nvim/treesitter.lua}
|
||||
${builtins.readFile nvim/lualine.lua}
|
||||
${builtins.readFile nvim/telescope.lua}
|
||||
${builtins.readFile nvim/completion.lua}
|
||||
${builtins.readFile nvim/luasnip.lua}
|
||||
${builtins.readFile nvim/lspconfig.lua}
|
||||
'';
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
xwayland = true;
|
||||
|
@ -577,7 +561,8 @@ in {
|
|||
"XF86MonBrightnessDown" = "exec brightnessctl s 5%-";
|
||||
#"Mod4+Return" =
|
||||
#"exec emacs --eval '(progn (setq confirm-kill-processes nil) (vterm))'";
|
||||
"Mod4+Return" = "exec emacsclient -c";
|
||||
#"Mod4+Return" = "exec emacsclient -c";
|
||||
"Mod4+Return" = "exec foot";
|
||||
"Mod4+space" =
|
||||
"exec ${pkgs.foot}/bin/foot -T mylauncher -a mylauncher ${pkgs.q-sh}/bin/q";
|
||||
"Mod4+p" =
|
||||
|
|
3
evil-collection.patch
Normal file
3
evil-collection.patch
Normal file
|
@ -0,0 +1,3 @@
|
|||
diff --git a/modes/.nosearch b/modes/.nosearch
|
||||
new file mode 100644
|
||||
index 0000000..e69de29
|
36
flake.lock
36
flake.lock
|
@ -11,11 +11,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714669473,
|
||||
"narHash": "sha256-LuwvRYxFw8bE3b75oun2HjdbnwGArYEDzRdhtxkx95o=",
|
||||
"lastModified": 1715533419,
|
||||
"narHash": "sha256-PDlWxvgHqWEJdfAxMYLmoof+ohJrOHx9IZIxvHKE24U=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "8f77253911c7dc3ac829781ac7f37d1d35447c5a",
|
||||
"rev": "dc94f94b49abb487f80e91978a1392e3e2b19fae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -49,11 +49,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1708027330,
|
||||
"narHash": "sha256-7jqtoikxzTgy68P+yRg5lGWnJit6S9LdkVM1wCDVlGc=",
|
||||
"lastModified": 1715696748,
|
||||
"narHash": "sha256-e/xBDyInmuMSiDoXWEJCmxudjPiuyvRKpVupDYr76do=",
|
||||
"owner": "~knazarov",
|
||||
"repo": "git-plan",
|
||||
"rev": "e94eee1acefbabfb8b0e9e64a6cf14f0730c5954",
|
||||
"rev": "1d8f6f0c7c3146ec627a7e811723fc7f68eb7c6d",
|
||||
"type": "sourcehut"
|
||||
},
|
||||
"original": {
|
||||
|
@ -69,11 +69,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1714043624,
|
||||
"narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=",
|
||||
"lastModified": 1715381426,
|
||||
"narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411",
|
||||
"rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -105,11 +105,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1714679241,
|
||||
"narHash": "sha256-Ufz2WBGCcqeXkVgD7bdc+JCrnyPt6G28Xpq2ussqygs=",
|
||||
"lastModified": 1715539458,
|
||||
"narHash": "sha256-lJm3R3EeBBBWnFmt7ZoDjuiGPCPzi7ruaN44R3V6Xqo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a6f8947d5a77b88ff43625408e2685c0be100a9b",
|
||||
"rev": "6cd6e4db4279039918efc1dd8e28f55abeb0acaa",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -120,11 +120,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1714531828,
|
||||
"narHash": "sha256-ILsf3bdY/hNNI/Hu5bSt2/KbmHaAVhBbNUOdGztTHEg=",
|
||||
"lastModified": 1715395895,
|
||||
"narHash": "sha256-DreMqi6+qa21ffLQqhMQL2XRUkAGt3N7iVB5FhJKie4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "0638fe2715d998fa81d173aad264eb671ce2ebc1",
|
||||
"rev": "71bae31b7dbc335528ca7e96f479ec93462323ff",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -198,11 +198,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713892811,
|
||||
"narHash": "sha256-uIGmA2xq41vVFETCF1WW4fFWFT2tqBln+aXnWrvjGRE=",
|
||||
"lastModified": 1715482972,
|
||||
"narHash": "sha256-y1uMzXNlrVOWYj1YNcsGYLm4TOC2aJrwoUY1NjQs9fM=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "f1b0adc27265274e3b0c9b872a8f476a098679bd",
|
||||
"rev": "b6cb5de2ce57acb10ecdaaf9bbd62a5ff24fa02e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -15,3 +15,6 @@ vim.g.mapleader = ' '
|
|||
|
||||
|
||||
vim.opt.shortmess :append("I")
|
||||
|
||||
require('leap').set_default_keymaps()
|
||||
require('neogit').setup()
|
||||
|
|
7
nvim/diagnostic.lua
Normal file
7
nvim/diagnostic.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
float = { border = "single" },
|
||||
})
|
||||
vim.o.updatetime = 250
|
||||
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
|
|
@ -1,4 +1,3 @@
|
|||
local capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
|
||||
require'lspconfig'.gopls.setup{capabilities=capabilities}
|
||||
require'lspconfig'.rnix.setup{capabilities=capabilities}
|
||||
|
|
|
@ -2,7 +2,7 @@ hello: ENC[AES256_GCM,data:+LPt8J+Ks1m10+zZ2Q96r3K2W6Yeng7M7+c2TYDQ+/4AJl6Xc6hVn
|
|||
fastmail_password: ENC[AES256_GCM,data:tHr8PqIg9DigRBu2bgjUeg==,iv:NI9bENFPuKcOt1cd2kg2DKU22J1dJ+3mK7UoceZagR4=,tag:oEgeQb1iLKisOqHi9Ds7xg==,type:str]
|
||||
github_token: ENC[AES256_GCM,data:ET4zFSe1dyFum/HMlzT/0bEP/Kzr3vdp16eKZb63hBYcz0+bKmJ/NZGk4KyojPKgRfgHR3XrrJbVdFdP2QTjfX3XtVq6N7RoU4wOwjrdOgm+4JCKRqO6pWa5ieX0m1DB5NuU7hN6X6Yqwcu38dpGzBUinpcyQDmMHSby6epL,iv:IoFHQ6sC9ZxvOIckkoF5Wnn4+VvCHapwNduCBlELzrU=,tag:gfF24P2JUWUhEIxt3Np3MQ==,type:str]
|
||||
mullvad_account: ENC[AES256_GCM,data:CO4wl2vNAMEC9oy37nIrpw==,iv:a3w64u8XQ/tihIDxIPPtdZ6F7dldLPvRzGUs1MpVe4M=,tag:HQxJVuGEvI0fVj8yGptbdA==,type:str]
|
||||
git_plan_config: ENC[AES256_GCM,data:N+CCMXP4JUCbhrIhddPXyB/we4ZmE8FYL0ms/MxSOdizInsuIOhfkJR5DlIFh2d45Pw/2e2b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w/jupLTLdWp5F8rAxLGa6e9coCNu8vSuqUgfv0jFET71bNw28xPrN38A/PIlUcR9MXe1SGqKAFxEv134ZkJr78g1PIWNoVDrmIlMpV6dYRLKM1FOcpAhJorIXooIl6quCdg2/U5onP8cQ7lt2LsEG5APKj7pz7huatdwM/CgxrcqPVb0E2Lk5c+wi3Rf9/Jz3BqcWQm3bwkHwivWyCD1Nw+qRXLFSfXGTovSBsxX0j4LbdP0o4iPuj068DGawpYC/AfcKfOCmh8aInQhGCQtIq14QGffU9GbW37gHu,iv:ZzOUYu3s+kfwbKajA+6fdu2EysipjoKD49muLNFBZ58=,tag:e0RI7rA8eLQI8h5L4pvS1A==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
|
@ -28,8 +28,8 @@ sops:
|
|||
U3loV2xDMkM5SWNXRDJobDloL0FVUUkK3OP7KvcKkE8mJ880dm6LMFZUxELjl8/P
|
||||
6+q8qAYiAvl0Cbd4GzkNpUuBbLlFFWfFmC0vbgg8gyZ6xI5AFhHAPw==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-01-10T11:00:59Z"
|
||||
mac: ENC[AES256_GCM,data:Y5AeyLjTDWIG4ZgB5dfOAJsyttZ3//B1Y7zFOgRwCPDSYTzNAJaOayI2d9iLFbKRT4lMDd3/u8esBrFyM50IhCQkuY7yWfjvuvyfEFE/3nF3X+Fgao4T9RlTF5YqH1JZg3MC785MLYo8jZteQ2l1iuXXZI94A+bMg9dctliCySs=,iv:nYk2AJVBA1eB1/2isklkQOcg1eQbWtSxS1kg7fVBPBY=,tag:1wNpL33fvVvQh0UKTDmUWg==,type:str]
|
||||
lastmodified: "2024-05-14T14:42:26Z"
|
||||
mac: ENC[AES256_GCM,data:dDv0TvWEioUn3w9RYqd9tPC9hNy0EDsA2sRhoDDC5nnNp55ZbjfqgVF5Kh91E8j1rd+8xjsqY/93i4PdRwGFYIb3gOsAhUmqx8LiI1DwQT9mUgv9anT/KcST5TfRU9/C1Vnz0SBhksl1yK+4mF2orubI5HMirg/l7Zqvvv7OnMU=,iv:ZXdryqFcaNNXqPDWIzACG5v+QRxRtWhxUHc/hCVaDQY=,tag:CIEkhxiHHhdUu7Z0CsNsng==,type:str]
|
||||
pgp:
|
||||
- created_at: "2023-06-10T01:03:11Z"
|
||||
enc: |-
|
||||
|
@ -52,4 +52,4 @@ sops:
|
|||
-----END PGP MESSAGE-----
|
||||
fp: DDB4423999505236CF585F9B0560020C9C577C1B
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.7.3
|
||||
version: 3.8.1
|
||||
|
|
Loading…
Reference in a new issue