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

View file

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

View file

@ -61,6 +61,7 @@
jq jq
xclip xclip
hunspell hunspell
python3
] ]
++ (with hunspellDicts; [ ++ (with hunspellDicts; [
en_US-large 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 ;; package --- My Emacs config
;;; Commentary: ;;; Commentary:
;; TODO ;; TODO
;; - use-package is part of vim now, let's use it instead of setup.el! ;; - org-roam
;; - org-roam;; - org goodies ;; - org goodies
;; - persp-mode ;; - persp-mode?
;; - understand how cape works ;; - understand how to configure cape
;; - dirvish
;; - prettify eshell
;; - projectile
;;; Code: ;;; Code:
(use-package flymake (use-package flymake
@ -75,6 +71,10 @@
:config :config
(set-face-background 'solaire-default-face "#1c1d26")) (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)
(use-package nerd-icons-completion (use-package nerd-icons-completion
@ -95,7 +95,13 @@
:hook :hook
(dired-mode . nerd-icons-dired-mode)) (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)) :config (diredfl-global-mode))
(use-package treemacs (use-package treemacs
@ -341,7 +347,8 @@
(use-package nix-mode (use-package nix-mode
:hook ((nix-mode . eglot-ensure) :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 :config
(global-nix-prettify-mode)) (global-nix-prettify-mode))
@ -349,10 +356,13 @@
:hook ((haskell-mode . eglot-ensure) :hook ((haskell-mode . eglot-ensure)
(haskell-mode . tree-sitter-hl-mode))) (haskell-mode . tree-sitter-hl-mode)))
(use-package purescript-mode
:hook (purescript-mode . turn-on-purescript-indentation))
(use-package terraform-mode (use-package terraform-mode
:hook ((terraform-mode . eglot-ensure) :hook ((terraform-mode . eglot-ensure)
(terraform-mode . tree-sitter-hl-mode))) (terraform-mode . tree-sitter-hl-mode)))
(use-package yaml-mode (use-package yaml-mode
:hook (yaml-mode . tree-sitter-hl-mode)) :hook (yaml-mode . tree-sitter-hl-mode))

View file

@ -1,8 +1,4 @@
{ {inputs, ...}: {
inputs,
self,
...
}: {
imports = [ imports = [
inputs.flake-parts.flakeModules.easyOverlay inputs.flake-parts.flakeModules.easyOverlay
]; ];
@ -21,6 +17,7 @@
# Some tree-sitter grammars in nixpksg are built with a too new ABI # Some tree-sitter grammars in nixpksg are built with a too new ABI
# https://github.com/NixOS/nixpkgs/issues/209114 # https://github.com/NixOS/nixpkgs/issues/209114
_module.args.pkgs = inputs.nixpkgs.legacyPackages.${system}.extend (self: super: { _module.args.pkgs = inputs.nixpkgs.legacyPackages.${system}.extend (self: super: {
indent-bars-source = inputs.indent-bars;
tree-sitter-grammars = tree-sitter-grammars =
super.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 nerd-icons-dired
treemacs-nerd-icons treemacs-nerd-icons
eat eat
clipetty
sideline sideline
sideline-flymake sideline-flymake
delight delight
@ -27,6 +28,9 @@ with epkgs; [
cape cape
which-key which-key
nix-mode nix-mode
unisonlang-mode
purescript-mode
dhall-mode
envrc envrc
inheritenv inheritenv
popper popper
@ -39,4 +43,8 @@ with epkgs; [
haskell-mode haskell-mode
terraform-mode terraform-mode
diredfl diredfl
(pkgs.callPackage ./indent-bars.nix {
src = pkgs.indent-bars-source;
inherit (epkgs) trivialBuild compat;
})
] ]