diff options
author | Marek Paśnikowski <marekpasnikowski@protonmail.com> | 2022-09-26 10:34:25 +0200 |
---|---|---|
committer | Marek Paśnikowski <marekpasnikowski@protonmail.com> | 2022-09-26 11:21:25 +0200 |
commit | da6e9da5effb3a27687e81d910554510a8e45321 (patch) | |
tree | 412724c8518781c16b6bad43b63e8294bfdd412f /emacs.el | |
parent | 0e95c0622f3d330eceeac8f83d73b7f3fd8af08a (diff) |
Update Emacs configuration
* Use MELPA repository
* Disable Company Mode
* Enable cursor line highlight
* Enable delimiter highlighting
* Disable ParEdit Mode
* Enable Geiser and its autocompletion
* Enable Paredit
* Enable IEdit
* Install multiple cursors without enabling it
* Enable extraction of variables and functions
Diffstat (limited to 'emacs.el')
-rw-r--r-- | emacs.el | 64 |
1 files changed, 45 insertions, 19 deletions
@@ -1,3 +1,8 @@ +;;; Enable MELPA repository +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(package-initialize) + ;; https://github.com/fimblo/dot.emacs ;; Theme Activation @@ -8,32 +13,53 @@ (global-aggressive-indent-mode 1) -;; http://company-mode.github.io/ -;; Automatic Activation of Company Mode +;; https://jeko.frama.io/en/emacs.html +;; Jeko's suggested configuration + +;;; Highlight cursor line +(global-hl-line-mode +1) -(add-hook 'after-init-hook 'global-company-mode) +;;; Highlight the pair of delimiters under the cursor +(show-paren-mode 1) +(setq show-paren-delay 0) -;; https://www.emacswiki.org/emacs/ParEdit -;; Automatic Activation of ParEdit +;;; Add Geiser and its auto-completion +(ac-config-default) +(require 'ac-geiser) +(add-hook 'geiser-mode-hook 'ac-geiser-setup) +(add-hook 'geiser-repl-mode-hook 'ac-geiser-setup) +(eval-after-load "auto-complete" + '(add-to-list 'ac-modes 'geiser-repl-mode)) +;;; Edit the code based on the S-expression structure (require 'paredit) (autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t) -(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode) -(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode) -(add-hook 'ielm-mode-hook #'enable-paredit-mode) -(add-hook 'lisp-mode-hook #'enable-paredit-mode) -(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode) (add-hook 'scheme-mode-hook #'enable-paredit-mode) -;; https://github.com/xiaohanyu/ac-geiser -;; Geiser Configuration - -;; (require 'ac-geiser) -(setq geiser-mode-start-repl-p t) -;; (add-hook 'geiser-mode-hook 'ac-geiser-setup) -;; (add-hook 'geiser-repl-mode-hook 'ac-geiser-setup) -;; (eval-after-load "auto-complete" -;; '(add-to-list 'ac-modes 'geiser-repl-mode)) +;;; Edit several strings of characters in the same way simultaneously +(require 'iedit) + +;;; Edit several places in the file in the same way simultaneously +;; (require 'multiple-cursors) +;; (global-set-key (kbd "C-S-c C-S-c") +;; 'mc/edit-lines) +;; (global-set-key (kbd "C->") +;; 'mc/mark-next-like-this) +;; (global-set-key (kbd "C-<") +;; 'mc/mark-previous-like-this) +;; (global-set-key (kbd "C-c C-<") +;; 'mc/mark-all-like-this) + +;;; Extract variables and functions +(if (not (package-installed-p 'emr)) + (progn (package-refresh-contents) + (package-install 'emr))) +(require 'emr) +(autoload 'emr-show-refactor-menu "emr") +(define-key prog-mode-map (kbd "M-RET") 'emr-show-refactor-menu) +(eval-after-load "emr" '(emr-initialize)) +(global-set-key (kbd "M-v") 'emr-scm-extract-variable) +(global-set-key (kbd "M-f") 'emr-scm-extract-function) ;; https://github.com/nbfalcon/macrostep-geiser ;; Macrostep Configuration |