Compare commits

..

No commits in common. "6e25f44300e6b20fe591c59ecd32ac3ebf2b7bdd" and "1917a8636a0c6eb4992bb675c8dbd804e5efbc0a" have entirely different histories.

9 changed files with 208 additions and 150 deletions

View file

@ -1,46 +1,35 @@
#+title: Pankomacs #+html: <img src="media/panko.gif" align="right" width="4%">
#+options: toc:nil num:nil #+options: toc:nil
#+html: <img src="media/panko.gif" height="256px"> ** Pankomacs
Pankomacs is an "opinionated opinionated emacs configuration" which uses flakes ****** opinionated opinionated emacs configuration (ft. flakes)
and emacs-overlay to manage packages instead of straight.el. It tries to use
builtin tools when possible to keep the size of the configuration reasonable.
* How do I use this configuration? -----
Add pankomacs and nixpkgs (assuming you don't have it) into your flake inputs #+html: <img src="media/screenshot.png" align="center">
like this:
#+begin_src nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
pankomacs = {
url = "git+https://copeberg.org/amadaluzia/pankomacs";
inputs.nixpkgs.follows = "nixpkgs";
};
};
}
#+end_src
You can then, for example, use it in your NixOS configuration by using this in -----
your NixOS configuration:
#+begin_src nix
{ inputs, pkgs, ... }: {
services.emacs = {
enable = true;
package = inputs.pankomacs.lib.mkPankomacs {
inherit pkgs;
emacs = pkgs.emacs-pgtk; # non-specific
};
};
}
#+end_src
* Where did the name come from? *** Disclaimer
Pankomacs and "opinionated opinionated emacs configuration" came from a mix This config is bound to change for any reason if I feel like it that day.
between Emacs and [[https://www.instagram.com/fatfatpankocat/][fatfatpankocat]].
You are fine to use it, but do know that it may change for any reason on my end.
-----
*** What is this configuration?
This is a Nix flake for my Emacs configuration, similar to [[https://github.com/nix-community/kickstart-nix.nvim][kickstart-nix.nvim]].
This was put in my =~/.emacs.d/= so I added some files to exclude in my =.gitignore=.
-----
*** Where did the name come from?
Pankomacs and "opinionated opinionated emacs configuration" came from a mix between Emacs and [[https://www.instagram.com/fatfatpankocat/][fatfatpankocat]].
Other suggested named were "Plusmacs" based off of this discord conversation: Other suggested named were "Plusmacs" based off of this discord conversation:

24
config/config-dev.el Normal file
View file

@ -0,0 +1,24 @@
;; -*- lexical-binding: t -*-
(defun config-init-dev ()
(use-package which-key
:defer t
:commands (which-key-mode)
:custom
(which-key-mode t))
(use-package envrc
:defer t
:commands (envrc-global-mode envrc-mode)
:custom
(envrc-global-mode t))
(use-package eglot
:defer t
:commands (eglot eglot-ensure)
:hook (prog-mode . eglot-ensure)
:config
(add-to-list 'eglot-server-programs '((nim-mode nimscript-mode) . ("nimlsp")))))
(provide 'config-dev)

29
config/config-ivy.el Normal file
View file

@ -0,0 +1,29 @@
;; -*- lexical-binding: t -*-
(defun config-init-ivy ()
(use-package ivy
:custom
(ivy-mode t)
(counsel-mode t)
(ivy-use-virtual-buffers t)
:bind (("C-s" . swiper-isearch)
("C-c C-r" . ivy-resume)
("<f6>" . ivy-resume)
("M-x" . counsel-M-x)
("C-x C-f" . counsel-find-file)
("<f1> f" . counsel-describe-function)
("<f1> v" . counsel-describe-variable)
("<f1> o" . counsel-describe-symbol)
("<f1> l" . counsel-find-library)
("<f2> i" . counsel-info-lookup-symbol)
("<f2> u" . counsel-unicode-char)
("C-c g" . counsel-git)
("C-c j" . counsel-git-grep)
("C-c k" . counsel-ag)
("C-x l" . counsel-locate)
("C-S-o" . counsel-rhythmbox)
:map minibuffer-local-map
("C-r" . counsel-minibuffer-history))))
(provide 'config-ivy)

View file

@ -1,16 +1,61 @@
;;; config-languages --- Language configuration -*- lexical-binding: t -*- ;; -*- lexical-binding: t -*-
;;; Commentary: (defun config-init-languages ()
;; I need to provide configuration for things like
;; Nix, Nim, etc. so why not just write it down
;; here?
;;; Code:
(defun init-languages-config ()
"Just provide some language configuration."
(use-package nix-ts-mode (use-package nix-ts-mode
:mode "\\.nix\\'")) :defer t
:commands (nix-ts-mode)
:mode "\\.nix\\'")
(use-package rust-ts-mode
:defer t
:commands (rust-ts-mode)
:mode "\\.rs\\'")
(use-package qml-mode
:defer t
:commands (qml-mode)
:mode "\\.qml\\'")
(use-package haskell-mode
:defer t
:commands (haskell-mode)
:mode "\\.hs\\'")
(use-package python
:defer t
:commands (python-ts-mode python-mode)
:custom
(python-indent-offset 4))
(use-package cc-mode
:defer t
:commands (c-ts-mode
c++-ts-mode
c++-mode
c-mode)
:custom
(c-basic-offset 4))
(use-package nushell-mode
:defer t
:commands (nushell-mode)
:mode "\\.nu\\'")
(use-package tuareg
:defer t
:commands (tuareg-mode tuareg-opam-mode)
:mode "\\.ml\\'")
(use-package nim-mode
:defer t
:commands (nim-mode)
:mode (("\\.nim\\'" . nim-mode)
("\\.nims\\'" . nimscript-mode)))
(use-package go-ts-mode
:defer t
:commands (go-ts-mode go-mod-ts-mode)
:mode (("\\.go\\'" . go-ts-mode)
("go.mod\\'" . go-mod-ts-mode))))
(provide 'config-languages) (provide 'config-languages)
;;; config-languages.el ends here

View file

@ -1,42 +0,0 @@
;;; config-org --- Configuration for Org-mode -*- lexical-binding: t -*-
;;; Commentary:
;; I need to do Org-mode configuration and this is
;; a decent place to do that.
;;; Code:
(defun init-org-config ()
"Just provide Org-mode configuration."
(defun my/org-mode-borders ()
(modify-all-frames-parameters
'((right-divider-width . 20)
(internal-border-width . 20)))
(dolist (face '(window-divider
window-divider-first-pixel
window-divider-last-pixel))
(face-spec-reset-face face)
(set-face-foreground face (face-attribute 'default :background)))
(set-face-background 'fringe (face-attribute 'default :background)))
(use-package org
:custom
;; Edit settings
(org-auto-align-tags nil)
(org-tags-column 0)
(org-fold-catch-invisible-edits 'show-and-error)
(org-special-ctrl-a/e t)
(org-insert-heading-respect-content t)
;; Org styling, hide markup etc.
(org-hide-emphasis-markers t)
(org-pretty-entities t)
(org-agenda-tags-column 0)
(org-ellipsis "")
:hook (org-mode . my/org-mode-borders))
(use-package org-modern
:hook (org-mode . org-modern-mode))
(use-package org-bullets
:hook org-mode))
(provide 'config-org)
;;; config-org.el ends here

View file

@ -1,20 +1,24 @@
;;; config-ui --- UI configuration -*- lexical-binding: t -*- ;; -*- lexical-binding: t -*-
;;; Commentary:
;; I need to do UI configuration and this is a (defun config-init-ui ()
;; decent place to do that. (defun my/doom-modeline-for-new-frames (&optional frame)
(setq doom-modeline-height (+ (frame-char-height) 8))
(with-selected-frame (or frame (selected-frame))
(doom-modeline-mode 1)))
;;; Code: (use-package doom-modeline
:defer t
:commands (doom-modeline-mode)
:custom
(doom-modeline-mode (not (daemonp)))
(doom-modeline-env-load-string "")
:hook ((server-after-make-frame) . my/doom-modeline-for-new-frames)
;; ^^^^^^^^^^^^^^^^^^^^^^^ this hook is my goat
)
(defun init-ui-config ()
"Just provide UI configuration."
(use-package base16-theme (use-package base16-theme
:config :config
(load-theme 'base16-rose-pine t)) (load-theme 'base16-rose-pine t)))
(use-package doom-modeline
:custom
(doom-modeline-mode t)))
(provide 'config-ui) (provide 'config-ui)
;;; config-ui.el ends here

View file

@ -1,62 +1,64 @@
;;; config.el --- my emacs configuration -*- lexical-binding: t -*- ;;; config.el --- my emacs configuration -*- lexical-binding: t -*-
;; Author: Artur Manuel
;; URL: https://copeberg.org/amadaluzia/pankomacs
;; Version: 0.0.0
;;; Commentary: ;;; Commentary:
;; Not much to gather here. ;; All this does is provide a configuration for Emacs to use.
;;; Code: ;;; Code:
(require 'config-ui) (require 'config-ui)
(require 'config-org) (require 'config-dev)
(require 'config-ivy)
(require 'config-languages) (require 'config-languages)
(require 'use-package)
(defun init-config () (defun config-initialise ()
"The actual configuration to initialise at startup." (config-init-dev)
(config-init-ui)
(config-init-languages)
(config-init-ivy)
(use-package emacs (use-package emacs
:init :init
(setq frame-resize-pixelwise t (setq frame-resize-pixelwise t
window-resize-pixelwise t window-resize-pixelwise t
frame-inhibit-implied-resize t) frame-inhibit-implied-resize t)
(defun crm-indicator (args)
(cons (format "[CRM%s] %s"
(replace-regexp-in-string
"\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" ""
crm-separator)
(car args))
(cdr args)))
(advice-add #'completing-read-multiple :filter-args #'crm-indicator)
(setq minibuffer-prompt-properties
'(read-only t cursor-intangible t face minibuffer-prompt))
(add-hook 'minibuffer-setup-hook #'cursor-intangible-mode)
:custom :custom
;; vertico setup
(read-extended-command-predicate #'command-completion-default-include-p)
(minibuffer-prompt-properties
'(read-only t cursor-intangible t face minibuffer-prompt))
(enable-recursive-buffer t)
(tab-always-indent 'complete)
;; essentials for me
(delete-selection-mode t)
(column-number-mode t)
;; get rid of unneeded ui elements
(scroll-bar-mode nil)
(tool-bar-mode nil)
(menu-bar-mode nil)
;; get rid of the startup screen
(initial-scratch-message nil) (initial-scratch-message nil)
(inhibit-startup-screen t) (inhibit-startup-screen t)
(inhibit-splash-screen t)
(menu-bar-mode nil)
(tool-bar-mode nil)
(scroll-bar-mode nil)
(delete-selection-mode t)
(column-number-mode t)
(enable-recursive-buffer t)
(read-extended-command-predicate #'command-completion-default-include-p)
(tab-always-indent 'complete)
:hook (prog-mode . display-line-numbers-mode)) :hook (prog-mode . display-line-numbers-mode))
(use-package savehist (use-package savehist
:defer t :defer t
:commands (savehist-mode) :commands (savehist-mode)
:custom :custom
(savehist-mode t)) (savehist-mode t)))
(use-package ibuffer
:bind ("C-x C-b" . ibuffer))
(use-package which-key
:custom
(which-key-mode t))
(use-package icomplete
:custom
(fido-mode t)
(icomplete-vertical-mode t))
(use-package flycheck
:custom
(global-flycheck-mode t))
(init-ui-config)
(init-org-config)
(init-languages-config))
(init-config) (add-hook #'after-init-hook #'config-initialise)
(provide 'config) (provide 'config)
;;; config.el ends here ;;; config.el ends here

18
flake.lock generated
View file

@ -8,11 +8,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1746116666, "lastModified": 1743991507,
"narHash": "sha256-OVk7gw5B9BTpIK+zV1gMObiO6ERnM2iBv1qCd+mB8dk=", "narHash": "sha256-sRyA1LOsRSeF8W2drXEuGU2U+actcYEKdk1f+2kDKb8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "d496a053874af07a757eec3e26b4f3cb918aae9f", "rev": "ac8af15c5f586879c08cd257b69749f791d94e68",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,11 +23,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1745930157, "lastModified": 1743827369,
"narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=", "narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae", "rev": "42a1c966be226125b48c384171c44c651c236c22",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -39,11 +39,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1746055187, "lastModified": 1743813633,
"narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=", "narHash": "sha256-BgkBz4NpV6Kg8XF7cmHDHRVGZYnKbvG0Y4p+jElwxaM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5", "rev": "7819a0d29d1dd2bc331bec4b327f0776359b1fa6",
"type": "github" "type": "github"
}, },
"original": { "original": {

15
lib.nix
View file

@ -18,12 +18,19 @@ let
epkgs: epkgs:
builtins.attrValues { builtins.attrValues {
inherit (epkgs) inherit (epkgs)
base16-theme spacious-padding
doom-modeline doom-modeline
ivy
counsel
swiper
base16-theme
nix-ts-mode nix-ts-mode
flycheck haskell-mode
org-bullets qml-mode
org-modern tuareg
nushell-mode
nim-mode
envrc
; ;
treesit-grammars = epkgs.treesit-grammars.with-all-grammars; treesit-grammars = epkgs.treesit-grammars.with-all-grammars;
config = epkgs.trivialBuild { config = epkgs.trivialBuild {