Rust stuff and eat instead of vterm

This commit is contained in:
Andrea Ciceri 2023-03-20 10:42:42 +01:00
parent 56dae7c314
commit 0f4d751e3d
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
6 changed files with 53 additions and 8 deletions

View file

@ -6,7 +6,7 @@
}: {
packages.diff-closures = pkgs.writeShellApplication {
name = "diff-closures";
runtimeInputs = [ pkgs.ansifilter ];
runtimeInputs = [pkgs.ansifilter];
text = ''
nix store diff-closures --derivation \
github:aciceri/emacs/master#ccrEmacs \
@ -14,7 +14,7 @@
| ansifilter --text
'';
};
apps.diff-closures.program = "${self'.packages.diff-closures}/bin/diff-closures";
};
}

View file

@ -25,7 +25,7 @@
./diff-closures
];
};
nixConfig = {
extra-substituters = [
"https://aciceri-emacs.cachix.org"
@ -35,6 +35,5 @@
"aciceri-emacs.cachix.org-1:kxDGDFWV6LUj41tb8xmPRBI56UJSZOVveN49LZDUKdA="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}

View file

@ -35,7 +35,7 @@
client.enable = true;
defaultEditor = true;
socketActivation.enable = false;
startWithUserSession = false;
startWithUserSession = true;
};
systemd.user.sessionVariables = {
# TODO user `gpgconf --list-dirs agent-ssh-socket`

30
init.el
View file

@ -60,7 +60,8 @@
backup-by-copying t)
(defun ccr/set-faces ()
(set-face-attribute 'default nil :font "Fira Code 12")
(meow--prepare-face))
;; (meow--prepare-face)
)
(if (daemonp)
(add-hook 'server-after-make-frame-hook #'ccr/set-faces)
(ccr/set-faces))
@ -126,6 +127,8 @@
(setup haskell-mode (:hook eglot-ensure tree-sitter-hl-mode))
(setup rust-mode (:hook eglot-ensure tree-sitter-hl-mode))
(setup terraform-mode (:hook eglot-ensure tree-sitter-hl-mode))
(setup yaml-mode (:hook tree-sitter-hl-mode))
@ -266,10 +269,19 @@
cape-dabbrev-min-length 5))
(setup eshell
(:require projectile)
(:hook esh-autosuggest-mode)
(:with-mode eshell-load (:hook #'eat-eshell-mode #'eat-eshell-visual-command-mode))
(eshell-syntax-highlighting-global-mode +1)
(defun ccr/projectile-run-eat (&optional arg)
(interactive "P")
(let ((project (projectile-acquire-root)))
(projectile-with-default-dir project
(let ((eat-buffer-name (projectile-generate-process-name "eat" arg project)))
(eat)))))
(:global "C-c o e" #'projectile-run-eshell
"C-c o t" #'projectile-run-vterm))
"C-c o t" #'ccr/projectile-run-eat
"C-c o v" #'projectile-run-vterm))
(setup vterm
(:option vterm-timer-delay 0.01))
@ -391,6 +403,7 @@
"^\\*eshell.*\\*$" eshell-mode ;eshell as a popup
"^\\*shell.*\\*$" shell-mode ;shell as a popup
"^\\*term.*\\*$" term-mode ;term as a popup
"^\\*eat.*\\*$" term-mode ;eat as a popup
"^\\*vterm.*\\*$" vterm-mode ;vterm as a popup
)
popper-echo-lines 1
@ -461,3 +474,16 @@
(provide 'init)
;;; init.el ends here
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(lsp-mode diff-hl org-roam-ui consult-flycheck dirvish flycheck-inline orderless diredfl rustic ef-themes corfu-doc which-key popper envrc flycheck-posframe pdf-tools embark-consult vertico tree-sitter-langs paredit ligature hl-todo vterm yaml-mode eat kind-icon terraform-mode sway corfu-terminal shackle consult-projectile magit-delta nix-mode code-review haskell-mode delight marginalia meow eshell-syntax-highlighting all-the-icons-completion esh-autosuggest cape setup)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

View file

@ -8,10 +8,27 @@
inputs',
pkgs,
final,
lib,
system,
...
}: let
inherit (inputs.emacs-overlay.overlays.default pkgs pkgs) emacsPackagesFor;
in {
# Some tree-sitter grammars in nixpksg are built with a too new ABI
# https://github.com/NixOS/nixpkgs/issues/209114
_module.args.pkgs = inputs.nixpkgs.legacyPackages.${system}.extend (self: super: {
tree-sitter-grammars =
super.tree-sitter-grammars
// {
tree-sitter-rust = super.tree-sitter-grammars.tree-sitter-rust.overrideAttrs (_: {
nativeBuildInputs = [self.nodejs self.tree-sitter];
configurePhase = ''
tree-sitter generate --abi 13 src/grammar.json
'';
});
};
});
packages = {
ccrEmacsWithoutPackages =
(inputs'.emacs-overlay.packages.emacsPgtk.override {

View file

@ -49,7 +49,10 @@ with epkgs; [
eshell-syntax-highlighting
projectile
consult-projectile
eat
rust-mode
rustic
# TODO playing with these
sway
shackle