Compare commits
13 Commits
no-shibumi
...
5f96f98158
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f96f98158 | |||
| a1abf5b4a1 | |||
| ba8ef4f585 | |||
| eb057a2c3a | |||
| 8effe5f401 | |||
| 8fae2a5338 | |||
| 1c379cc4a3 | |||
| 69f3fa445b | |||
| 6c1b0faea4 | |||
| c68e79ca4f | |||
| af8a00ab5b | |||
| 50d27458af | |||
| d0d340e04f |
Generated
+56
-54
@@ -1,20 +1,41 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-parts": {
|
"claude-code": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765835352,
|
"lastModified": 1783380155,
|
||||||
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
"narHash": "sha256-SwUwKaLrZ+c5y4GoZHKBf1nUsDHVsIUtn2CFloZrV2A=",
|
||||||
"owner": "hercules-ci",
|
"owner": "sadjow",
|
||||||
"repo": "flake-parts",
|
"repo": "claude-code-nix",
|
||||||
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
"rev": "25d979d1a39d0acdbcb1b8d0b9d83ffdd10b5f43",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "hercules-ci",
|
"owner": "sadjow",
|
||||||
"repo": "flake-parts",
|
"repo": "claude-code-nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -25,11 +46,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779969295,
|
"lastModified": 1783436070,
|
||||||
"narHash": "sha256-HwIJ3tOcwSMiV75L7KqJXciXR9UfT+d7rwOZMX7cTnA=",
|
"narHash": "sha256-F80z1JoiJgZyTT5D+3siLOVzqmCEphLR7t0Ym/I2CLI=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "61e2c9659324181e0f0ed911958c536333b1d4f6",
|
"rev": "f09af49406ffad37acb6538d3207189a1a1e0b7e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -39,25 +60,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"kube": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-parts": "flake-parts",
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1767247330,
|
|
||||||
"narHash": "sha256-CxXwzmvAOO07719jzE0Zw14C9r3fQcXfPllLtt5cIzo=",
|
|
||||||
"rev": "4a4d79a290c92de630e503f395fc8fd709904c1b",
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://gitea.home-frikker.dedyn.io/api/v1/repos/jfrikker/kube/archive/4a4d79a290c92de630e503f395fc8fd709904c1b.tar.gz"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "tarball",
|
|
||||||
"url": "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-index-database": {
|
"nix-index-database": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -65,11 +67,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779604987,
|
"lastModified": 1783414108,
|
||||||
"narHash": "sha256-ZQ5z+fVhxYKtIFwtqGp5O0PD84BM1riASvqDaN5Xs+s=",
|
"narHash": "sha256-RY8e+gR2/DhXsYDxGDL6Hhe9+POD9u4+llwxMBqMQDs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-index-database",
|
"repo": "nix-index-database",
|
||||||
"rev": "8fba98c80b48fa013820e0163c5096922fea4ddd",
|
"rev": "96d6de10eb281b98f5cfcd1841394c03da5df77c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -80,42 +82,42 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779560665,
|
"lastModified": 1783148766,
|
||||||
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
|
"narHash": "sha256-uslt2pqShTIXDdAHRHv2QkYLsVdY8Oqwz0EA48/RSM8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
|
"rev": "a50de1b7d8a586adc18d2395c19de7d6058e6030",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-26.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1765674936,
|
|
||||||
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"claude-code": "claude-code",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"kube": "kube",
|
|
||||||
"nix-index-database": "nix-index-database",
|
"nix-index-database": "nix-index-database",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
@@ -3,15 +3,20 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Specify the source of Home Manager and Nixpkgs.
|
# Specify the source of Home Manager and Nixpkgs.
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||||
|
claude-code = {
|
||||||
|
url = "github:sadjow/claude-code-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
kube = {
|
# kube = {
|
||||||
url = "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz";
|
# url = "https://gitea.home-frikker.dedyn.io/jfrikker/kube/archive/1.0.1.tar.gz";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
# inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
# };
|
||||||
|
|
||||||
nix-index-database = {
|
nix-index-database = {
|
||||||
url = "github:nix-community/nix-index-database";
|
url = "github:nix-community/nix-index-database";
|
||||||
@@ -19,7 +24,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, home-manager, kube, nix-index-database, ... }:
|
outputs = { nixpkgs, home-manager, claude-code, nix-index-database, ... }:
|
||||||
let modules-for-system = pkgs: pkgs.stdenv.mkDerivation {
|
let modules-for-system = pkgs: pkgs.stdenv.mkDerivation {
|
||||||
name = "home-manager-modules";
|
name = "home-manager-modules";
|
||||||
src = pkgs.lib.fileset.toSource {
|
src = pkgs.lib.fileset.toSource {
|
||||||
@@ -41,7 +46,7 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
homeConfigurations.shibumi =
|
homeConfigurations.redbook =
|
||||||
let pkgs = import nixpkgs { system = "aarch64-darwin"; config.allowUnfree = true; };
|
let pkgs = import nixpkgs { system = "aarch64-darwin"; config.allowUnfree = true; };
|
||||||
modules = modules-for-system pkgs;
|
modules = modules-for-system pkgs;
|
||||||
in home-manager.lib.homeManagerConfiguration {
|
in home-manager.lib.homeManagerConfiguration {
|
||||||
@@ -52,8 +57,8 @@
|
|||||||
nix-index-database.homeModules.default
|
nix-index-database.homeModules.default
|
||||||
"${modules}/base.nix"
|
"${modules}/base.nix"
|
||||||
"${modules}/desktop.nix"
|
"${modules}/desktop.nix"
|
||||||
"${modules}/shibumi.nix"
|
"${modules}/redbook.nix"
|
||||||
"${modules}/shibumi-desktop.nix"
|
"${modules}/redbook-desktop.nix"
|
||||||
] ++
|
] ++
|
||||||
[{
|
[{
|
||||||
home.stateVersion = "22.05";
|
home.stateVersion = "22.05";
|
||||||
@@ -62,7 +67,7 @@
|
|||||||
home.packages = [ pkgs.pinentry_mac ];
|
home.packages = [ pkgs.pinentry_mac ];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
extraSpecialArgs = { kube = kube.packages.aarch64-darwin.default; };
|
extraSpecialArgs = { claude-code = claude-code.packages.aarch64-darwin.default; };
|
||||||
};
|
};
|
||||||
homeConfigurations.home =
|
homeConfigurations.home =
|
||||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||||
@@ -82,7 +87,7 @@
|
|||||||
home.homeDirectory = "/home/jfrikker";
|
home.homeDirectory = "/home/jfrikker";
|
||||||
}];
|
}];
|
||||||
|
|
||||||
extraSpecialArgs = { kube = kube.packages.x86_64-linux.default; };
|
extraSpecialArgs = { claude-code = claude-code.packages.x86_64-linux.default; };
|
||||||
};
|
};
|
||||||
packages.aarch64-darwin.default = modules-for-system nixpkgs.legacyPackages.aarch64-darwin;
|
packages.aarch64-darwin.default = modules-for-system nixpkgs.legacyPackages.aarch64-darwin;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -54,10 +54,8 @@ carefully so it doesn't get carried away...
|
|||||||
alexandria
|
alexandria
|
||||||
cl-markup
|
cl-markup
|
||||||
cl-mock
|
cl-mock
|
||||||
cl-rdkafka
|
|
||||||
clack
|
clack
|
||||||
clack-handler-woo
|
clack-handler-woo
|
||||||
dbd-mysql
|
|
||||||
dbi
|
dbi
|
||||||
defstar
|
defstar
|
||||||
dexador
|
dexador
|
||||||
@@ -168,14 +166,10 @@ These are the other programs I have installed globally. A few (like ~awscli~, ~m
|
|||||||
are still Redbook-specific; ideally I'd find another way to install them.
|
are still Redbook-specific; ideally I'd find another way to install them.
|
||||||
|
|
||||||
#+BEGIN_SRC nix :tangle target/redbook/other-packages.nix
|
#+BEGIN_SRC nix :tangle target/redbook/other-packages.nix
|
||||||
{pkgs, kube, ...}:
|
{pkgs, ...}:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
aws-iam-authenticator
|
postgresql
|
||||||
awscli2
|
|
||||||
kube
|
|
||||||
kubectl
|
|
||||||
mariadb.client
|
|
||||||
openssh
|
openssh
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -191,6 +185,7 @@ These programs require a full desktop environment:
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
google-chrome
|
google-chrome
|
||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
|
nerd-fonts.symbols-only
|
||||||
(iosevka-bin.override { variant = "Aile"; })
|
(iosevka-bin.override { variant = "Aile"; })
|
||||||
(iosevka-bin.override { variant = "Etoile"; })
|
(iosevka-bin.override { variant = "Etoile"; })
|
||||||
(iosevka-bin.override { variant = "SGr-IosevkaTerm"; })
|
(iosevka-bin.override { variant = "SGr-IosevkaTerm"; })
|
||||||
@@ -205,7 +200,15 @@ These programs require a full desktop environment:
|
|||||||
{pkgs, ...}:
|
{pkgs, ...}:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
slack
|
linear
|
||||||
|
(slack.overrideAttrs {
|
||||||
|
version = "4.50.143";
|
||||||
|
src = pkgs.fetchurl {
|
||||||
|
url = "https://downloads.slack-edge.com/desktop-releases/mac/arm64/4.50.143/Slack-4.50.143-macOS.dmg";
|
||||||
|
hash = "sha256-f5oYi8NPKXWpDcowFYMUjptbQs4V9hK2bm1TuaQeJn0=";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
teams
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@@ -314,6 +317,7 @@ We all know what ~git~ does.
|
|||||||
enable = true;
|
enable = true;
|
||||||
settings.user.name = "Joe Frikker";
|
settings.user.name = "Joe Frikker";
|
||||||
settings.user.email = "joe@redbookcattle.com";
|
settings.user.email = "joe@redbookcattle.com";
|
||||||
|
settings.github.user = "joe@redbookcattle.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.delta = {
|
programs.delta = {
|
||||||
@@ -658,7 +662,7 @@ Now we'll set up some keybindings:
|
|||||||
key = "g",
|
key = "g",
|
||||||
mods = "CMD",
|
mods = "CMD",
|
||||||
action = wezterm.action.SpawnCommandInNewTab {
|
action = wezterm.action.SpawnCommandInNewTab {
|
||||||
args = { wezterm.home_dir .. "/.nix-profile/bin/zsh", "-l", "-c", "lazygit" }
|
args = { wezterm.home_dir .. "/.nix-profile/bin/zsh", "-l", "-i", "-c", "lazygit" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -688,6 +692,17 @@ Now we'll set up some keybindings:
|
|||||||
end
|
end
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Ghostty
|
||||||
|
|
||||||
|
#+BEGIN_SRC nix :tangle target/desktop/ghostty.nix
|
||||||
|
{pkgs, ...}: {
|
||||||
|
programs.ghostty = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.ghostty-bin;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Zsh
|
** Zsh
|
||||||
|
|
||||||
This is my default shell for now. Unfortunately, nix requires a posix-compliant shell, so bash or
|
This is my default shell for now. Unfortunately, nix requires a posix-compliant shell, so bash or
|
||||||
@@ -730,9 +745,10 @@ Actually, nix *really* requires ~bash~. This is a plugin that allows using zsh f
|
|||||||
** Claude Code
|
** Claude Code
|
||||||
|
|
||||||
#+BEGIN_SRC nix :tangle target/base/claude-code.nix
|
#+BEGIN_SRC nix :tangle target/base/claude-code.nix
|
||||||
{
|
{claude-code, ...}: {
|
||||||
programs.claude-code = {
|
programs.claude-code = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = claude-code;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
@@ -780,10 +796,13 @@ These are just some general settings that apply everywhere. First, a few package
|
|||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = epkgs: with epkgs; [
|
extraPackages = epkgs: with epkgs; [
|
||||||
|
ace-window
|
||||||
doom-modeline
|
doom-modeline
|
||||||
|
free-keys
|
||||||
ligature
|
ligature
|
||||||
mixed-pitch
|
mixed-pitch
|
||||||
ace-window
|
perspective
|
||||||
|
popper
|
||||||
];
|
];
|
||||||
extraConfig = builtins.readFile ./emacs-global.el;
|
extraConfig = builtins.readFile ./emacs-global.el;
|
||||||
};
|
};
|
||||||
@@ -795,6 +814,7 @@ Turn off some default settings that I don't find useful.
|
|||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(setopt inhibit-startup-screen t)
|
(setopt inhibit-startup-screen t)
|
||||||
(setopt initial-scratch-message nil)
|
(setopt initial-scratch-message nil)
|
||||||
|
(setopt sentence-end-double-space nil)
|
||||||
(menu-bar-mode -1)
|
(menu-bar-mode -1)
|
||||||
(scroll-bar-mode -1)
|
(scroll-bar-mode -1)
|
||||||
(tool-bar-mode -1)
|
(tool-bar-mode -1)
|
||||||
@@ -806,6 +826,15 @@ Turn off some default settings that I don't find useful.
|
|||||||
display-buffer-in-previous-window
|
display-buffer-in-previous-window
|
||||||
display-buffer-use-some-window)))
|
display-buffer-use-some-window)))
|
||||||
(setopt view-read-only t)
|
(setopt view-read-only t)
|
||||||
|
(setopt save-interprogram-paste-before-kill t)
|
||||||
|
(setopt kill-whole-line t)
|
||||||
|
(delete-selection-mode t)
|
||||||
|
(column-number-mode t)
|
||||||
|
(setopt auto-save-default nil)
|
||||||
|
(setopt create-lockfiles nil)
|
||||||
|
|
||||||
|
(setopt mouse-wheel-tilt-scroll t)
|
||||||
|
(setq-default truncate-lines t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Make sure which-key mode is always on. The on-the-fly keymap help it gives is indespensable.
|
Make sure which-key mode is always on. The on-the-fly keymap help it gives is indespensable.
|
||||||
@@ -930,11 +959,12 @@ Set up a few project- / workspace-related key bindings.
|
|||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(bind-keys ("s-f" . project-find-file)
|
(bind-keys ("s-f" . project-find-file)
|
||||||
("s-F" . project-switch-project))
|
("s-F" . project-switch-project)
|
||||||
|
("s-s" . persp-switch))
|
||||||
(with-eval-after-load 'tab-bar
|
|
||||||
(bind-keys :map tab-bar-mode-map
|
;; (with-eval-after-load 'tab-bar
|
||||||
("s-s" . tab-bar-switch-to-tab)))
|
;; (bind-keys :map tab-bar-mode-map
|
||||||
|
;; ("s-s" . tab-bar-switch-to-tab)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Don't run a server. I'm not using this, I can always turn it back on if I need to.
|
Don't run a server. I'm not using this, I can always turn it back on if I need to.
|
||||||
@@ -985,49 +1015,134 @@ windows. I place windows in the bottom or on the right mostly depending on how w
|
|||||||
content to be.
|
content to be.
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
|
(defun jf/window-children (window)
|
||||||
|
(let ((result nil)
|
||||||
|
(child (window-child window)))
|
||||||
|
(while child
|
||||||
|
(push child result)
|
||||||
|
(setq child (window-next-sibling child)))
|
||||||
|
(reverse result)))
|
||||||
|
|
||||||
|
(defun jf/enforce-right-side-heights (win)
|
||||||
|
(let ((slot-heights '((-1 . 20)))
|
||||||
|
(parent (window-parent win)))
|
||||||
|
(when parent
|
||||||
|
(let ((children (jf/window-children parent)))
|
||||||
|
(when (> (length children) 1)
|
||||||
|
(cl-loop for child in children
|
||||||
|
for slot = (window-parameter child 'window-slot)
|
||||||
|
for height = (alist-get slot slot-heights)
|
||||||
|
when height do (progn (window-resize child (- height (window-height child)))
|
||||||
|
(window-preserve-size child nil t))))))))
|
||||||
|
|
||||||
|
(require 'perspective)
|
||||||
|
(setopt persp-mode-prefix-key (kbd "C-x t"))
|
||||||
|
(setopt persp-show-modestring nil)
|
||||||
|
(persp-mode)
|
||||||
|
|
||||||
|
(defun jf/popper-group-by-owning-perspective ()
|
||||||
|
"Return the name of the perspective that owns the current buffer.
|
||||||
|
|
||||||
|
Unlike `popper-group-by-perspective', which just returns whichever
|
||||||
|
perspective happens to be active on the frame right now, this looks
|
||||||
|
up which perspective's buffer list the popup buffer actually belongs
|
||||||
|
to. This matters because popper re-groups popups on
|
||||||
|
`window-configuration-change-hook', which perspective.el triggers
|
||||||
|
,*after* switching the frame's active perspective -- so
|
||||||
|
`popper-group-by-perspective' ends up filing a popup under the
|
||||||
|
perspective you just switched *to* rather than the one it came from."
|
||||||
|
(let ((buf (current-buffer)))
|
||||||
|
(or (cl-loop for persp being the hash-values of (perspectives-hash (selected-frame))
|
||||||
|
if (memq buf (persp-buffers persp))
|
||||||
|
return (persp-name persp))
|
||||||
|
(persp-current-name))))
|
||||||
|
|
||||||
|
(setopt popper-reference-buffers
|
||||||
|
'("\\*Flymake diagnostics .*"
|
||||||
|
"\\*Embark Export: .*"
|
||||||
|
"\\*Embark Collect .*"
|
||||||
|
"\\*xref\\*"
|
||||||
|
"\\*compilation\\*"
|
||||||
|
"\\*pnpm:.*"
|
||||||
|
"\\*sly-mrepl *"
|
||||||
|
"\\*Messages\\*"
|
||||||
|
"\\*lispy-message\\*"
|
||||||
|
"\\*EGLOT connections\\*"
|
||||||
|
"\\*trace-output\\*"
|
||||||
|
"\\*occur\\*"
|
||||||
|
".*eshell\\*"
|
||||||
|
"\\*SQL: .*"
|
||||||
|
"magit: *"
|
||||||
|
"magit-revision: .*"
|
||||||
|
"magit-log*"
|
||||||
|
"\\*Help\\*"
|
||||||
|
"\\*rustfmt\\*"
|
||||||
|
"\\*slack: .*"
|
||||||
|
"\\*forge: .*"
|
||||||
|
"new-pullreq"
|
||||||
|
"\\*claude:.*"
|
||||||
|
"\\*Man .*"
|
||||||
|
"\\*List .*"
|
||||||
|
"\\*eldoc\\*"))
|
||||||
|
(setopt popper-display-control nil)
|
||||||
|
(setopt popper-group-function 'jf/popper-group-by-owning-perspective)
|
||||||
|
|
||||||
|
(popper-mode)
|
||||||
|
(popper-echo-mode)
|
||||||
|
|
||||||
|
(bind-keys ("C-q" . popper-toggle)
|
||||||
|
("C-;" . popper-cycle))
|
||||||
|
|
||||||
(setq display-buffer-alist
|
(setq display-buffer-alist
|
||||||
'(((or "\\*Flymake diagnostics .*"
|
'(((or "\\*Flymake diagnostics .*"
|
||||||
"\\*Embark Export: .*"
|
"\\*Embark Export: .*"
|
||||||
"\\*Embark Collect .*"
|
"\\*Embark Collect .*"
|
||||||
"\\*xref\\*"
|
"\\*xref\\*"
|
||||||
"\\*compilation\\*"
|
"\\*compilation\\*"
|
||||||
|
"\\*pnpm:.*"
|
||||||
"\\*sly-mrepl *"
|
"\\*sly-mrepl *"
|
||||||
"\\*Messages\\*"
|
"\\*Messages\\*"
|
||||||
"\\*lispy-message\\*"
|
"\\*lispy-message\\*"
|
||||||
"\\*EGLOT connections\\*"
|
"\\*EGLOT connections\\*"
|
||||||
"\\*trace-output\\*"
|
"\\*trace-output\\*"
|
||||||
"\\*occur\\*"
|
"\\*occur\\*"
|
||||||
".*eshell\\*")
|
".*eshell\\*"
|
||||||
(display-buffer-in-side-window)
|
"\\*SQL: .*")
|
||||||
(side . bottom)
|
(display-buffer-in-side-window)
|
||||||
(slot . 0)
|
(side . bottom)
|
||||||
(window-height . 0.33)
|
(slot . 0)
|
||||||
(window-parameters (no-delete-other-windows . t)
|
(window-height . 0.33)
|
||||||
(no-other-window . t)))
|
(window-parameters (no-delete-other-windows . t)
|
||||||
((or "magit: *"
|
(no-other-window . t)))
|
||||||
"magit-revision: .*"
|
((or "magit: *"
|
||||||
"magit-log*"
|
"magit-revision: .*"
|
||||||
"\\*eldoc\\*"
|
"magit-log*"
|
||||||
"\\*Help\\*"
|
"\\*Help\\*"
|
||||||
"\\*rustfmt\\*"
|
"\\*rustfmt\\*"
|
||||||
"\\*slack: .*"
|
"\\*slack: .*"
|
||||||
"\\*forge: .*"
|
"\\*forge: .*"
|
||||||
"new-pullreq"
|
"new-pullreq"
|
||||||
"\\*claude:.*"
|
"\\*claude:.*"
|
||||||
"\\*Man .*")
|
"\\*Man .*"
|
||||||
(display-buffer-reuse-window display-buffer-in-side-window)
|
"\\*List .*")
|
||||||
(side . right)
|
(display-buffer-in-side-window)
|
||||||
(slot . 0)
|
(side . right)
|
||||||
(window-width . 0.5)
|
(slot . 0)
|
||||||
(window-parameters (no-delete-other-windows . t)
|
(window-width . 93)
|
||||||
(no-other-window . t)))
|
(window-height . jf/enforce-right-side-heights)
|
||||||
("\\*Embark Actions\\*"
|
(preserve-size . (t . nil))
|
||||||
(display-buffer-in-side-window)
|
(window-parameters (no-delete-other-windows . t)
|
||||||
(side . right)
|
(no-other-window . t)))
|
||||||
(slot . -1)
|
((or "\\*Embark Actions\\*"
|
||||||
(window-width . 0.5)
|
"\\*eldoc\\*")
|
||||||
(window-parameters (no-delete-other-windows . t)
|
(display-buffer-in-side-window)
|
||||||
(no-other-window . t)))))
|
(side . right)
|
||||||
|
(slot . -1)
|
||||||
|
(window-width . 93)
|
||||||
|
(window-height . jf/enforce-right-side-heights)
|
||||||
|
(preserve-size . (t . t))
|
||||||
|
(window-parameters (no-delete-other-windows . t)
|
||||||
|
(no-other-window . t)))))
|
||||||
|
|
||||||
(setopt window-persistent-parameters
|
(setopt window-persistent-parameters
|
||||||
(cl-list* '(no-delete-other-windows . writable)
|
(cl-list* '(no-delete-other-windows . writable)
|
||||||
@@ -1051,9 +1166,11 @@ This configuration affects general text editing, across all modes. First, some p
|
|||||||
avy
|
avy
|
||||||
edit-indirect
|
edit-indirect
|
||||||
embark
|
embark
|
||||||
evil
|
format-all
|
||||||
evil-collection
|
god-mode
|
||||||
evil-org
|
# evil
|
||||||
|
# evil-collection
|
||||||
|
# evil-org
|
||||||
string-inflection
|
string-inflection
|
||||||
];
|
];
|
||||||
extraConfig = builtins.readFile ./emacs-editing.el;
|
extraConfig = builtins.readFile ./emacs-editing.el;
|
||||||
@@ -1073,17 +1190,32 @@ cancel them more frequently). In the end, I opted for Devil mode. It avoids modi
|
|||||||
its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences.
|
its own devil-mode-only repeat maps that don't interfere when using normal modifier key sequences.
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(setopt evil-want-keybinding nil)
|
;; (setopt evil-want-keybinding nil)
|
||||||
(require 'evil)
|
;; (require 'evil)
|
||||||
(evil-mode 1)
|
;; (evil-mode 1)
|
||||||
(require 'evil-collection)
|
;; (require 'evil-collection)
|
||||||
(evil-collection-init)
|
;; (evil-collection-init)
|
||||||
|
|
||||||
(require 'evil-org)
|
;; (require 'evil-org)
|
||||||
(add-hook 'org-mode-hook 'evil-org-mode)
|
;; (add-hook 'org-mode-hook 'evil-org-mode)
|
||||||
(evil-org-set-key-theme '(navigation insert textobjects additional calendar))
|
;; (evil-org-set-key-theme '(navigation insert textobjects additional calendar))
|
||||||
(require 'evil-org-agenda)
|
;; (require 'evil-org-agenda)
|
||||||
(evil-org-agenda-set-keys)
|
;; (evil-org-agenda-set-keys)
|
||||||
|
(require 'god-mode)
|
||||||
|
(require 'which-key)
|
||||||
|
|
||||||
|
(bind-keys :map god-local-mode-map
|
||||||
|
("i" . (lambda () (interactive) (god-mode-all -1)))
|
||||||
|
("z" . repeat))
|
||||||
|
(bind-keys ("<escape>" . (lambda () (interactive) (god-mode-all 1))))
|
||||||
|
(defun my-god-mode-update-cursor-type ()
|
||||||
|
(setq cursor-type (cond
|
||||||
|
((and (featurep 'org-present) org-present-mode) nil)
|
||||||
|
((or (and (featurep 'god-mode) god-local-mode) buffer-read-only) 'box)
|
||||||
|
(t 'bar))))
|
||||||
|
|
||||||
|
(add-hook 'post-command-hook 'my-god-mode-update-cursor-type)
|
||||||
|
(which-key-enable-god-mode-support)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Avy allows jumping to any place on the screen with just a few keystrokes. I've stolen most of these
|
Avy allows jumping to any place on the screen with just a few keystrokes. I've stolen most of these
|
||||||
@@ -1105,10 +1237,17 @@ his article.
|
|||||||
(avy-goto-char-timer)))
|
(avy-goto-char-timer)))
|
||||||
|
|
||||||
(bind-keys
|
(bind-keys
|
||||||
("M-j" . avy-goto-char-timer)
|
("C-j" . avy-goto-char-timer)
|
||||||
("C-c j" . avy-goto-char-timer)
|
("M-j" . avy-goto-char-timer-embark)
|
||||||
("M-J" . avy-goto-char-timer-embark)
|
|
||||||
("C-." . embark-act))
|
("C-." . embark-act))
|
||||||
|
|
||||||
|
(with-eval-after-load 'lispy
|
||||||
|
(bind-keys :map lispy-mode-map
|
||||||
|
("C-j" . avy-goto-char-timer)))
|
||||||
|
|
||||||
|
(with-eval-after-load 'org
|
||||||
|
(bind-keys :map org-mode-map
|
||||||
|
("C-j" . avy-goto-char-timer)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Just "silently" wrap when searching at the bottom of a document.
|
Just "silently" wrap when searching at the bottom of a document.
|
||||||
@@ -1141,6 +1280,44 @@ Just "silently" wrap when searching at the bottom of a document.
|
|||||||
(bind-keys ("C-x 4 n" . edit-indirect-region))
|
(bind-keys ("C-x 4 n" . edit-indirect-region))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Workflow
|
||||||
|
:PROPERTIES:
|
||||||
|
:header-args:elisp: :tangle target/desktop/emacs-workflow.el
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+BEGIN_SRC nix :tangle target/desktop/emacs-workflow.nix
|
||||||
|
{
|
||||||
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = epkgs: with epkgs; [
|
||||||
|
# bufferlo
|
||||||
|
];
|
||||||
|
extraConfig = builtins.readFile ./emacs-workflow.el;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
;; (bufferlo-mode)
|
||||||
|
|
||||||
|
;; (setopt bufferlo-include-buried-buffers nil)
|
||||||
|
|
||||||
|
;; (with-eval-after-load 'bufferlo
|
||||||
|
;; (setq mode-line-misc-info
|
||||||
|
;; (assq-delete-all 'bufferlo-mode mode-line-misc-info)))
|
||||||
|
|
||||||
|
;; (defun my/bury-or-kill-buffer ()
|
||||||
|
;; (interactive)
|
||||||
|
;; (bury-buffer)
|
||||||
|
;; (bufferlo-kill-orphan-buffers))
|
||||||
|
|
||||||
|
(bind-keys
|
||||||
|
("s-b" . consult-buffer)
|
||||||
|
;; ("C-x t 0" . bufferlo-tab-close-kill-buffers)
|
||||||
|
;; ("C-x k" . my/bury-or-kill-buffer)
|
||||||
|
)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Language Support
|
** Language Support
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:header-args:elisp: :tangle target/desktop/emacs-languages.el
|
:header-args:elisp: :tangle target/desktop/emacs-languages.el
|
||||||
@@ -1152,18 +1329,21 @@ Just "silently" wrap when searching at the bottom of a document.
|
|||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = epkgs: with epkgs; [
|
extraPackages = epkgs: with epkgs; [
|
||||||
consult-eglot
|
consult-eglot
|
||||||
|
graphql-ts-mode
|
||||||
haskell-ts-mode
|
haskell-ts-mode
|
||||||
jenkinsfile-mode
|
jenkinsfile-mode
|
||||||
jq-mode
|
jq-mode
|
||||||
(lispy.overrideAttrs {
|
(lispy.overrideAttrs {
|
||||||
packageRequires = [
|
packageRequires = [
|
||||||
ace-window iedit swiper zoutline
|
ace-window iedit swiper zoutline hydra
|
||||||
];
|
];
|
||||||
ignoreCompilationError = true;
|
ignoreCompilationError = true;
|
||||||
})
|
})
|
||||||
lispyville
|
# lispyville
|
||||||
lua-mode
|
lua-mode
|
||||||
nix-mode
|
nix-mode
|
||||||
|
pnpm-mode
|
||||||
|
prisma-ts-mode
|
||||||
rust-mode
|
rust-mode
|
||||||
sly
|
sly
|
||||||
sly-macrostep
|
sly-macrostep
|
||||||
@@ -1194,6 +1374,7 @@ Just "silently" wrap when searching at the bottom of a document.
|
|||||||
g.tree-sitter-nix
|
g.tree-sitter-nix
|
||||||
g.tree-sitter-org
|
g.tree-sitter-org
|
||||||
g.tree-sitter-php
|
g.tree-sitter-php
|
||||||
|
g.tree-sitter-prisma
|
||||||
g.tree-sitter-python
|
g.tree-sitter-python
|
||||||
g.tree-sitter-rust
|
g.tree-sitter-rust
|
||||||
g.tree-sitter-rust-format-args
|
g.tree-sitter-rust-format-args
|
||||||
@@ -1231,7 +1412,7 @@ Show a vertical bar 100 characters out; ideally I don't want lines longer than t
|
|||||||
is about the max you can have and still fit two files side-by-side on the screen.
|
is about the max you can have and still fit two files side-by-side on the screen.
|
||||||
|
|
||||||
#+begin_src elisp
|
#+begin_src elisp
|
||||||
(setq-default fill-column 100)
|
(setq-default fill-column 120)
|
||||||
|
|
||||||
(defun jf-init-fill-column ()
|
(defun jf-init-fill-column ()
|
||||||
(display-fill-column-indicator-mode 1))
|
(display-fill-column-indicator-mode 1))
|
||||||
@@ -1271,6 +1452,10 @@ available? It seems to work for now anyway...
|
|||||||
(advice-add 'prog-fill-reindent-defun :override #'my-prog-fill-reindent-defun))
|
(advice-add 'prog-fill-reindent-defun :override #'my-prog-fill-reindent-defun))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(add-hook 'compilation-filter-hook 'ansi-color-compilation-filter)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
*** Flymake
|
*** Flymake
|
||||||
#+begin_src elisp
|
#+begin_src elisp
|
||||||
(autoload 'flymake-show-project-diagnostics "flymake")
|
(autoload 'flymake-show-project-diagnostics "flymake")
|
||||||
@@ -1342,9 +1527,10 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
(setopt lispy-compat '(god-mode edebug))
|
(setopt lispy-compat '(god-mode edebug))
|
||||||
(add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1)))
|
(add-hook 'emacs-lisp-mode-hook (lambda () (lispy-mode 1)))
|
||||||
(add-hook 'lisp-mode-hook (lambda () (lispy-mode 1)))
|
(add-hook 'lisp-mode-hook (lambda () (lispy-mode 1)))
|
||||||
|
(add-hook 'lisp-data-mode-hook (lambda () (lispy-mode 1)))
|
||||||
(with-eval-after-load 'lispy
|
(with-eval-after-load 'lispy
|
||||||
(require 'lispyville)
|
;; (require 'lispyville)
|
||||||
(add-hook 'lispy-mode-hook #'lispyville-mode)
|
;; (add-hook 'lispy-mode-hook #'lispyville-mode)
|
||||||
(bind-keys :map lispy-mode-map
|
(bind-keys :map lispy-mode-map
|
||||||
("i" . (lambda ()
|
("i" . (lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
@@ -1355,11 +1541,11 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
|
|
||||||
*** Typescript
|
*** Typescript
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(push '("\\.ts\\'" . typescript-mode) auto-mode-alist)
|
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
|
||||||
(push '(typescript-mode . typescript-ts-mode) major-mode-remap-alist)
|
(add-to-list 'major-mode-remap-alist '(typescript-mode . typescript-ts-mode))
|
||||||
(push '("\\.tsx\\'" . tsx-mode) auto-mode-alist)
|
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-mode))
|
||||||
(push '(tsx-mode . tsx-ts-mode) major-mode-remap-alist)
|
(add-to-list 'major-mode-remap-alist '(tsx-mode . tsx-ts-mode))
|
||||||
(setopt typescript-ts-mode-indent-offset 4)
|
(setopt typescript-ts-mode-indent-offset 2)
|
||||||
(with-eval-after-load 'typescript-ts-mode
|
(with-eval-after-load 'typescript-ts-mode
|
||||||
(defun my-tsx-ts-mode--indent-compatibility-b893426 ()
|
(defun my-tsx-ts-mode--indent-compatibility-b893426 ()
|
||||||
"Indent rules helper, to handle different releases of tree-sitter-tsx.
|
"Indent rules helper, to handle different releases of tree-sitter-tsx.
|
||||||
@@ -1373,6 +1559,52 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
`(((match "<" "jsx_text") parent 0)
|
`(((match "<" "jsx_text") parent 0)
|
||||||
((parent-is "jsx_text") grand-parent typescript-ts-mode-indent-offset)))))
|
((parent-is "jsx_text") grand-parent typescript-ts-mode-indent-offset)))))
|
||||||
(advice-add 'tsx-ts-mode--indent-compatibility-b893426 :override #'my-tsx-ts-mode--indent-compatibility-b893426))
|
(advice-add 'tsx-ts-mode--indent-compatibility-b893426 :override #'my-tsx-ts-mode--indent-compatibility-b893426))
|
||||||
|
|
||||||
|
(defvar my/edit-indirect-tag-modes
|
||||||
|
'(("graphql" . graphql-ts-mode)
|
||||||
|
("gql" . graphql-ts-mode)
|
||||||
|
("sql" . sql-mode)
|
||||||
|
("css" . css-mode))
|
||||||
|
"Map of tagged-template tag names to major modes.")
|
||||||
|
|
||||||
|
(defun my/edit-indirect--node-bounds (node)
|
||||||
|
"Return (BEG . END) for NODE's contents, excluding delimiters."
|
||||||
|
(cons (1+ (treesit-node-start node))
|
||||||
|
(1- (treesit-node-end node))))
|
||||||
|
|
||||||
|
(defun my/edit-indirect-tagged-template-at-point ()
|
||||||
|
(interactive)
|
||||||
|
(let* ((node (treesit-node-at (point)))
|
||||||
|
(tmpl-node (treesit-parent-until
|
||||||
|
node
|
||||||
|
(lambda (n) (equal (treesit-node-type n) "template_string"))))
|
||||||
|
(str-node (unless tmpl-node
|
||||||
|
(treesit-parent-until
|
||||||
|
node
|
||||||
|
(lambda (n) (equal (treesit-node-type n) "string")))))
|
||||||
|
(target-node (or tmpl-node str-node)))
|
||||||
|
(unless target-node
|
||||||
|
(user-error "Point is not inside a string or template literal"))
|
||||||
|
(let* ((tagged-node (and tmpl-node (treesit-node-parent tmpl-node)))
|
||||||
|
(tag-node (and tagged-node
|
||||||
|
(equal (treesit-node-type tagged-node) "call_expression")
|
||||||
|
(treesit-node-child-by-field-name tagged-node "function")))
|
||||||
|
(tag-name (and tag-node (treesit-node-text tag-node t)))
|
||||||
|
(mode (cond
|
||||||
|
(tag-name (or (cdr (assoc tag-name my/edit-indirect-tag-modes))
|
||||||
|
major-mode))
|
||||||
|
(t 'text-mode)))
|
||||||
|
(bounds (my/edit-indirect--node-bounds target-node))
|
||||||
|
(buf (edit-indirect-region (car bounds) (cdr bounds) t)))
|
||||||
|
(with-current-buffer buf
|
||||||
|
(funcall mode)))))
|
||||||
|
|
||||||
|
(with-eval-after-load 'typescript-ts-mode
|
||||||
|
(define-key typescript-ts-mode-map (kbd "C-c '") #'my/edit-indirect-tagged-template-at-point)
|
||||||
|
(define-key tsx-ts-mode-map (kbd "C-c '") #'my/edit-indirect-tagged-template-at-point))
|
||||||
|
|
||||||
|
(with-eval-after-load 'eglot
|
||||||
|
(add-to-list 'eglot-server-programs '((prisma-ts-mode) "prisma-language-server" "--stdio")))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Java
|
*** Java
|
||||||
@@ -1519,11 +1751,10 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
|
|
||||||
;; ("C-x M-:" . consult-complex-command)
|
;; ("C-x M-:" . consult-complex-command)
|
||||||
("C-x b" . consult-buffer)
|
("C-x b" . consult-buffer)
|
||||||
("s-b" . consult-project-buffer)
|
|
||||||
("s-B" . consult-buffer)
|
("s-B" . consult-buffer)
|
||||||
("C-x 4 b" . consult-buffer-other-window)
|
("C-x 4 b" . consult-buffer-other-window)
|
||||||
("C-x 5 b" . consult-buffer-other-frame)
|
("C-x 5 b" . consult-buffer-other-frame)
|
||||||
("C-x t b" . consult-buffer-other-tab)
|
;; ("C-x t b" . consult-buffer-other-tab)
|
||||||
("C-x r b" . consult-bookmark)
|
("C-x r b" . consult-bookmark)
|
||||||
("C-x p b" . consult-project-buffer)
|
("C-x p b" . consult-project-buffer)
|
||||||
|
|
||||||
@@ -1562,15 +1793,20 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
(eval-when-compile
|
(eval-when-compile
|
||||||
(require 'consult))
|
(require 'consult))
|
||||||
|
|
||||||
|
(require 'perspective)
|
||||||
(with-eval-after-load 'consult
|
(with-eval-after-load 'consult
|
||||||
(consult-customize
|
(consult-customize
|
||||||
consult-theme :preview-key '(:debounce 0.2 any)
|
consult-theme :preview-key '(:debounce 0.2 any)
|
||||||
consult-ripgrep consult-git-grep consult-grep consult-man
|
consult-ripgrep consult-git-grep consult-grep consult-man
|
||||||
consult-bookmark consult-recent-file consult-xref
|
consult-bookmark consult-recent-file consult-xref
|
||||||
consult-source-bookmark consult-source-file-register
|
consult-source-bookmark consult-source-file-register
|
||||||
consult-source-recent-file consult-source-project-recent-file
|
consult-source-recent-file
|
||||||
|
consult-source-buffer
|
||||||
;; :preview-key "M-."
|
;; :preview-key "M-."
|
||||||
:preview-key '(:debounce 0.4 any)))
|
consult-source-project-recent-file
|
||||||
|
:preview-key '(:debounce 0.4 any))
|
||||||
|
(consult-customize consult-source-buffer :hidden t :default nil)
|
||||||
|
(add-to-list 'consult-buffer-sources persp-consult-source))
|
||||||
|
|
||||||
(setopt consult-narrow-key "<") ;; "C-+"
|
(setopt consult-narrow-key "<") ;; "C-+"
|
||||||
|
|
||||||
@@ -1654,73 +1890,73 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
(set-face-attribute 'org-level-7 nil :font "Iosevka Aile")
|
(set-face-attribute 'org-level-7 nil :font "Iosevka Aile")
|
||||||
(set-face-attribute 'org-level-8 nil :font "Iosevka Aile")
|
(set-face-attribute 'org-level-8 nil :font "Iosevka Aile")
|
||||||
|
|
||||||
(require 'org-present)
|
|
||||||
(require 'face-remap)
|
|
||||||
(require 'visual-fill-column)
|
|
||||||
|
|
||||||
(defvar-local my/org-present-face-remapping-cookies nil)
|
(defvar-local my/org-present-face-remapping-cookies nil)
|
||||||
(defun my/org-present-start ()
|
(with-eval-after-load 'org-present
|
||||||
(setq-local my/org-present-face-remapping-cookies nil)
|
(require 'face-remap)
|
||||||
;; Tweak font sizes
|
(require 'visual-fill-column)
|
||||||
(dolist (face '((default :height 2.0)
|
|
||||||
(header-line :height 4.0 :background "#303446")
|
(defun my/org-present-start ()
|
||||||
(org-document-title :height 1.75)
|
(setq-local my/org-present-face-remapping-cookies nil)
|
||||||
(org-code :height 2.0)
|
;; Tweak font sizes
|
||||||
(org-verbatim :height 2.0)
|
(dolist (face '((default :height 2.0)
|
||||||
(org-block :height 1.25)
|
(header-line :height 4.0 :background "#303446")
|
||||||
(org-block-begin-line :height 0.7)
|
(org-document-title :height 1.75)
|
||||||
(org-level-1 :height 3.0)
|
(org-code :height 2.0)
|
||||||
(org-level-2 :height 3.0)
|
(org-verbatim :height 2.0)
|
||||||
(org-level-3 :height 3.0)
|
(org-block :height 1.25)
|
||||||
(org-level-4 :height 3.0)
|
(org-block-begin-line :height 0.7)
|
||||||
(org-level-5 :height 3.0)
|
(org-level-1 :height 3.0)
|
||||||
(org-level-6 :height 3.0)
|
(org-level-2 :height 3.0)
|
||||||
(org-level-7 :height 3.0)
|
(org-level-3 :height 3.0)
|
||||||
(org-level-8 :height 3.0)))
|
(org-level-4 :height 3.0)
|
||||||
(push (apply #'face-remap-add-relative face) my/org-present-face-remapping-cookies))
|
(org-level-5 :height 3.0)
|
||||||
|
(org-level-6 :height 3.0)
|
||||||
|
(org-level-7 :height 3.0)
|
||||||
|
(org-level-8 :height 3.0)))
|
||||||
|
(push (apply #'face-remap-add-relative face) my/org-present-face-remapping-cookies))
|
||||||
|
|
||||||
;; Set a blank header line string to create blank space at the top
|
;; Set a blank header line string to create blank space at the top
|
||||||
(setq header-line-format " ")
|
(setq header-line-format " ")
|
||||||
|
|
||||||
;; Display inline images automatically
|
;; Display inline images automatically
|
||||||
(org-display-inline-images)
|
(org-display-inline-images)
|
||||||
(org-present-hide-cursor)
|
(org-present-hide-cursor)
|
||||||
|
|
||||||
;; Center the presentation and wrap lines
|
;; Center the presentation and wrap lines
|
||||||
(visual-fill-column-mode 1)
|
(visual-fill-column-mode 1)
|
||||||
(setq visual-fill-column-center-text t)
|
(setq visual-fill-column-center-text t)
|
||||||
;; (visual-line-mode 1)
|
;; (visual-line-mode 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defun my/org-present-end ()
|
(defun my/org-present-end ()
|
||||||
;; Reset font customizations
|
;; Reset font customizations
|
||||||
(dolist (cookie my/org-present-face-remapping-cookies)
|
(dolist (cookie my/org-present-face-remapping-cookies)
|
||||||
(face-remap-remove-relative cookie))
|
(face-remap-remove-relative cookie))
|
||||||
|
|
||||||
;; Clear the header line string so that it isn't displayed
|
;; Clear the header line string so that it isn't displayed
|
||||||
(setq header-line-format nil)
|
(setq header-line-format nil)
|
||||||
|
|
||||||
;; Stop displaying inline images
|
;; Stop displaying inline images
|
||||||
(org-remove-inline-images)
|
(org-remove-inline-images)
|
||||||
(org-present-show-cursor)
|
(org-present-show-cursor)
|
||||||
|
|
||||||
;; Stop centering the document
|
;; Stop centering the document
|
||||||
(visual-fill-column-mode 0)
|
(visual-fill-column-mode 0)
|
||||||
;; (visual-line-mode 0)
|
;; (visual-line-mode 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
(add-hook 'org-present-mode-hook 'my/org-present-start)
|
(add-hook 'org-present-mode-hook 'my/org-present-start)
|
||||||
(add-hook 'org-present-mode-quit-hook 'my/org-present-end)
|
(add-hook 'org-present-mode-quit-hook 'my/org-present-end))
|
||||||
|
|
||||||
(require 'org-roam)
|
;; (require 'org-roam)
|
||||||
(bind-keys ("C-c n l" . org-roam-buffer-toggle)
|
;; (bind-keys ("C-c n l" . org-roam-buffer-toggle)
|
||||||
("C-c n f" . org-roam-node-find)
|
;; ("C-c n f" . org-roam-node-find)
|
||||||
("C-c n g" . org-roam-graph)
|
;; ("C-c n g" . org-roam-graph)
|
||||||
("C-c n i" . org-roam-node-insert)
|
;; ("C-c n i" . org-roam-node-insert)
|
||||||
("C-c n c" . org-roam-capture))
|
;; ("C-c n c" . org-roam-capture))
|
||||||
|
|
||||||
;; (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
|
;; (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
|
||||||
(org-roam-db-autosync-mode)
|
;; (org-roam-db-autosync-mode)
|
||||||
|
|
||||||
(add-hook 'org-mode-hook 'org-modern-mode)
|
(add-hook 'org-mode-hook 'org-modern-mode)
|
||||||
|
|
||||||
@@ -1766,32 +2002,16 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(setopt lui-time-stamp-format "[%Y-%m-%d %H:%M]")
|
(use-package lui
|
||||||
(setopt slack-render-profile-images-p nil)
|
:defer t
|
||||||
(setopt slack-buffer-function #'switch-to-buffer)
|
:custom
|
||||||
#+END_SRC
|
(lui-time-stamp-format "[%Y-%m-%d %H:%M]"))
|
||||||
|
|
||||||
** Kubernetes
|
(use-package slack
|
||||||
:PROPERTIES:
|
:commands slack-start
|
||||||
:header-args:elisp: :tangle target/desktop/emacs-kubernetes.el
|
:custom
|
||||||
:END:
|
(slack-render-profile-images-p nil)
|
||||||
|
(slack-buffer-function #'switch-to-buffer))
|
||||||
#+BEGIN_SRC nix :tangle target/desktop/emacs-kubernetes.nix
|
|
||||||
{
|
|
||||||
programs.emacs = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = epkgs: with epkgs; [
|
|
||||||
kubed
|
|
||||||
];
|
|
||||||
extraConfig = builtins.readFile ./emacs-kubernetes.el;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
|
||||||
(use-package kubed
|
|
||||||
:bind-keymap
|
|
||||||
("s-k" . kubed-prefix-map))
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Ledger
|
** Ledger
|
||||||
@@ -1843,12 +2063,13 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = epkgs: with epkgs; [
|
extraPackages = epkgs: with epkgs; [
|
||||||
(epkgs.trivialBuild {
|
(epkgs.trivialBuild {
|
||||||
name = "claude-code";
|
pname = "claude-code";
|
||||||
|
version = "0.4.5";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "stevemolitor";
|
owner = "stevemolitor";
|
||||||
repo = "claude-code.el";
|
repo = "claude-code.el";
|
||||||
rev = "4a9914bd4161eb43f489820f9174c62390e5adc8";
|
rev = "03199df8b3a1e9cd4857f0851f7a912ba524aff3";
|
||||||
sha256 = "sha256-ISlD6q1hceckry1Jd19BX1MfobHJxng5ulX2gq9f644=";
|
sha256 = "sha256-5QJrWIu4EgnHcOqMwlrs2JBBx7aI9OaSJswesr6Apfk=";
|
||||||
};
|
};
|
||||||
packageRequires = [ epkgs.inheritenv ];
|
packageRequires = [ epkgs.inheritenv ];
|
||||||
})
|
})
|
||||||
@@ -1859,8 +2080,9 @@ for completion. That makes it really annoying to use; don't use yasnippet with e
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
#+BEGIN_SRC elisp
|
#+BEGIN_SRC elisp
|
||||||
(require 'claude-code)
|
(use-package claude-code
|
||||||
(keymap-global-set "C-c c" claude-code-command-map)
|
:bind-keymap ("C-c c" . claude-code-command-map)
|
||||||
|
:custom (claude-code-optimize-window-resize nil))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Theme
|
* Theme
|
||||||
I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
||||||
|
|||||||
Reference in New Issue
Block a user