From 4f37be52b2691d8da5b81fc513f0f81725f3a411 Mon Sep 17 00:00:00 2001 From: Rawley Fowler <75388349+rawleyfowler@users.noreply.github.com> Date: Sun, 24 Jul 2022 12:54:37 -0600 Subject: [PATCH] Delete emacs.d directory --- emacs.d/bind.el | 18 --------- emacs.d/extra.el | 59 ----------------------------- emacs.d/init.el | 96 ------------------------------------------------ emacs.d/lsp.el | 28 -------------- emacs.d/modes.el | 74 ------------------------------------- 5 files changed, 275 deletions(-) delete mode 100644 emacs.d/bind.el delete mode 100644 emacs.d/extra.el delete mode 100644 emacs.d/init.el delete mode 100644 emacs.d/lsp.el delete mode 100644 emacs.d/modes.el diff --git a/emacs.d/bind.el b/emacs.d/bind.el deleted file mode 100644 index 60a2cfc..0000000 --- a/emacs.d/bind.el +++ /dev/null @@ -1,18 +0,0 @@ -;;; bind.el --- My bindings. -;;; Commentary: -;;; Various Emacs bindings. -;;; Code: -(defun split-and-follow-vert () - (interactive) - (split-window-below) - (balance-windows) - (other-window 1)) -(global-set-key (kbd "C-x 2") 'split-and-follow-vert) - -(defun split-and-follow-hor () - (interactive) - (split-window-right) - (balance-windows) - (other-window 1)) -(global-set-key (kbd "C-x 3") 'split-and-follow-hor) -;;; bind.el ends here diff --git a/emacs.d/extra.el b/emacs.d/extra.el deleted file mode 100644 index 816b32a..0000000 --- a/emacs.d/extra.el +++ /dev/null @@ -1,59 +0,0 @@ -;;; package --- extra configs -;;; Commentary: -;;; This file contains all of the extra configurations that don't necessarily -;;; fit the other files. -;;; NOTE: This file needs to be executed last. -;;; Code: -;; Linting/Formatting -(require 'flycheck) - -(use-package tide - :ensure t) -(add-hook 'before-save-hook 'tide-format-before-save) - -(require 'company) -(setq company-tooltip-align-annotations t) - -(use-package paren - :ensure nil - :init - (setq show-paren-delay 0) - :config - (show-paren-mode +1)) -(use-package smartparens - :config - (smartparens-global-mode 1)) -(require 'smartparens) -(use-package evil-smartparens - :hook - ('smartparens-enabled-hook #'evil-smartparens-mode)) - -;; Others -(use-package which-key - :config - (which-key-mode)) - -(use-package helm - :config - (helm-mode)) - -(use-package ivy - :init - (setq ivy-use-virtual-buffers t) - (setq ivy-count-format "(%d/%d) ") - :config - (ivy-mode 1)) - -(use-package counsel) - -(use-package swiper) - -(use-package which-key) - -(use-package affe - :config - (consult-customize affe-grep - :preview-key (kbd "M-."))) - -(provide 'extra) -;;; extra.el ends here diff --git a/emacs.d/init.el b/emacs.d/init.el deleted file mode 100644 index 4210225..0000000 --- a/emacs.d/init.el +++ /dev/null @@ -1,96 +0,0 @@ -;;; package --- Rawley Fowler's init.el -;;; Commentary: -;;; I used Vim for quite a few years, but evil mode Emacs -;;; is so much nicer. -;;; Code: -(menu-bar-mode -1) -(scroll-bar-mode -1) -(tool-bar-mode -1) - -(set-language-environment "UTF-8") -(set-terminal-coding-system 'utf-8) -(set-keyboard-coding-system 'utf-8) -(set-selection-coding-system 'utf-8) -(prefer-coding-system 'utf-8) -(transient-mark-mode) -(show-paren-mode 1) - -(when (eq system-type 'gnu/linux) - (set-face-attribute 'default nil :font "Terminus")) - -(defalias 'yes-or-no-p 'y-or-n-p) - -(require 'package) -(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")) -(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) -(package-initialize) - -(unless (package-installed-p 'use-package) - (package-refresh-contents) - (package-install 'use-package)) - -(eval-and-compile - (setq use-package-always-ensure t - use-package-expand-minimally t)) - -(require 'use-package) - -;; Misc Packages -(use-package restart-emacs) - -;; Theme -(use-package modus-themes - :init - (setq modus-themes-italic-constructs t - modus-themes-bold-constructs nil - modus-themes-region '(bg-only no-extend)) - (modus-themes-load-themes) - :config - (modus-themes-load-operandi) - :bind - ("" . modus-themes-toggle)) - -;; Evil. -(use-package evil - :ensure t - :init - (setq evil-want-integration t) - (setq evil-want-keybinding nil) - (setq evil-vsplit-window-right t) - (setq evil-split-window-below t) - (evil-mode)) - -(defun save-and-kill-this-buffer () - (interactive) - (save-buffer) - (kill-current-buffer)) - -(use-package evil-collection - :after evil - :ensure t - :config - (evil-collection-init)) - -(use-package evil-org) - -;; Other configs -(load-file "~/.emacs.d/lsp.el") -(load-file "~/.emacs.d/modes.el") -(load-file "~/.emacs.d/extra.el") -(load-file "~/.emacs.d/bind.el") - -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(helm-minibuffer-history-key "M-p") - '(package-selected-packages '(evil-org evil-collection evil use-package))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) - -;;; init.el ends here diff --git a/emacs.d/lsp.el b/emacs.d/lsp.el deleted file mode 100644 index 59e2ff2..0000000 --- a/emacs.d/lsp.el +++ /dev/null @@ -1,28 +0,0 @@ -;;; lsp.el --- LSP and autocomplete -;;; Commentary: -;;; LSP and autocomplete configurations -;;; Code: -(use-package eglot) - -(use-package yasnippet - :config - (yas-global-mode)) -(use-package yasnippet-snippets) - -(use-package flycheck - :ensure t - :init - (global-flycheck-mode)) - -(when (eq system-type 'darwin) - (use-package exec-path-from-shell ; Needed for MacOS with flycheck - :init - (exec-path-from-shell-initialize))) - -(use-package company - :init - (global-company-mode)) - -(use-package helm-lsp) - -;;; lsp.el ends here diff --git a/emacs.d/modes.el b/emacs.d/modes.el deleted file mode 100644 index 27654e0..0000000 --- a/emacs.d/modes.el +++ /dev/null @@ -1,74 +0,0 @@ -;;; modes.el --- Various modes -;;; Commentary: -;;; This file contains various Emacs modes that I use. -;;; Code: -(require 'lsp-mode) -(require 'flycheck) -;; Language modes + configurations -(require 'eglot) -(use-package typescript-mode - :mode - ("\\.tsx?\\'" . typescript-mode) - :config - (setq typescript-indent-level 2)) - -(use-package clojure-mode - :mode - ("\\.cljs?\\'" . clojure-mode) - :hook - (clojure-mode . lsp-deferred)) - -(use-package go-mode - :mode - ("\\.go\\'" . go-mode) - :hook - (go-mode . lsp-deferred)) - -(use-package markdown-mode - :mode - ("\\.md\\'" . markdown-mode) - :hook - (markdown-mode . auto-fill-mode)) - -;; Java/Meghanada -(use-package meghanada) -(add-hook 'java-mode-hook - (lambda () - (meghanada-mode t) - (setq c-basic-offset 2) - (add-hook 'before-save-hook 'meghanada-code-beautify-before-save))) -(setq meghanada-java-path "java") -(setq meghanada-maven-path "mvn") - -;; No config modes -(use-package json-mode) -(use-package yaml-mode) -(use-package d-mode) - -;; eglot mode hooks -(add-to-list 'eglot-server-programs - `(c-mode . ("clangd" "--include" "/usr/include/"))) -(add-to-list 'eglot-server-programs - `(c++-mode . ("clangd" "--include" "/usr/include/"))) -(add-hook 'c-mode-hook 'eglot-ensure) -(add-hook 'c++-mode-hook 'eglot-ensure) -(add-hook 'd-mode-hook 'eglot-ensure) -(add-hook 'typescript-mode 'eglot-ensure) -(add-hook 'go-mode 'eglot-ensure) -(add-hook 'clojure-mode 'eglot-ensure) - - -;; Built-in mode configs -;; Ruby -(add-to-list 'auto-mode-alist - '("\\.\\(?:cap\\|gemspec\\|irbrc\\|gemrc\\|rake\\|rb\\|ru\\|thor\\)\\'" . ruby-mode)) -(add-to-list 'auto-mode-alist - '("\\(?:Brewfile\\|Capfile\\|Gemfile\\|[rR]akefile\\)\\'" . ruby-mode)) -;; C/C++ -(add-hook 'c++-mode-hook - (lambda () (setq flycheck-clang-include-path - (list (expand-file-name "/usr/include/"))))) -(add-hook 'c-mode-hook - (lambda () (setq flycheck-clang-include-path - (list (expand-file-name "/usr/include/"))))) -;;; modes.el ends here