This commit is contained in:
Andrea Ciceri 2023-08-07 22:23:17 +02:00
parent 774908425d
commit 02fca8be4c
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
9 changed files with 88 additions and 41 deletions

5
.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
auto-save-list
elpa
projects
transient
result

35
flake.lock generated
View file

@ -7,11 +7,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1689306175,
"narHash": "sha256-8A9V2m8SsHMmn2F7SAwsbwu5QVTRR9MkX9kF48T+Qsk=",
"lastModified": 1691119623,
"narHash": "sha256-zL2Lh+tni8YfRHJl1d2btxk5gl6mlOrp/NoDu9ftBRw=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "a44ec998f6c8f04973f8e8630847157efec2bbfb",
"rev": "180dc7cbf6af0cae6ce6c404e9dd5ea3b3790733",
"type": "github"
},
"original": {
@ -56,13 +56,29 @@
"type": "github"
}
},
"indent-bars": {
"flake": false,
"locked": {
"lastModified": 1691423189,
"narHash": "sha256-NHkv6lU0WoVeQo369eWeyTFx1c+JEs1iHUDzV4hTR8Y=",
"owner": "jdtsmith",
"repo": "indent-bars",
"rev": "3a971623afc40532d0472c2e5c084abfcb8c5970",
"type": "github"
},
"original": {
"owner": "jdtsmith",
"repo": "indent-bars",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1689192006,
"narHash": "sha256-QM0f0d8oPphOTYJebsHioR9+FzJcy1QNIzREyubB91U=",
"lastModified": 1691006197,
"narHash": "sha256-DbtxVWPt+ZP5W0Usg7jAyTomIM//c3Jtfa59Ht7AV8s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2de8efefb6ce7f5e4e75bdf57376a96555986841",
"rev": "66aedfd010204949cb225cf749be08cb13ce1813",
"type": "github"
},
"original": {
@ -92,11 +108,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1689209875,
"narHash": "sha256-8AVcBV1DiszaZzHFd5iLc8HSLfxRAuqcU0QdfBEF3Ag=",
"lastModified": 1690927903,
"narHash": "sha256-D5gCaCROnjEKDOel//8TO/pOP87pAEtT0uT8X+0Bj/U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fcc147b1e9358a8386b2c4368bd928e1f63a7df2",
"rev": "bd836ac5e5a7358dea73cb74a013ca32864ccb86",
"type": "github"
},
"original": {
@ -110,6 +126,7 @@
"inputs": {
"emacs-overlay": "emacs-overlay",
"flake-parts": "flake-parts",
"indent-bars": "indent-bars",
"nixpkgs": [
"emacs-overlay",
"nixpkgs"

View file

@ -5,12 +5,14 @@
flake-parts.url = "github:hercules-ci/flake-parts";
emacs-overlay.url = "github:nix-community/emacs-overlay";
nixpkgs.follows = "emacs-overlay/nixpkgs";
indent-bars = {
# TODO remove when it lands on (M)ELPA
url = "github:jdtsmith/indent-bars";
flake = false;
};
};
outputs = inputs @ {
flake-parts,
...
} :
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
imports = [
@ -18,20 +20,14 @@
./hmModules
./formatter
./diff-closures
./hydra
];
};
nixConfig = {
extra-substituters = [
"https://aciceri-emacs.cachix.org"
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"aciceri-emacs.cachix.org-1:kxDGDFWV6LUj41tb8xmPRBI56UJSZOVveN49LZDUKdA="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
}

View file

@ -61,6 +61,7 @@
jq
xclip
hunspell
python3
]
++ (with hunspellDicts; [
en_US-large

View file

@ -1,5 +0,0 @@
{self, ...}: {
flake.hydraJobs = {
packages = self.packages;
};
}

32
init.el
View file

@ -1,14 +1,10 @@
;; package --- My Emacs config
;;; Commentary:
;; TODO
;; - use-package is part of vim now, let's use it instead of setup.el!
;; - org-roam;; - org goodies
;; - persp-mode
;; - understand how cape works
;; - dirvish
;; - prettify eshell
;; - projectile
;; - org-roam
;; - org goodies
;; - persp-mode?
;; - understand how to configure cape
;;; Code:
(use-package flymake
@ -75,6 +71,10 @@
:config
(set-face-background 'solaire-default-face "#1c1d26"))
(use-package clipetty
:ensure t
:hook (after-init . global-clipetty-mode))
(use-package nerd-icons)
(use-package nerd-icons-completion
@ -95,7 +95,13 @@
:hook
(dired-mode . nerd-icons-dired-mode))
(use-package diredfl
(use-package indent-bars
:custom
(indent-bars-color-by-depth '(:regexp "outline-\\([0-9]+\\)" :blend 0.2))
(indent-bars-highlight-current-depth '(:blend 0.4))
(indent-bars-no-stipple-char (string-to-char "")))
(use-package diredf
:config (diredfl-global-mode))
(use-package treemacs
@ -341,7 +347,8 @@
(use-package nix-mode
:hook ((nix-mode . eglot-ensure)
(nix-mode . tree-sitter-hl-mode))
(nix-mode . tree-sitter-hl-mode)
(nix-mode . (lambda () (setq indent-bars-spacing-override 2) (indent-bars-mode))))
:config
(global-nix-prettify-mode))
@ -349,10 +356,13 @@
:hook ((haskell-mode . eglot-ensure)
(haskell-mode . tree-sitter-hl-mode)))
(use-package purescript-mode
:hook (purescript-mode . turn-on-purescript-indentation))
(use-package terraform-mode
:hook ((terraform-mode . eglot-ensure)
(terraform-mode . tree-sitter-hl-mode)))
(use-package yaml-mode
:hook (yaml-mode . tree-sitter-hl-mode))

View file

@ -1,8 +1,4 @@
{
inputs,
self,
...
}: {
{inputs, ...}: {
imports = [
inputs.flake-parts.flakeModules.easyOverlay
];
@ -21,6 +17,7 @@
# 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: {
indent-bars-source = inputs.indent-bars;
tree-sitter-grammars =
super.tree-sitter-grammars
// {

18
packages/indent-bars.nix Normal file
View file

@ -0,0 +1,18 @@
{
trivialBuild,
compat,
src,
}: let
rev = "de347fc7fd2bdb905f95b986460ec485cd047992";
in
trivialBuild {
inherit src;
pname = "indent-bars";
version = rev;
propagatedUserEnvPkgs = [
compat
];
buildInputs = [
compat
];
}

View file

@ -9,6 +9,7 @@ with epkgs; [
nerd-icons-dired
treemacs-nerd-icons
eat
clipetty
sideline
sideline-flymake
delight
@ -27,6 +28,9 @@ with epkgs; [
cape
which-key
nix-mode
unisonlang-mode
purescript-mode
dhall-mode
envrc
inheritenv
popper
@ -39,4 +43,8 @@ with epkgs; [
haskell-mode
terraform-mode
diredfl
(pkgs.callPackage ./indent-bars.nix {
src = pkgs.indent-bars-source;
inherit (epkgs) trivialBuild compat;
})
]