chore(docs): add elisp documentation for each file

Apparently this is customary for Emacs configuration files. Doom seems
to do this too, so here it is.
This commit is contained in:
Muhammad Nauman Raza 2022-11-16 21:10:34 +00:00
parent 6c5e013e29
commit f95e050832
No known key found for this signature in database
GPG key ID: A9A36C429C9CAE31
7 changed files with 74 additions and 6 deletions

11
init.el
View file

@ -1,3 +1,12 @@
;;; init.el --- Dianciemacs -*- lexical-binding: t; -*-
;;; Commentary:
;;
;; This is a minimal and elegant Emacs configuration framework.
;; This project aims to keep/make Emacs fast, aesthetic, and beginner-friendly.
;; Maintained by devraza <thedevraza@proton.me>
;;
;;; Code:
;; Disable Emacs' GTK decorations. Done in this file otherwise done too late. ;; Disable Emacs' GTK decorations. Done in this file otherwise done too late.
(menu-bar-mode -1) (menu-bar-mode -1)
(tool-bar-mode -1) (tool-bar-mode -1)
@ -46,3 +55,5 @@
(add-to-list 'load-path (concat user-emacs-directory (add-to-list 'load-path (concat user-emacs-directory
(convert-standard-filename "user/"))) (convert-standard-filename "user/")))
(load "init") (load "init")
;;; init.el ends here

View file

@ -1,4 +1,11 @@
;; This file customizes Emacs' editor ;;; lisp/editor.el --- Default configration for Dianciemacs' editor -*- lexical-binding: t; -*-
;;; Commentary:
;;
;; Emacs' default editing experience sucks a lot. There's too much most people
;; will never need and I personally believe modal keybinds to be superior.
;; So, there's a lot changes Dianciemacs will be making to the editor, all of which can be seen in this file.
;;
;;; Code:
;; Quit input dialogues after pressing escape once ;; Quit input dialogues after pressing escape once
(global-set-key (kbd "<escape>") 'keyboard-escape-quit) (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
@ -53,7 +60,8 @@
;; rainbow-mode - Colourful colour codes! ;; rainbow-mode - Colourful colour codes!
(use-package rainbow-mode (use-package rainbow-mode
:hook (prog-mode . rainbow-mode)) :hook
(prog-mode . rainbow-mode))
;; Keybinds ;; Keybinds
;; Enable which-key ;; Enable which-key
@ -76,3 +84,5 @@
"m" '(:wk "Magit") "m" '(:wk "Magit")
"w" '(:wk "Evil") "w" '(:wk "Evil")
"p" '(:wk "Projects")) "p" '(:wk "Projects"))
;;; editor.el ends here

View file

@ -1,4 +1,12 @@
;; This file contains configuration for Emacs interface elements. ;;; lisp/interface.el --- Changes to Emacs' interface -*- lexical-binding: t; -*-
;;; Commentary:
;;
;; Emacs has a little too much going on in it's interface by default - things
;; like GTK dialog boxes for quitting, a scroll bar, a menu bar, etc. are all
;; unnecessary for most users - so disabling that is done right in this file.
;; Additionally, the default theme isn't very aesthetic, so that obviously needs to change too.
;;
;;; Code:
;; Stop Emacs from resizing the window at startup ;; Stop Emacs from resizing the window at startup
(setq frame-resize-pixelwise t) (setq frame-resize-pixelwise t)
@ -57,3 +65,5 @@
(use-package diredfl ; Colourise dired! (use-package diredfl ; Colourise dired!
:hook dired-mode) :hook dired-mode)
;;; interface.el ends here

View file

@ -1,4 +1,12 @@
;; This file contains keybindings for Dianciemacs ;;; lisp/keybinds.el --- Some default keybinds for Dianciemacs' -*- lexical-binding: t; -*-
;;; Commentary:
;;
;; There's not much to say about this section. Keybinds are a very important
;; part of an editor's editing experience, and in Dianciemacs keys are bound to
;; leader-key (SPC by default). Changing the leader-key can be easily done by
;; changing the `leader-key' constant in the `init.el' at the project root.
;;
;;; Code:
;; Files ;; Files
(general-create-definer diancite/file (general-create-definer diancite/file
@ -33,3 +41,5 @@
"l w" '(:wk "Server") "l w" '(:wk "Server")
"l w r" '(eglot-reconnect :wk "Restart Server") "l w r" '(eglot-reconnect :wk "Restart Server")
"l w q" '(eglot-shutdown :wk "Shutdown Server")) "l w q" '(eglot-shutdown :wk "Shutdown Server"))
;;; keybinds.el ends here

View file

@ -1,3 +1,11 @@
;;; lisp/languages.el --- Support for programming languages -*- lexical-binding: t; -*-
;;; Commentary:
;;
;; Trivial changes done by almost everyone - no editor supports every language by default.
;; You will probably be adding on to the stuff in this file - in the `user/' directory, of course.
;;
;;; Code:
;; This file contains configuration for languages ;; This file contains configuration for languages
;; Markdown ;; Markdown
@ -40,3 +48,5 @@
;; Autobrackets ;; Autobrackets
(add-hook 'prog-mode-hook 'electric-pair-mode) (add-hook 'prog-mode-hook 'electric-pair-mode)
;;; languages.el ends here

View file

@ -1,4 +1,11 @@
;; This file contains configuration for Emacs' org-mode ;;; lisp/org-mode.el --- org-mode improvements for Emacs -*- lexical-binding: t; -*-
;;; Commentary:
;;
;; A lot of people out there will agree wholeheartedly that org mode is great.
;; Tons of fine-grained control, simplicity, and extensibilty - all built-in by
;; default into a single tool that works beautifully with Emacs.
;;
;;; Code:
;; org-mode ;; org-superstar ;; org-mode ;; org-superstar
(use-package org-superstar (use-package org-superstar
@ -77,3 +84,5 @@
"n t" '(org-table-align :wk "Align Table")) "n t" '(org-table-align :wk "Align Table"))
(setq org-agenda-files (quote ("~/Org"))) (setq org-agenda-files (quote ("~/Org")))
;;; org-mode.el ends here

View file

@ -1,4 +1,10 @@
;; This file improves the performance of Emacs, startup or otherwise ;;; lisp/performance.el --- Performance improvements for Emacs -*- lexical-binding: t; -*-
;;; Commentary:
;;
;; Emacs is widely known to be one of the slower editors - despite the
;; great 'native compilation' or the daemon-client relationship. So that needs to change too.
;;
;;; Code:
;; Reduce garbage collection at startup ;; Reduce garbage collection at startup
(setq gc-cons-threshold most-positive-fixnum) (setq gc-cons-threshold most-positive-fixnum)
@ -7,3 +13,5 @@
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook
(lambda () (lambda ()
(setq gc-cons-threshold (expt 2 23)))) (setq gc-cons-threshold (expt 2 23))))
;;; performance.el ends here