Add git ignore and organize init.el somewhat

This commit is contained in:
James Dixon 2025-03-15 14:53:19 -04:00
parent c5fd66ed05
commit 4b1238fa4f
2 changed files with 59 additions and 35 deletions

8
config/emacs/.config/emacs/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
*cache*
*eshell*
*elpa*
*log*
.lsp*
saves
auto-save-list
*transient*

View File

@ -1,44 +1,52 @@
;;; -*- lexical-binding: t -*- ;;; init.el --- James' Emacs config -*- lexical-binding: t -*-
;;; package --- jams experimental emacs config ;;;
;;; commentary --- not much ;;; Author: James Dixon <notjamesdixon@gmail.com>
;;; Maintainer: James Dixon <notjamesdixon@gmail.com>
;;;
;;; Commentary:
;;; Emacs from scratch (somewhat), this is my ~~story~~ config
;;; ((((((((((((((((((((!!!GNU EMACS!!!))))))))))))))))))))
;;;
;;; Code: ;;; Code:
(setq inhibit-startup-message t) ; Don't show the splash screen (setq inhibit-startup-message t) ; Don't show the splash screen
(setq inhibit-splash-screen t) ; Do not show splash screen (setq inhibit-splash-screen t) ; Do not show splash screen
(setq visible-bell t) ; Flash when the bell rings (setq visible-bell t) ; Flash when the bell rings
(setq frame-resize-pixelwise t) ; Yes, I would like to be able to **resize** emacs, thanks! (setq frame-resize-pixelwise t) ; Yes, I would like to be able to **resize** emacs, thanks!
(global-display-line-numbers-mode 1) ; Display line numbers
(column-number-mode -1) ; Toggle column number display in the mode line.
(tool-bar-mode -1) ; Disable tool bar
(scroll-bar-mode -1) ; Disable scroll bar
(transient-mark-mode 1) ; Easier starting of marks/regions
(delete-selection-mode 1) ; Easier deleting of marks/regions
(set-frame-font "Maple Mono 12" nil t)
(load-theme 'modus-vivendi t)
;; More memory for Garbage Collection
(setq gc-cons-threshold-original gc-cons-threshold) (setq gc-cons-threshold-original gc-cons-threshold)
(setq gc-cons-threshold (* 1024 1024 100)) (setq gc-cons-threshold (* 1024 1024 100))
(set-frame-font "Recursive 12" nil t)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(column-number-mode)
(global-display-line-numbers-mode 1)
(load-theme 'modus-vivendi t)
;; Auto-refresh buffers when files on disk change. ;; Auto-refresh buffers when files on disk change.
(global-auto-revert-mode t) (global-auto-revert-mode t)
(delete-selection-mode 1)
;; Place backups in a separate folder. ;; Place backups in a separate folder.
(setq backup-directory-alist `(("." . "~/.emacs.d/saves"))) (setq backup-directory-alist `(("." . "~/.config/emacs/saves")))
(setq auto-save-file-name-transforms `((".*" "~/.emacs.d/saves/" t))) (setq auto-save-file-name-transforms `((".*" "~/.config/emacs/saves/" t)))
(set-register ?e (find-file (or user-init-file "")))
;; package init w/ melpa
(require 'package) (require 'package)
(add-to-list 'package-archives (add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/")) '("melpa" . "https://melpa.org/packages/"))
(package-initialize) (package-initialize)
;; use-package install and init
(unless (package-installed-p 'use-package) (unless (package-installed-p 'use-package)
(package-install 'use-package)) (package-install 'use-package))
;; start evil
(unless (package-installed-p 'evil) (unless (package-installed-p 'evil)
(package-install 'evil)) (package-install 'evil))
(setq evil-want-C-u-scroll t) (setq evil-want-C-u-scroll t)
(setq evil-want-keybinding nil) (setq evil-want-keybinding nil)
(require 'evil) (require 'evil)
@ -50,9 +58,13 @@
:init :init
(evil-collection-init)) (evil-collection-init))
(transient-mark-mode 1) (use-package evil-surround
:ensure t
:config
(global-evil-surround-mode 1))
;; end evil
(set-register ?e (find-file (or user-init-file ""))) ;; writing
(global-set-key (kbd "C-c a") #'org-agenda) (global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c c") #'org-capture) (global-set-key (kbd "C-c c") #'org-capture)
@ -62,6 +74,7 @@
:init (setq markdown-command "multimarkdown") :init (setq markdown-command "multimarkdown")
:bind (:map markdown-mode-map :bind (:map markdown-mode-map
("C-c C-e" . markdown-do))) ("C-c C-e" . markdown-do)))
;; end writing
(use-package dired (use-package dired
:ensure nil :ensure nil
@ -71,10 +84,7 @@
(use-package magit (use-package magit
:ensure t) :ensure t)
(use-package multiple-cursors ;; show more vertcal suggestions on M-x
:ensure t)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(use-package vertico (use-package vertico
:ensure t :ensure t
:init :init
@ -90,6 +100,10 @@
:ensure t :ensure t
:init) :init)
(use-package multiple-cursors
:ensure t)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(use-package which-key (use-package which-key
:ensure t :ensure t
:defer t :defer t
@ -100,23 +114,25 @@
:init (global-flycheck-mode)) :init (global-flycheck-mode))
(use-package company (use-package company
;; Download company if not found
:ensure t :ensure t
:init :init
;; Turn on company after emacs starts up
(global-company-mode)) (global-company-mode))
(use-package lsp-mode (use-package lsp-mode
:ensure t :ensure t
:hook (( ;; and any other mode you want to hook into lsp :hook ((prog-mode) . lsp-deferred))
prog-mode) . lsp-deferred))
;; fun
(use-package rainbow-delimiters (use-package rainbow-delimiters
:ensure t :ensure t
:hook (prog-mode . rainbow-delimiters-mode)) :defer t
:hook ((prog-mode) . rainbow-delimiters-mode))
(setq mode-line-format(list '(:eval (list (nyan-create))))) (setq mode-line-format(list '(:eval (list (nyan-create)))))
(use-package nyan-mode
:ensure t)
(nyan-mode) (use-package fireplace
:ensure t)
;;; init.el ends here ;;; init.el ends here