This commit is contained in:
Mars 2024-08-12 00:32:51 -04:00
commit e7e32dfa48
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
15 changed files with 795 additions and 206 deletions

View file

@ -32,6 +32,7 @@
nixvim = mkInput "pupbrained/nvim-config"; nixvim = mkInput "pupbrained/nvim-config";
treefmt-nix = mkInput "numtide/treefmt-nix"; treefmt-nix = mkInput "numtide/treefmt-nix";
nix-doom-emacs-unstraightened = mkInput "marienz/nix-doom-emacs-unstraightened";
darwin = mkFollowingNixpkgs "LnL7/nix-darwin/master"; darwin = mkFollowingNixpkgs "LnL7/nix-darwin/master";
home-manager = mkFollowingNixpkgs "nix-community/home-manager"; home-manager = mkFollowingNixpkgs "nix-community/home-manager";
nix-index-database = mkFollowingNixpkgs "nix-community/nix-index-database"; nix-index-database = mkFollowingNixpkgs "nix-community/nix-index-database";

View file

@ -113,8 +113,8 @@
}, },
"codeium": { "codeium": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_7"
}, },
"locked": { "locked": {
"lastModified": 1720551955, "lastModified": 1720551955,
@ -209,6 +209,46 @@
"type": "github" "type": "github"
} }
}, },
"doomemacs": {
"flake": false,
"locked": {
"lastModified": 1723252886,
"narHash": "sha256-wrC3oAnVz22SHR/ujEG8wqaA9vfSNDlCiitW10iUlbM=",
"owner": "doomemacs",
"repo": "doomemacs",
"rev": "f5020a4f7f228a84a51039a57fbf67107a0f2d74",
"type": "github"
},
"original": {
"owner": "doomemacs",
"repo": "doomemacs",
"type": "github"
}
},
"emacs-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nix-doom-emacs-unstraightened"
],
"nixpkgs-stable": [
"nix-doom-emacs-unstraightened"
]
},
"locked": {
"lastModified": 1723341846,
"narHash": "sha256-ZLQwk39U2ByDd8ZlsFOQN8wBRbjFtglCRgIHWDVG2RI=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "516c442503ca7f744d46d30b77b2ca11f35f1e3e",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -368,12 +408,15 @@
} }
}, },
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems_5"
},
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1710146030,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -383,25 +426,6 @@
} }
}, },
"flake-utils-plus": { "flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils_5"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"flake-utils-plus_2": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_6" "flake-utils": "flake-utils_6"
}, },
@ -420,9 +444,43 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": { "flake-utils-plus_2": {
"inputs": { "inputs": {
"systems": "systems_5" "flake-utils": "flake-utils_7"
},
"locked": {
"lastModified": 1715533576,
"narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_7"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,
@ -438,27 +496,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"inputs": {
"systems": "systems_6"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": { "flake-utils_4": {
"inputs": { "inputs": {
"systems": "systems_7" "systems": "systems_8"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@ -475,6 +515,24 @@
} }
}, },
"flake-utils_5": { "flake-utils_5": {
"inputs": {
"systems": "systems_9"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_6": {
"locked": { "locked": {
"lastModified": 1644229661, "lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
@ -489,9 +547,9 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_6": { "flake-utils_7": {
"inputs": { "inputs": {
"systems": "systems_8" "systems": "systems_10"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1694529238,
@ -951,6 +1009,27 @@
"type": "github" "type": "github"
} }
}, },
"nix-doom-emacs-unstraightened": {
"inputs": {
"doomemacs": "doomemacs",
"emacs-overlay": "emacs-overlay",
"nixpkgs": "nixpkgs_4",
"systems": "systems_6"
},
"locked": {
"lastModified": 1723365095,
"narHash": "sha256-2230LsHCU86sqVP2ND/w5A3JPH1eiikzrIPKVd0ZQho=",
"owner": "marienz",
"repo": "nix-doom-emacs-unstraightened",
"rev": "c8e3c381a6cb4e12768f23265f3af65902d872a2",
"type": "github"
},
"original": {
"owner": "marienz",
"repo": "nix-doom-emacs-unstraightened",
"type": "github"
}
},
"nix-github-actions": { "nix-github-actions": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -999,7 +1078,7 @@
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"libgit2": "libgit2", "libgit2": "libgit2",
"nixpkgs": "nixpkgs_4", "nixpkgs": "nixpkgs_5",
"nixpkgs-regression": "nixpkgs-regression", "nixpkgs-regression": "nixpkgs-regression",
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
@ -1080,6 +1159,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_11": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1723175592, "lastModified": 1723175592,
@ -1113,6 +1208,20 @@
} }
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": {
"lastModified": 1723221148,
"narHash": "sha256-7pjpeQlZUNQ4eeVntytU3jkw9dFK3k1Htgk2iuXjaD8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "154bcb95ad51bc257c2ce4043a725de6ca700ef6",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1709083642, "lastModified": 1709083642,
"narHash": "sha256-7kkJQd4rZ+vFrzWu8sTRtta5D1kBG0LSRYAfhtmMlSo=", "narHash": "sha256-7kkJQd4rZ+vFrzWu8sTRtta5D1kBG0LSRYAfhtmMlSo=",
@ -1128,7 +1237,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1723175592, "lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
@ -1144,7 +1253,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_6": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1702346276, "lastModified": 1702346276,
"narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=", "narHash": "sha256-eAQgwIWApFQ40ipeOjVSoK4TEHVd6nbSd9fApiHIw5A=",
@ -1160,7 +1269,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1723421421, "lastModified": 1723421421,
"narHash": "sha256-ohKD5dTOkz2wUa2od3G5COc0iAF2sV4HcNVeoPOfp7U=", "narHash": "sha256-ohKD5dTOkz2wUa2od3G5COc0iAF2sV4HcNVeoPOfp7U=",
@ -1175,7 +1284,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1723175592, "lastModified": 1723175592,
"narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=", "narHash": "sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI=",
@ -1191,27 +1300,11 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": {
"locked": {
"lastModified": 1720957393,
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"codeium": "codeium", "codeium": "codeium",
"flake-utils": "flake-utils_3", "flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_7", "nixpkgs": "nixpkgs_8",
"nixvim": "nixvim_2", "nixvim": "nixvim_2",
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
@ -1237,7 +1330,7 @@
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"home-manager": "home-manager_4", "home-manager": "home-manager_4",
"nix-darwin": "nix-darwin", "nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_9",
"nuschtosSearch": "nuschtosSearch", "nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
@ -1257,7 +1350,7 @@
}, },
"nuschtosSearch": { "nuschtosSearch": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_4", "flake-utils": "flake-utils_5",
"nixpkgs": [ "nixpkgs": [
"nixvim", "nixvim",
"nixvim", "nixvim",
@ -1283,7 +1376,7 @@
"flake-compat": [ "flake-compat": [
"nix-super" "nix-super"
], ],
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"gitignore": [ "gitignore": [
"nix-super" "nix-super"
], ],
@ -1322,9 +1415,10 @@
"hyprland-plugins": "hyprland-plugins", "hyprland-plugins": "hyprland-plugins",
"impermanence": "impermanence", "impermanence": "impermanence",
"nix-colors": "nix-colors", "nix-colors": "nix-colors",
"nix-doom-emacs-unstraightened": "nix-doom-emacs-unstraightened",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nix-super": "nix-super", "nix-super": "nix-super",
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_6",
"nixvim": "nixvim", "nixvim": "nixvim",
"snowfall-flake": "snowfall-flake", "snowfall-flake": "snowfall-flake",
"snowfall-lib": "snowfall-lib_2", "snowfall-lib": "snowfall-lib_2",
@ -1432,6 +1526,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_10": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1689347949, "lastModified": 1689347949,
@ -1537,6 +1646,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_9": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": { "treefmt-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -1561,7 +1685,7 @@
}, },
"treefmt-nix_2": { "treefmt-nix_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_10"
}, },
"locked": { "locked": {
"lastModified": 1723402464, "lastModified": 1723402464,
@ -1579,7 +1703,7 @@
}, },
"treefmt-nix_3": { "treefmt-nix_3": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_10" "nixpkgs": "nixpkgs_11"
}, },
"locked": { "locked": {
"lastModified": 1723402464, "lastModified": 1723402464,

View file

@ -24,6 +24,7 @@
}; };
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
nix-colors.url = "github:Misterio77/nix-colors"; nix-colors.url = "github:Misterio77/nix-colors";
nix-doom-emacs-unstraightened.url = "github:marienz/nix-doom-emacs-unstraightened";
nix-index-database = { nix-index-database = {
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/nix-index-database"; url = "github:nix-community/nix-index-database";

View file

@ -4,6 +4,7 @@
... ...
}: { }: {
imports = with inputs; [ imports = with inputs; [
nix-doom-emacs-unstraightened.hmModule
nix-index-database.hmModules.nix-index nix-index-database.hmModules.nix-index
catppuccin.homeManagerModules.catppuccin catppuccin.homeManagerModules.catppuccin
chaotic.homeManagerModules.default chaotic.homeManagerModules.default
@ -71,6 +72,11 @@
tealdeer.enable = false; tealdeer.enable = false;
wezterm.extraConfig = builtins.readFile ./wezterm.lua; wezterm.extraConfig = builtins.readFile ./wezterm.lua;
doom-emacs = {
enable = true;
doomDir = ./doomDir;
};
git = { git = {
extraConfig.credential.helper = "osxkeychain"; extraConfig.credential.helper = "osxkeychain";
signing.key = "874E22DF2F9DFCB5"; signing.key = "874E22DF2F9DFCB5";

View file

@ -0,0 +1,93 @@
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
;; Place your private configuration here! Remember, you do not need to run 'doom
;; sync' after modifying this file!
;; Some functionality uses this to identify you, e.g. GPG configuration, email
;; clients, file templates and snippets. It is optional.
(setq user-full-name "Mars"
user-mail-address "mars@pupbrained.xyz")
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-unicode-font' -- for unicode glyphs
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; See 'C-h v doom-font' for documentation and more examples of what they
;; accept. For example:
;;
;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
;; There are two ways to load a theme. Both assume the theme is installed and
;; available. You can either set `doom-theme' or manually load a theme with the
;; `load-theme' function. This is the default:
(setq doom-theme 'catppuccin)
(setq doom-font (font-spec :family "Maple Mono NF" :size 16))
;; This determines the style of line numbers in effect. If set to `nil', line
;; numbers are disabled. For relative line numbers, set this to `relative'.
(setq display-line-numbers-type 'relative)
;; If you use `org' and don't want your org files in the default location below,
;; change `org-directory'. It must be set before org loads!
(setq org-directory "~/org/")
(setq lsp-rust-analyzer-cargo-watch-command 'clippy)
(load! "./flycheck-inline.el")
(with-eval-after-load 'flycheck
(add-hook 'flycheck-mode-hook #'flycheck-inline-mode))
;; we recommend using use-package to organize your init.el
;; accept completion from copilot and fallback to company
(use-package! copilot
:hook (prog-mode . copilot-mode)
:bind (:map copilot-completion-map
("<tab>" . 'copilot-accept-completion)
("TAB" . 'copilot-accept-completion)
("C-TAB" . 'copilot-accept-completion-by-word)
("C-<tab>" . 'copilot-accept-completion-by-word)))
;; Whenever you reconfigure a package, make sure to wrap your config in an
;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
;;
;; (after! PACKAGE
;; (setq x y))
;;
;; The exceptions to this rule:
;;
;; - Setting file/directory variables (like `org-directory')
;; - Setting variables which explicitly tell you to set them before their
;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
;; - Setting doom variables (which start with 'doom-' or '+').
;;
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;;
;; To get information about any of these functions/macros, move the cursor over
;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
;; This will open documentation for it, including demos of how they are used.
;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
;; etc).
;;
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
;; they are implemented.

View file

@ -0,0 +1,285 @@
;;; flycheck-inline.el --- Display Flycheck errors inline -*- lexical-binding: t; -*-
;; Copyright (C) 2017-2018 fmdkdd
;; Author: fmdkdd
;; URL: https://github.com/flycheck/flycheck-inline
;; Keywords: tools, convenience
;; Version: 0.1-cvs
;; Package-Requires: ((emacs "25.1") (flycheck "32"))
;; This file is not part of GNU Emacs.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;; Provide an error display function to show Flycheck errors inline, directly
;; below their location in the buffer.
;;
;; # Setup
;;
;; Enable the local minor mode for all flycheck-mode buffers:
;;
;; (with-eval-after-load 'flycheck
;; (add-hook 'flycheck-mode-hook #'flycheck-inline-mode))
;;; Code:
(require 'flycheck)
(require 'seq)
;;; Displaying line-long overlays (phantoms)
(defun flycheck-inline-phantom-display (msg &optional pos err)
"Display MSG in a phantom directly below POS.
MSG is a string that will be put in a line-long overlay (phantom)
at the line immediately following POS. If POS is nil, current
point is used instead.
Return the displayed phantom."
(pcase-let* ((p (or pos (point)))
(`(,offset . ,pos-eol)
(save-excursion
(goto-char p)
(cons (- p (point-at-bol)) (point-at-eol))))
(ov (make-overlay pos-eol (1+ pos-eol)))
;; If the error is on the last line, and that line doesn't end
;; with a newline, the overlay will be displayed at the end of
;; the line instead of below it. Adding a newline before the
;; message fixes it.
(str (concat (when (eq pos-eol (point-max)) "\n")
(flycheck-inline-indent-message offset msg)
"\n")))
(overlay-put ov 'phantom t)
(overlay-put ov 'after-string str)
(overlay-put ov 'error err)
ov))
(defun flycheck-inline--contains-point (phantom &optional pt)
"Whether the given error overlay contains the position PT otherwise `(point)'"
(let* ((pos (or pt (point)))
(err (overlay-get phantom 'error))
(region (flycheck-error-region-for-mode err 'symbols)))
(and phantom
;; Must be one of our phantoms (probably unneeded).
(overlay-get phantom 'phantom)
;; The underlying error must currently exist.
err
(memq err flycheck-current-errors)
;; Most importantly, point must be within the error bounds.
region
(>= pos (car region))
(<= pos (cdr region)))))
(defun flycheck-inline-phantom-delete (phantom)
"Delete PHANTOM if its region doesn't contain point.
Returns the overlay removed or nil."
(if (flycheck-inline--contains-point phantom)
nil
(progn (delete-overlay phantom) t)))
(defun flycheck-inline-indent-message (offset msg)
"Indent all lines of MSG by OFFSET spaces.
MSG is trimmed beforehand."
(let* ((pad (make-string offset ?\s))
(rep (concat "\n" pad)))
(concat pad
(replace-regexp-in-string "\n" rep (string-trim msg)))))
;;; Customization
(defgroup flycheck-inline nil
"Display Flycheck errors inline."
:prefix "flycheck-inline-"
:group 'flycheck
:link '(url-link :tag "Github" "https://github.com/flycheck/flycheck-inline"))
(defface flycheck-inline-error
'((t :inherit compilation-error))
"Flycheck-inline face for errors."
:package-version '(flycheck-inline . "0.1")
:group 'flycheck-inline)
(defface flycheck-inline-warning
'((t :inherit compilation-warning))
"Flycheck-inline face for warnings."
:package-version '(flycheck-inline . "0.1")
:group 'flycheck-inline)
(defface flycheck-inline-info
'((t :inherit compilation-info))
"Flycheck-inline face for informational messages."
:package-version '(flycheck-inline . "0.1")
:group 'flycheck-inline)
(defcustom flycheck-inline-display-function #'flycheck-inline-display-phantom
"Function to display inline errors.
This function is used to display inline all errors at point, as
well as all related errors. It has the signature (MSG &optional
POS ERR), where MSG is the error message to display, POS its
buffer position, and ERR is the flycheck error in general."
:group 'flycheck-inline
:package-version '(flycheck-inline . "0.1")
:type '(function :tag "Inline error display function")
:risky t)
(defcustom flycheck-inline-clear-function #'flycheck-inline-clear-phantoms
"Function to clear all inline errors.
It takes no arguments and should remove all inline errors created
by `flycheck-inline-display-function'."
:group 'flycheck-inline
:package-version '(flycheck-inline . "0.1")
:type '(function :tag "Inline error clear function")
:risky t)
(defcustom flycheck-inline-display-error-id t
"Whether to display error IDs inline.
If non-nil, inline errors will contain the error ID. Error IDs
are optional: not all checkers suplpy this information. Error
IDs can also be seen in Flycheck's error list."
:group 'flycheck-inline
:type 'boolean
:package-version '(flycheck-inline . "0.1")
:safe #'booleanp)
;;; Displaying inline errors with phantoms
(defun flycheck-inline--displayed-p (err)
"Whether the given error is displayed with any inline overlays."
(seq-find (lambda (p) (eq err (overlay-get p 'error)))
flycheck-inline--phantoms))
(defvar-local flycheck-inline--phantoms nil
"Remember which phantoms were added to the buffer.")
(defun flycheck-inline-display-phantom (msg &optional pos err)
"Display MSG at POS representing error ERR using phantoms.
POS defaults to point."
(unless (flycheck-inline--displayed-p err)
(push (flycheck-inline-phantom-display msg pos err) flycheck-inline--phantoms)))
(defun flycheck-inline-clear-phantoms ()
"Remove all phantoms from buffer that don't contain point."
(setq flycheck-inline--phantoms
(seq-remove #'flycheck-inline-phantom-delete flycheck-inline--phantoms)))
;;; Display inline errors
(defun flycheck-inline--error-position (err)
"Return the position to insert ERR at."
(if (flycheck-relevant-error-other-file-p err)
;; Display overlays for other-file errors on the first line
(point-min)
(flycheck-error-pos err)))
(defun flycheck-inline--error-message (err)
"Return the message to display for ERR."
(let ((filename (flycheck-error-filename err))
(id (flycheck-error-id err)))
(concat (when (and filename (not (equal filename (buffer-file-name))))
(format "In \"%s\":\n" (file-relative-name filename default-directory)))
(flycheck-error-message err)
(when (and id flycheck-inline-display-error-id)
(format " [%s]" id)))))
(defun flycheck-inline--error-face (err)
"Return the face used to display ERR."
(pcase (flycheck-error-level err)
(`info 'flycheck-inline-info)
(`warning 'flycheck-inline-warning)
(`error 'flycheck-inline-error)))
(defun flycheck-inline-display-error (err)
"Display `flycheck-error' ERR inline."
(let* ((pos (flycheck-inline--error-position err))
(msg (propertize (flycheck-inline--error-message err)
'face (flycheck-inline--error-face err))))
(funcall flycheck-inline-display-function msg pos err)))
(defun flycheck-inline-hide-errors ()
"Hide all inline messages currently being shown."
(funcall flycheck-inline-clear-function))
(defun flycheck-inline-display-errors (errors)
"Display ERRORS, and all related errors, inline.
ERRORS is a list of `flycheck-error' objects."
(flycheck-inline-hide-errors)
(mapc #'flycheck-inline-display-error
(seq-uniq
(seq-mapcat #'flycheck-related-errors errors))))
;;; Global and local minor modes
;;;###autoload
(define-minor-mode flycheck-inline-mode
"A minor mode to show Flycheck error messages line.
When called interactively, toggle `flycheck-inline-mode'. With
prefix ARG, enable `flycheck-inline-mode' if ARG is positive,
otherwise disable it.
When called from Lisp, enable `flycheck-inline-mode' if ARG is
omitted, nil or positive. If ARG is `toggle', toggle
`flycheck-inline-mode'. Otherwise behave as if called
interactively.
In `flycheck-inline-mode', show Flycheck error messages inline,
directly below the error reported location."
:group 'flycheck-inline
:require 'flycheck-inline
(cond
;; Use our display function.
(flycheck-inline-mode
(setq-local flycheck-display-errors-function #'flycheck-inline-display-errors)
(add-hook 'post-command-hook #'flycheck-inline-hide-errors nil 'local))
;; Reset the display function and remove ourselves from all hooks but only
;; if the mode is still active.
((not flycheck-inline-mode)
(kill-local-variable 'flycheck-display-errors-function)
(flycheck-inline-hide-errors)
(remove-hook 'post-command-hook #'flycheck-inline-hide-errors 'local))))
(defun turn-on-flycheck-inline ()
"Turn on `flycheck-inline-mode' in Flycheck buffers."
;; Make sure to turn on flycheck-inline in this buffer, either directly if
;; flycheck is already loaded, or via a hook if flycheck hasn't been loaded
;; yet.
(if flycheck-mode
(flycheck-inline-mode)
(add-hook 'flycheck-mode-hook #'flycheck-inline-mode nil 'local)))
;;;###autoload
(define-global-minor-mode global-flycheck-inline-mode
flycheck-inline-mode turn-on-flycheck-inline
"Toggle flycheck-inline in all Flycheck buffers."
:group 'flycheck-inline
:require 'flycheck-inline)
(provide 'flycheck-inline)
;;; flycheck-inline.el ends here

View file

@ -0,0 +1,190 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a link to Doom's Module Index where all
;; of our modules are listed, including what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
(company +childframe) ; the ultimate code completion backend
vertico ; the search engine of the future
:ui
deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
;;doom-quit ; DOOM quit-message prompts when you quit Emacs
(emoji +unicode) ; 🙂
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
indent-guides ; highlighted indent columns
ligatures ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink cursor line after big motions
neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
unicode ; extended unicode support for various languages
(vc-gutter +pretty) ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;biblio ; Writes a PhD for you (citation needed)
;;debugger ; FIXME stepping through code, to help you add bugs
direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
;;ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
(lsp +eglot)
lookup ; navigate your code and its documentation
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
;;pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
tree-sitter ; syntax and parsing, sitting in a tree...
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
(cc +lsp) ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
dhall
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
(go +lsp) ; the hipster dialect
;;(graphql +lsp) ; Give queries a REST
(haskell +lsp) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
json ; At least it ain't XML
(java +lsp) ; the poster child for carpal tunnel syndrome
javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
;;latex ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
;;org ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
;;scala ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
web ; the tubes
;;yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +org +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
;;literate
(default +bindings +smartparens))

View file

@ -0,0 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
(package! catppuccin-theme)
(package! direnv)
(package! copilot
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))

View file

@ -108,7 +108,7 @@ local keybinds = {
local config = { local config = {
adjust_window_size_when_changing_font_size = false, adjust_window_size_when_changing_font_size = false,
color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()), color_scheme = 'Catppuccin Mocha',
cursor_blink_ease_in = 'Constant', cursor_blink_ease_in = 'Constant',
cursor_blink_ease_out = 'Constant', cursor_blink_ease_out = 'Constant',
cursor_blink_rate = 500, cursor_blink_rate = 500,

View file

@ -48,6 +48,7 @@ with pkgs; {
}; };
git = { git = {
extraConfig.credential.helper = "libsecret";
signing.key = "91B1F40056A01DDF"; signing.key = "91B1F40056A01DDF";
}; };
}; };

View file

@ -4,7 +4,6 @@
./git.nix ./git.nix
./macchina.nix ./macchina.nix
./wezterm.nix ./wezterm.nix
./nushell
]; ];
programs = { programs = {

View file

@ -1,113 +0,0 @@
const color_palette = {
rosewater: "#f5e0dc"
flamingo: "#f2cdcd"
pink: "#f5c2e7"
mauve: "#cba6f7"
red: "#f38ba8"
maroon: "#eba0ac"
peach: "#fab387"
yellow: "#f9e2af"
green: "#a6e3a1"
teal: "#94e2d5"
sky: "#89dceb"
sapphire: "#74c7ec"
blue: "#89b4fa"
lavender: "#b4befe"
text: "#cdd6f4"
subtext1: "#bac2de"
subtext0: "#a6adc8"
overlay2: "#9399b2"
overlay1: "#7f849c"
overlay0: "#6c7086"
surface2: "#585b70"
surface1: "#45475a"
surface0: "#313244"
base: "#1e1e2e"
mantle: "#181825"
crust: "#11111b"
}
$env.config.color_config = {
separator: $color_palette.overlay0
leading_trailing_space_bg: { attr: "n" }
header: { fg: $color_palette.blue attr: "b" }
empty: $color_palette.lavender
bool: $color_palette.lavender
int: $color_palette.peach
duration: $color_palette.text
filesize: {|e|
if $e < 1mb {
$color_palette.green
} else if $e < 100mb {
$color_palette.yellow
} else if $e < 500mb {
$color_palette.peach
} else if $e < 800mb {
$color_palette.maroon
} else if $e > 800mb {
$color_palette.red
}
}
date: {|| (date now) - $in |
if $in < 1hr {
$color_palette.green
} else if $in < 1day {
$color_palette.yellow
} else if $in < 3day {
$color_palette.peach
} else if $in < 1wk {
$color_palette.maroon
} else if $in > 1wk {
$color_palette.red
}
}
range: $color_palette.text
float: $color_palette.text
string: $color_palette.text
nothing: $color_palette.text
binary: $color_palette.text
cellpath: $color_palette.text
row_index: { fg: $color_palette.mauve attr: "b" }
record: $color_palette.text
list: $color_palette.text
block: $color_palette.text
hints: $color_palette.overlay1
search_result: { fg: $color_palette.red bg: $color_palette.text }
shape_and: { fg: $color_palette.pink attr: "b" }
shape_binary: { fg: $color_palette.pink attr: "b" }
shape_block: { fg: $color_palette.blue attr: "b" }
shape_bool: $color_palette.teal
shape_custom: $color_palette.green
shape_datetime: { fg: $color_palette.teal attr: "b" }
shape_directory: $color_palette.teal
shape_external: $color_palette.teal
shape_externalarg: { fg: $color_palette.green attr: "b" }
shape_filepath: $color_palette.teal
shape_flag: { fg: $color_palette.blue attr: "b" }
shape_float: { fg: $color_palette.pink attr: "b" }
shape_garbage: { fg: $color_palette.text bg: $color_palette.red attr: "b" }
shape_globpattern: { fg: $color_palette.teal attr: "b" }
shape_int: { fg: $color_palette.pink attr: "b" }
shape_internalcall: { fg: $color_palette.teal attr: "b" }
shape_list: { fg: $color_palette.teal attr: "b" }
shape_literal: $color_palette.blue
shape_match_pattern: $color_palette.green
shape_matching_brackets: { attr: "u" }
shape_nothing: $color_palette.teal
shape_operator: $color_palette.peach
shape_or: { fg: $color_palette.pink attr: "b" }
shape_pipe: { fg: $color_palette.pink attr: "b" }
shape_range: { fg: $color_palette.peach attr: "b" }
shape_record: { fg: $color_palette.teal attr: "b" }
shape_redirection: { fg: $color_palette.pink attr: "b" }
shape_signature: { fg: $color_palette.green attr: "b" }
shape_string: $color_palette.green
shape_string_interpolation: { fg: $color_palette.teal attr: "b" }
shape_table: { fg: $color_palette.blue attr: "b" }
shape_variable: $color_palette.pink
background: $color_palette.base
foreground: $color_palette.text
cursor: $color_palette.blue
}

View file

@ -1,10 +0,0 @@
{...}: {
programs = {
carapace.enable = true;
nushell = {
enable = true;
configFile.source = ./config.nu;
};
};
}

View file

@ -63,12 +63,11 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
programs = { programs.fish.enable = true;
gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
};
security.pam.enableSudoTouchIdAuth = true; security.pam.enableSudoTouchIdAuth = true;

View file

@ -138,6 +138,7 @@
programs = { programs = {
fish.enable = true; fish.enable = true;
gnupg.agent.enable = true;
ssh.startAgent = true; ssh.startAgent = true;
}; };