diff --git a/README.org b/README.org
index 9938624..bb94b9e 100644
--- a/README.org
+++ b/README.org
@@ -1,46 +1,35 @@
-#+title: Pankomacs
-#+options: toc:nil num:nil
+#+html:
+#+options: toc:nil
-#+html:
+** Pankomacs
-Pankomacs is an "opinionated opinionated emacs configuration" which uses 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.
+****** opinionated opinionated emacs configuration (ft. flakes)
-* How do I use this configuration?
+-----
-Add pankomacs and nixpkgs (assuming you don't have it) into your flake inputs
-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
+#+html:
-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
-between Emacs and [[https://www.instagram.com/fatfatpankocat/][fatfatpankocat]].
+This config is bound to change for any reason if I feel like it that day.
+
+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:
diff --git a/config/config-dev.el b/config/config-dev.el
new file mode 100644
index 0000000..b981192
--- /dev/null
+++ b/config/config-dev.el
@@ -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)
diff --git a/config/config-ivy.el b/config/config-ivy.el
new file mode 100644
index 0000000..26c6bab
--- /dev/null
+++ b/config/config-ivy.el
@@ -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)
+ ("" . ivy-resume)
+ ("M-x" . counsel-M-x)
+ ("C-x C-f" . counsel-find-file)
+ (" f" . counsel-describe-function)
+ (" v" . counsel-describe-variable)
+ (" o" . counsel-describe-symbol)
+ (" l" . counsel-find-library)
+ (" i" . counsel-info-lookup-symbol)
+ (" 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)
diff --git a/config/config-languages.el b/config/config-languages.el
index 86235d3..ec0ed30 100644
--- a/config/config-languages.el
+++ b/config/config-languages.el
@@ -1,16 +1,61 @@
-;;; config-languages --- Language configuration -*- lexical-binding: t -*-
+;; -*- lexical-binding: t -*-
-;;; Commentary:
-
-;; 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."
+(defun config-init-languages ()
(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)
-;;; config-languages.el ends here
diff --git a/config/config-org.el b/config/config-org.el
deleted file mode 100644
index 22fdb7c..0000000
--- a/config/config-org.el
+++ /dev/null
@@ -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
diff --git a/config/config-ui.el b/config/config-ui.el
index a7d1b32..57a05cb 100644
--- a/config/config-ui.el
+++ b/config/config-ui.el
@@ -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
-;; decent place to do that.
+(defun config-init-ui ()
+ (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
:config
- (load-theme 'base16-rose-pine t))
- (use-package doom-modeline
- :custom
- (doom-modeline-mode t)))
+ (load-theme 'base16-rose-pine t)))
(provide 'config-ui)
-;;; config-ui.el ends here
diff --git a/config/config.el b/config/config.el
index e722c18..910afc0 100644
--- a/config/config.el
+++ b/config/config.el
@@ -1,62 +1,64 @@
;;; config.el --- my emacs configuration -*- lexical-binding: t -*-
+;; Author: Artur Manuel
+;; URL: https://copeberg.org/amadaluzia/pankomacs
+;; Version: 0.0.0
+
;;; Commentary:
-;; Not much to gather here.
+;; All this does is provide a configuration for Emacs to use.
;;; Code:
(require 'config-ui)
-(require 'config-org)
+(require 'config-dev)
+(require 'config-ivy)
(require 'config-languages)
+(require 'use-package)
-(defun init-config ()
- "The actual configuration to initialise at startup."
+(defun config-initialise ()
+ (config-init-dev)
+ (config-init-ui)
+ (config-init-languages)
+ (config-init-ivy)
(use-package emacs
:init
(setq frame-resize-pixelwise t
window-resize-pixelwise 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
- ;; 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)
(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))
+
(use-package savehist
:defer t
:commands (savehist-mode)
:custom
- (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))
+ (savehist-mode t)))
-(init-config)
+(add-hook #'after-init-hook #'config-initialise)
(provide 'config)
+
;;; config.el ends here
diff --git a/flake.lock b/flake.lock
index 4122efa..4c4e4c0 100644
--- a/flake.lock
+++ b/flake.lock
@@ -8,11 +8,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
- "lastModified": 1746116666,
- "narHash": "sha256-OVk7gw5B9BTpIK+zV1gMObiO6ERnM2iBv1qCd+mB8dk=",
+ "lastModified": 1743991507,
+ "narHash": "sha256-sRyA1LOsRSeF8W2drXEuGU2U+actcYEKdk1f+2kDKb8=",
"owner": "nix-community",
"repo": "emacs-overlay",
- "rev": "d496a053874af07a757eec3e26b4f3cb918aae9f",
+ "rev": "ac8af15c5f586879c08cd257b69749f791d94e68",
"type": "github"
},
"original": {
@@ -23,11 +23,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1745930157,
- "narHash": "sha256-y3h3NLnzRSiUkYpnfvnS669zWZLoqqI6NprtLQ+5dck=",
+ "lastModified": 1743827369,
+ "narHash": "sha256-rpqepOZ8Eo1zg+KJeWoq1HAOgoMCDloqv5r2EAa9TSA=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "46e634be05ce9dc6d4db8e664515ba10b78151ae",
+ "rev": "42a1c966be226125b48c384171c44c651c236c22",
"type": "github"
},
"original": {
@@ -39,11 +39,11 @@
},
"nixpkgs-stable": {
"locked": {
- "lastModified": 1746055187,
- "narHash": "sha256-3dqArYSMP9hM7Qpy5YWhnSjiqniSaT2uc5h2Po7tmg0=",
+ "lastModified": 1743813633,
+ "narHash": "sha256-BgkBz4NpV6Kg8XF7cmHDHRVGZYnKbvG0Y4p+jElwxaM=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "3e362ce63e16b9572d8c2297c04f7c19ab6725a5",
+ "rev": "7819a0d29d1dd2bc331bec4b327f0776359b1fa6",
"type": "github"
},
"original": {
diff --git a/lib.nix b/lib.nix
index 7fd21ba..a11bf7a 100644
--- a/lib.nix
+++ b/lib.nix
@@ -18,12 +18,19 @@ let
epkgs:
builtins.attrValues {
inherit (epkgs)
- base16-theme
+ spacious-padding
doom-modeline
+ ivy
+ counsel
+ swiper
+ base16-theme
nix-ts-mode
- flycheck
- org-bullets
- org-modern
+ haskell-mode
+ qml-mode
+ tuareg
+ nushell-mode
+ nim-mode
+ envrc
;
treesit-grammars = epkgs.treesit-grammars.with-all-grammars;
config = epkgs.trivialBuild {