Switch back to stock emacs
This commit is contained in:
commit
567dd71015
|
|
@ -0,0 +1,10 @@
|
|||
;;;; Emacs Bookmark Format Version 1 ;;;; -*- coding: utf-8-emacs -*-
|
||||
;;; This format is meant to be slightly human-readable;
|
||||
;;; nevertheless, you probably don't want to edit it.
|
||||
;;; -*- End Of Bookmark File Format Version Stamp -*-
|
||||
(("Schoolwork"
|
||||
(filename . "~/Documents/Schoolwork/")
|
||||
(front-context-string . "English\n drwxr-")
|
||||
(rear-context-string . "96 Apr 11 05:07 ")
|
||||
(position . 246))
|
||||
)
|
||||
|
|
@ -0,0 +1,589 @@
|
|||
* Bloxie's Emacs Configuration
|
||||
** By Curt Spark / Bloxiebird.
|
||||
|
||||
* Introduction
|
||||
Welcome to my Emacs configuration!
|
||||
|
||||
[[./dashboard.png]]
|
||||
|
||||
This configuration is inspired by :
|
||||
|
||||
`https://github.com/munen/emacs.d`
|
||||
|
||||
And also loosely inspired by :
|
||||
|
||||
`https://github.com/daedreth/UncleDavesEmacs/blob/master/config.org`
|
||||
|
||||
With help from his fantastic Emacs tutorial series :
|
||||
|
||||
`https://www.youtube.com/playlist?list=PLX2044Ew-UVVv31a0-Qn3dA6Sd_-NyA1n`
|
||||
|
||||
This configuration is much more barebones and suited for someone just
|
||||
doing some writing or editing, which is exactly my use case. It does
|
||||
however copy over the useful functionalities (In my personal
|
||||
preference) As this is a simple literate configuration, not a large
|
||||
actively maintained distribution like Spacemacs or Doom Emacs, feel
|
||||
free to do whatever you want with the configuration. I've tried to
|
||||
document what every package does, what the code does briefly for
|
||||
beginners to Emacs or literate configurations.
|
||||
|
||||
* Config
|
||||
** Appearance
|
||||
*** Remove Tool Bar
|
||||
Remove the Tool bar at the top for more room.
|
||||
Set mode to false:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(tool-bar-mode -1)
|
||||
#+END_SRC
|
||||
*** Remove Menu Bar
|
||||
Remove the Menu Bar at the top for more room.
|
||||
Set mode to false:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(menu-bar-mode -1)
|
||||
#+END_SRC
|
||||
*** Remove Scroll Bar
|
||||
Remove the Scroll Bar at the side for more room.
|
||||
Set mode to false:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(scroll-bar-mode -1)
|
||||
#+END_SRC
|
||||
*** Display Line Numbers
|
||||
Display line numbers for all Programming Modes.
|
||||
Add hook to enable display-line-numbers-mode on all programming major modes:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
||||
#+END_SRC
|
||||
*** Modern Fringes
|
||||
Modern Fringes is a package that makes the side fringes of Emacs much more cleaner and modern.
|
||||
Install the package, enable it and ensure that it always is installed:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package modern-fringes
|
||||
:ensure t
|
||||
:init
|
||||
(modern-fringes-invert-arrows))
|
||||
#+END_SRC
|
||||
*** Theming
|
||||
The theme for Emacs.
|
||||
Install and set the theme, ensuring that it is always installed:
|
||||
Old theme for if you'd like to follow Xresources
|
||||
+BEGIN_SRC emacs-lisp
|
||||
(use-package xresources-theme
|
||||
:ensure t
|
||||
:init
|
||||
(load-theme 'xresources t))
|
||||
+END_SRC
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package doom-themes
|
||||
:ensure t
|
||||
:config
|
||||
;; Global settings (defaults)
|
||||
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
||||
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
||||
|
||||
(load-theme 'doom-gruvbox t)
|
||||
|
||||
;; Enable flashing mode-line on errors
|
||||
(doom-themes-visual-bell-config)
|
||||
|
||||
;; Enable custom neotree theme (all-the-icons must be installed!)
|
||||
(doom-themes-neotree-config)
|
||||
;; or for treemacs users
|
||||
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
|
||||
(doom-themes-treemacs-config)
|
||||
|
||||
;; Corrects (and improves) org-mode's native fontification.
|
||||
(doom-themes-org-config))
|
||||
#+END_SRC
|
||||
*** All The Icons
|
||||
All The Icons is a package to display cool icons within Emacs.
|
||||
Install the package, enable it and ensure that it always is installed:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package all-the-icons
|
||||
:ensure t)
|
||||
#+END_SRC
|
||||
|
||||
All The Icons Support for Ivy/Counsel. Which are autocompletion tools in emacs
|
||||
Install the package, enable it and ensure that it always is installed:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package all-the-icons-ivy
|
||||
:ensure t
|
||||
:init
|
||||
(all-the-icons-ivy-setup))
|
||||
#+END_SRC
|
||||
*** Emacs Dashboard
|
||||
A startup dashboard for Emacs, replacing the boring old one.
|
||||
Install the package, enable it and ensure that it always is installed:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package dashboard
|
||||
:ensure t
|
||||
:config
|
||||
(dashboard-setup-startup-hook))
|
||||
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
||||
#+END_SRC
|
||||
|
||||
**** Emacs Dashboard Configuration
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; Set the title
|
||||
(setq dashboard-banner-logo-title "Welcome to Bloxie's Emacs!")
|
||||
;; Set the banner
|
||||
(setq dashboard-startup-banner 'logo)
|
||||
;; Value can be
|
||||
;; 'official which displays the official emacs logo
|
||||
;; 'logo which displays an alternative emacs logo
|
||||
;; 1, 2 or 3 which displays one of the text banners
|
||||
;; "path/to/your/image.png" which displays whatever image you would prefer
|
||||
|
||||
;; Content is not centered by default. To center, set
|
||||
(setq dashboard-center-content t)
|
||||
|
||||
;; To disable shortcut "jump" indicators for each section, set
|
||||
(setq dashboard-show-shortcuts nil)
|
||||
|
||||
;;To customize which widgets are displayed, you can use the following snippet
|
||||
|
||||
(setq dashboard-items '((recents . 5)
|
||||
(bookmarks . 5)
|
||||
(projects . 5)
|
||||
(agenda . 5)
|
||||
(registers . 5)))
|
||||
|
||||
;; To show agenda for the upcoming seven days set the variable show-week-agenda-p to t.
|
||||
|
||||
;; (setq show-week-agenda-p t)
|
||||
|
||||
;; Note that setting list-size for the agenda list is intentionally ignored; all agenda items for the current day will be displayed.
|
||||
|
||||
|
||||
;; To customize which categories from the agenda items should be visible in the dashboard set the dashboard-org-agenda-categories to the list of categories you need.
|
||||
|
||||
;; (setq dashboard-org-agenda-categories '("Tasks" "Appointments"))
|
||||
|
||||
;; To add icons to the widget headings and their items:
|
||||
(setq dashboard-set-heading-icons t)
|
||||
(setq dashboard-set-file-icons t)
|
||||
|
||||
;; To show navigator below the banner:
|
||||
(setq dashboard-set-navigator t)
|
||||
|
||||
;; To customize the buttons of the navigator like this:
|
||||
;; Format: "(icon title help action face prefix suffix)"
|
||||
(setq dashboard-navigator-buttons
|
||||
`(;; line1
|
||||
((,(all-the-icons-octicon "mark-github" :height 1.1 :v-adjust 0.0)
|
||||
"Homepage"
|
||||
"Browse homepage"
|
||||
(lambda (&rest _) (browse-url "https://gitlab.com/bloxiebird/linux-emacs-configuration")))
|
||||
("★" "Star" "Show stars" (lambda (&rest _) (show-stars)) warning)
|
||||
("?" "" "?/h" #'show-help nil "<" ">"))
|
||||
))
|
||||
#+END_SRC
|
||||
** Custom
|
||||
*** Auto Popup frame Mode
|
||||
A mode that is similiar in functionality to pop-up-frame, however much more granular in control and toggleable as it is mode. Will stop duplicate windows from creating new frames etc.
|
||||
|
||||
Using simpler solution instead:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq pop-up-frames t)
|
||||
#+END_SRC
|
||||
|
||||
+BEGIN_SRC emacs-lisp
|
||||
(defun which-active-modes ()
|
||||
"Which minor modes are enabled in the current buffer."
|
||||
(let ((active-modes))
|
||||
(mapc (lambda (mode) (condition-case nil
|
||||
(if (and (symbolp mode) (symbol-value mode))
|
||||
(add-to-list 'active-modes mode))
|
||||
(error nil) ))
|
||||
minor-mode-list)
|
||||
active-modes))
|
||||
|
||||
(defun pop-up-frames-switch-to-buffer (buffer alist)
|
||||
"Auto Pop up frames switch to buffer command."
|
||||
(member 'pop-up-frames-mode (which-active-modes)))
|
||||
|
||||
(setq display-buffer-alist
|
||||
(append display-buffer-alist
|
||||
'((pop-up-frames-switch-to-buffer . ((display-buffer-reuse-window display-buffer-pop-up-frame) . ((reusable-frames . 0)))
|
||||
))))
|
||||
|
||||
(define-minor-mode pop-up-frames-mode
|
||||
"Pop up frames minor mode"
|
||||
:lighter " PUF")
|
||||
|
||||
(provide 'pop-up-frames-mode)
|
||||
+END_SRC
|
||||
*** Resizing Buffers
|
||||
These are controls to resize the width and height of windows.
|
||||
Set keys:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(global-set-key (kbd "<C-up>") 'shrink-window)
|
||||
(global-set-key (kbd "<C-down>") 'enlarge-window)
|
||||
(global-set-key (kbd "<C-left>") 'shrink-window-horizontally)
|
||||
(global-set-key (kbd "<C-right>") 'enlarge-window-horizontally)
|
||||
#+END_SRC
|
||||
*** Split and Follow Buffer
|
||||
When splitting a window vertically or horizontally, make sure the mouse and focus follows that new window.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun split-and-follow-horizontally ()
|
||||
(interactive)
|
||||
(split-window-below)
|
||||
(balance-windows)
|
||||
(other-window 1))
|
||||
(global-set-key (kbd "C-x 2") 'split-and-follow-horizontally)
|
||||
|
||||
(defun split-and-follow-vertically ()
|
||||
(interactive)
|
||||
(split-window-right)
|
||||
(balance-windows)
|
||||
(other-window 1))
|
||||
(global-set-key (kbd "C-x 3") 'split-and-follow-vertically)
|
||||
#+END_SRC
|
||||
** Autosave
|
||||
Default Emacs will store backup and "temporary" files in the edited files directory, instead this changes it to move it to the UNIX Temporary Directory.
|
||||
Set backup/temporary file directories:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq backup-directory-alist
|
||||
`((".*" . ,temporary-file-directory)))
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" ,temporary-file-directory t)))
|
||||
#+END_SRC
|
||||
** Wind Move
|
||||
Windmove is built into Emacs. It lets you move point from window to window using Shift and the arrow keys. This is easier to type than ‘C-x o’ when there are multiple windows open.
|
||||
Enable Wind Move:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when (fboundp 'windmove-default-keybindings)
|
||||
(windmove-default-keybindings))
|
||||
#+END_SRC
|
||||
** Global Revert Mode
|
||||
Global Revert Mode is a minor mode that automatically refreshes opened buffers when an external tool has changed their data.
|
||||
Enable Global Revert Mode:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(global-auto-revert-mode t)
|
||||
#+END_SRC
|
||||
** Rainbow Delimiters
|
||||
This Minor Mode will mark pairs of brackets with colours.
|
||||
Install the package, enable it and ensure that it always is installed.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package rainbow-delimiters
|
||||
:ensure t)
|
||||
#+END_SRC
|
||||
|
||||
Set Minor Mode as Global :
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(define-globalized-minor-mode global-rainbow-delimiters-mode rainbow-delimiters-mode
|
||||
(lambda () (rainbow-delimiters-mode 1)))
|
||||
|
||||
(global-rainbow-delimiters-mode 1)
|
||||
#+END_SRC
|
||||
** Rainbow Mode
|
||||
This Minor Mode will highlight RGB/HEX values with their respective colours.
|
||||
Install the package, enable it and ensure that it always is installed.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package rainbow-mode
|
||||
:ensure t)
|
||||
#+END_SRC
|
||||
|
||||
Set Minor Mode as Global :
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(define-globalized-minor-mode global-rainbow-mode rainbow-mode
|
||||
(lambda () (rainbow-mode 1)))
|
||||
|
||||
(global-rainbow-mode 1)
|
||||
#+END_SRC
|
||||
** Pdf Viewer
|
||||
PDF Tools is, among other things, a replacement of DocView for PDF
|
||||
files. The key difference is that pages are not pre-rendered by
|
||||
e.g. ghostscript and stored in the file-system, but rather created
|
||||
on-demand and stored in memory.
|
||||
|
||||
Actually, displaying PDF files is just one part of PDF Tools. Since
|
||||
poppler can provide us with all kinds of information about a document
|
||||
and is also able to modify it, there is a lot more we can do with
|
||||
it.
|
||||
|
||||
Install the package, enable it and ensure that it always is installed:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package pdf-tools
|
||||
:ensure t
|
||||
:init
|
||||
(pdf-loader-install))
|
||||
#+END_SRC
|
||||
|
||||
** Org Mode
|
||||
*** Simple Org Mode Preview
|
||||
These are a simple set of functions that will automatically refresh
|
||||
the other buffer, which presumably has the Org Mode PDF open. Once
|
||||
using the keybindings to quickly export the file, another window will
|
||||
pop up as a live preview (Which is just an automatically opened
|
||||
preview of the exported PDF). Define functions and set keybindings:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun open-pdf ()
|
||||
(split-window-right)
|
||||
(other-window 1)
|
||||
(find-file (concat "/" (substring buffer-file-name 1 (- (length buffer-file-name) 4)) ".pdf"))
|
||||
(revert-buffer nil t)
|
||||
(other-window -1))
|
||||
|
||||
(defun update-other-buffer ()
|
||||
(interactive)
|
||||
(other-window 1)
|
||||
(revert-buffer nil t)
|
||||
(other-window -1))
|
||||
|
||||
(defun check-if-pdf-is-open ()
|
||||
(setq openwindows (length (delete-dups (mapcar #'window-buffer (window-list)))))
|
||||
(if (>= openwindows 2) (update-other-buffer) (open-pdf)))
|
||||
|
||||
(defun org-compile-beamer-and-update-other-buffer ()
|
||||
"Has as a premise that it's run from an org-mode buffer and the
|
||||
other buffer already has the PDF open"
|
||||
(interactive)
|
||||
(org-beamer-export-to-pdf)
|
||||
(check-if-pdf-is-open))
|
||||
|
||||
(defun org-compile-latex-and-update-other-buffer ()
|
||||
"Has as a premise that it's run from an org-mode buffer and the
|
||||
other buffer already has the PDF open"
|
||||
(interactive)
|
||||
(org-latex-export-to-pdf)
|
||||
(check-if-pdf-is-open))
|
||||
|
||||
(define-key org-mode-map (kbd "C-c rl") 'org-compile-latex-and-update-other-buffer)
|
||||
(define-key org-mode-map (kbd "C-c rb") 'org-compile-beamer-and-update-other-buffer)
|
||||
#+END_SRC
|
||||
*** LateX Preview
|
||||
This package will automatically convert LaTeX Snippets into viewable LaTeX in your Org Mode Documents.
|
||||
LaTeX Snippets can be defined with text between dollar signs. Example : $ax+bx^2$
|
||||
|
||||
These LaTeX snippets will also show up when converting to PDF.
|
||||
Install the package, enable it and ensure that it always is installed:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package org-fragtog
|
||||
:ensure t
|
||||
:init
|
||||
(add-hook 'org-mode-hook 'org-fragtog-mode))
|
||||
#+END_SRC
|
||||
*** Org Bullets
|
||||
Org Bullets convert the Asterisks of Org Mode headers into unicode Bullet point with multiple styles.
|
||||
Install the package, enable it and ensure that it always is installed, then add a hook to enable the Bullet Points when on Org Major Mode:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package org-bullets
|
||||
:ensure t
|
||||
:config
|
||||
(add-hook 'org-mode-hook (lambda () (org-bullets-mode))))
|
||||
#+END_SRC
|
||||
*** Enable Indent Mode
|
||||
A hook that will autmatically make sure that indenting of headers are enabled by default, this is visually useful and emulates code hierarchy.
|
||||
Add a hook to enable the Indentation when on Org Major Mode:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'org-mode-hook 'org-indent-mode)
|
||||
#+END_SRC
|
||||
*** Enable Beamer Support
|
||||
A hook that will automatically make sure that Beamer Org Mode templates and exportion are enabled by default, for slideshow creation with LaTeX.
|
||||
Add a hook to enable the Beamer Mode when on Org Major Mode:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-hook 'org-mode-hook 'org-beamer-mode)
|
||||
#+END_SRC
|
||||
** Agenda
|
||||
For Org-Agenda, you can set a location of your Org Agenda file here.
|
||||
Set Agenda Directory:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq org-agenda-files (quote("~/.emacs.d/agenda.org")))
|
||||
#+END_SRC
|
||||
|
||||
This is will integrate the Calendar/Diary into Org-Agenda, so you can get access to dates on public holidays etc.
|
||||
Set diary to true:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq org-agenda-include-diary t)
|
||||
#+END_SRC
|
||||
** Evil Mode
|
||||
Evil Mode, a package designed to emulate modal editing and vim keybindings in Emacs.
|
||||
Install the package, enable it and ensure that it always is installed, and then make sure that evil-mode is enabled by default:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package evil
|
||||
:ensure t
|
||||
:init
|
||||
(evil-mode 1))
|
||||
#+END_SRC
|
||||
** Projectile
|
||||
Projectile is a project manager, like a dynamic bookmarking system. It will automatically add repositories as projects which you can access via Dired or Ivy completion.
|
||||
Install the package, enable it and ensure that it always is installed, and then make sure that projectile-mode is enabled by default:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package projectile
|
||||
:ensure t
|
||||
:init
|
||||
(projectile-mode))
|
||||
#+END_SRC
|
||||
** Auto Completion
|
||||
*** Which Key
|
||||
Which Key is an insanely useful package that will automatically show you the possible key combinations to finish a binded keychord.
|
||||
Install the package, enable it and ensure that it always is installed, and then make sure that which-key is enabled by default:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package which-key
|
||||
:ensure t
|
||||
:init
|
||||
(which-key-mode))
|
||||
#+END_SRC
|
||||
*** Ivy
|
||||
Ivy is an autocompletion framework, it will automatically fuzzy find search words for you. This includes file managing, searching, and more via its extensibility and the Counsel package.
|
||||
Install the package, enable it and ensure that it always is installed, and then make sure that ivy-mode is enabled by default:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package ivy
|
||||
:ensure t
|
||||
:init
|
||||
(ivy-mode 1)
|
||||
:bind
|
||||
("C-s" . swiper))
|
||||
#+END_SRC
|
||||
|
||||
Ivy Configuration
|
||||
Set an option to make Ivy show previously opened/edited buffers in the buffer selection :
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq ivy-use-virtual-buffers t)
|
||||
;(setq enable-recursive-minibuffers t)
|
||||
#+END_SRC
|
||||
*** Counsel
|
||||
A collection of Ivy-enhanced versions of common Emacs commands.
|
||||
Install the package, enable it and ensure that it always is installed:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package counsel
|
||||
:ensure t)
|
||||
#+END_SRC
|
||||
|
||||
Counsel Support in Projectile.
|
||||
Install the package, enable it and ensure that it always is installed, and then set up bindings for the Projectile specific prefix:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package counsel-projectile
|
||||
:ensure t
|
||||
:init
|
||||
(counsel-projectile-mode))
|
||||
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
||||
#+END_SRC
|
||||
*** Company
|
||||
**** Company Base
|
||||
Company is a text completion framework for Emacs. The name stands for "complete anything". It uses pluggable back-ends and front-ends to retrieve and display completion candidates.
|
||||
Install the package, enable it and ensure that it always is installed, and then make sure that company-mode is enabled by default:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package company
|
||||
:ensure t
|
||||
:init
|
||||
(global-company-mode))
|
||||
#+END_SRC
|
||||
|
||||
***** Configuration
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
||||
; No delay in showing suggestions.
|
||||
(setq company-idle-delay 0)
|
||||
|
||||
; Show suggestions after entering one character.
|
||||
(setq company-minimum-prefix-length 1)
|
||||
|
||||
; Wrap around when suggestions reach bottom.
|
||||
(setq company-selection-wrap-around t)
|
||||
|
||||
; Use tab key to cycle through suggestions.
|
||||
; ('tng' means 'tab and go')
|
||||
(company-tng-configure-default)
|
||||
|
||||
#+END_SRC
|
||||
**** Company Quickhelp
|
||||
Company Quickhelp is an extension to company which introduces documentation popups that appears when idling on a company completion candidate.
|
||||
Install the package, enable it and ensure that it always is installed, and then make sure that company-quickhelp-mode is enabled by default:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package company-quickhelp
|
||||
:ensure t
|
||||
:init
|
||||
(company-quickhelp-mode))
|
||||
#+END_SRC
|
||||
**** Company Box
|
||||
Company Box Mode is a mode that gives Company menu options icons.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package company-box
|
||||
:ensure t
|
||||
:hook (company-mode . company-box-mode))
|
||||
#+END_SRC
|
||||
** Multiple Cursors
|
||||
The Multiple Cursors package is pretty self explanatory, you can select and manipulate multiple lines of the same text at the same time, move the cursors in unison. Etc.
|
||||
Install the package, enable it and ensure that it always is installed, and then bind the useful functions to a mnenomic key chord:
|
||||
|
||||
To remove the cursors on non-evil mode implementation, use keybind C-g.
|
||||
For non-evil mode:
|
||||
+BEGIN_SRC emacs-lisp
|
||||
(use-package multiple-cursors
|
||||
:ensure t
|
||||
:bind
|
||||
("C-c m" . 'mc/mark-next-like-this)
|
||||
:bind
|
||||
("C-c C-m" . 'mc/mark-all-like-this))
|
||||
+END_SRC
|
||||
|
||||
To undo the last cursors added on evil mode implementation, type gru in NORMAL mode.
|
||||
To remove the cursors on evil mode implementation, type grq in NORMAL mode.
|
||||
For evil mode:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package evil-mc
|
||||
:ensure t
|
||||
:config
|
||||
(global-evil-mc-mode 1)
|
||||
:bind
|
||||
("C-c m" . 'evil-mc-make-all-cursors)
|
||||
:bind
|
||||
("C-c C-m" . 'evil-mc-make-and-goto-next-match))
|
||||
#+END_SRC
|
||||
|
||||
** Expand Region
|
||||
Auto selects a region of text/code, if executed multiple times it will wrap further, like layers of a binary onion.
|
||||
Install the package, enable it and ensure that it always is installed, and then bind the useful functions to a mnenomic key chord:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package expand-region
|
||||
:ensure t
|
||||
:bind
|
||||
("C-c e" . 'er/expand-region))
|
||||
#+END_SRC
|
||||
** LSP Mode
|
||||
LSP mode will give you IDE capabilities in Emacs, using Microsoft's
|
||||
Universal Language Server Protocol. The same one that VSCode uses for
|
||||
linting, autocompletion. Etc. Install the package, enable it and
|
||||
ensure that it always is installed, add a hook to make sure it only is
|
||||
activated on Programming Related Major Modes, and set a keychord for
|
||||
the custom prefix. Please check
|
||||
`https://github.com/emacs-lsp/lsp-mode#installation` for instructions
|
||||
on how to install the Programming Language Servers that you want.
|
||||
*** Lsp Mode
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package lsp-mode
|
||||
:ensure t
|
||||
:hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode)
|
||||
(prog-mode . lsp)
|
||||
;; if you want which-key integration
|
||||
(lsp-mode . lsp-enable-which-key-integration))
|
||||
:commands lsp)
|
||||
|
||||
;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l")
|
||||
(setq lsp-keymap-prefix "s-l")
|
||||
#+END_SRC
|
||||
|
||||
*** Configuration
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; optionally
|
||||
(use-package lsp-ui :commands lsp-ui-mode
|
||||
:ensure t)
|
||||
(use-package company-lsp :commands company-lsp
|
||||
:ensure t)
|
||||
;; if you are helm user
|
||||
;;(use-package helm-lsp :commands helm-lsp-workspace-symbol)
|
||||
;; if you are ivy user
|
||||
(use-package lsp-ivy :commands lsp-ivy-workspace-symbol
|
||||
:ensure t)
|
||||
;;(use-package lsp-treemacs :commands lsp-treemacs-errors-list
|
||||
;; :ensure t)
|
||||
|
||||
;; optionally if you want to use debugger
|
||||
(use-package dap-mode
|
||||
:ensure t)
|
||||
;; (use-package dap-LANGUAGE) to load the dap adapter for your language
|
||||
#+END_SRC
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -0,0 +1,86 @@
|
|||
;; Added by Package.el. This must come before configurations of
|
||||
;; installed packages. Don't delete this line. If you don't want it,
|
||||
;; just comment it out by adding a semicolon to the start of the line.
|
||||
;; You may delete these explanatory comments.
|
||||
(require 'package)
|
||||
(setq package-enable-at-startup nil)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/"))
|
||||
(package-initialize)
|
||||
|
||||
;; Packages
|
||||
|
||||
;; Use-Package
|
||||
|
||||
(unless (package-installed-p 'use-package)
|
||||
(package-refresh-contents)
|
||||
(package-install 'use-package))
|
||||
|
||||
;; Read the Org Configuration
|
||||
(when (file-readable-p "~/.emacs.d/config.org")
|
||||
(org-babel-load-file (expand-file-name "~/.emacs.d/config.org")))
|
||||
|
||||
(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.
|
||||
'(ansi-color-names-vector
|
||||
["#d2ceda" "#f2241f" "#67b11d" "#b1951d" "#3a81c3" "#a31db1" "#21b8c7" "#655370"])
|
||||
'(custom-safe-themes
|
||||
'("7546a14373f1f2da6896830e7a73674ef274b3da313f8a2c4a79842e8a93953e" "d6603a129c32b716b3d3541fc0b6bfe83d0e07f1954ee64517aa62c9405a3441" "8f5a7a9a3c510ef9cbb88e600c0b4c53cdcdb502cfe3eb50040b7e13c6f4e78e" "ba72dfc6bb260a9d8609136b9166e04ad0292b9760a3e2431cf0cd0679f83c3a" "e1ecb0536abec692b5a5e845067d75273fe36f24d01210bf0aa5842f2a7e029f" "be9645aaa8c11f76a10bcf36aaf83f54f4587ced1b9b679b55639c87404e2499" "8a379e7ac3a57e64de672dd744d4730b3bdb88ae328e8106f95cd81cbd44e0b6" "41098e2f8fa67dc51bbe89cce4fb7109f53a164e3a92356964c72f76d068587e" "bffa9739ce0752a37d9b1eee78fc00ba159748f50dc328af4be661484848e476" "fa2b58bb98b62c3b8cf3b6f02f058ef7827a8e497125de0254f56e373abee088" "2035a16494e06636134de6d572ec47c30e26c3447eafeb6d3a9e8aee73732396" "86704574d397606ee1433af037c46611fb0a2787e8b6fd1d6c96361575be72d2" "a41b81af6336bd822137d4341f7e16495a49b06c180d6a6417bf9fd1001b6d2b" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" default))
|
||||
'(fci-rule-color "#a28c6f")
|
||||
'(hl-todo-keyword-faces
|
||||
'(("TODO" . "#dc752f")
|
||||
("NEXT" . "#dc752f")
|
||||
("THEM" . "#2d9574")
|
||||
("PROG" . "#3a81c3")
|
||||
("OKAY" . "#3a81c3")
|
||||
("DONT" . "#f2241f")
|
||||
("FAIL" . "#f2241f")
|
||||
("DONE" . "#42ae2c")
|
||||
("NOTE" . "#b1951d")
|
||||
("KLUDGE" . "#b1951d")
|
||||
("HACK" . "#b1951d")
|
||||
("TEMP" . "#b1951d")
|
||||
("FIXME" . "#dc752f")
|
||||
("XXX+" . "#dc752f")
|
||||
("\\?\\?\\?+" . "#dc752f")))
|
||||
'(jdee-db-active-breakpoint-face-colors (cons "#030100" "#A76A19"))
|
||||
'(jdee-db-requested-breakpoint-face-colors (cons "#030100" "#813c07"))
|
||||
'(jdee-db-spec-breakpoint-face-colors (cons "#030100" "#100e0d"))
|
||||
'(objed-cursor-color "#874804")
|
||||
'(package-selected-packages
|
||||
'(omnisharp csharp-mode bug-hunter ewal-doom-themes ewal-evil-cursors ewal-spacemacs-themes ewal org-bullets company flyspell-correct-ivy evil ivy which-key use-package))
|
||||
'(pdf-view-midnight-colors '("#655370" . "#fbf8ef"))
|
||||
'(rustic-ansi-faces
|
||||
["#040201" "#874804" "#813c07" "#a45101" "#A76A19" "#D76C03" "#F09010" "#e8c99f"])
|
||||
'(vc-annotate-background "#040201")
|
||||
'(vc-annotate-color-map
|
||||
(list
|
||||
(cons 20 "#813c07")
|
||||
(cons 40 "#8c4305")
|
||||
(cons 60 "#984903")
|
||||
(cons 80 "#a45101")
|
||||
(cons 100 "#9d4f02")
|
||||
(cons 120 "#964d03")
|
||||
(cons 140 "#8F4C05")
|
||||
(cons 160 "#a75604")
|
||||
(cons 180 "#bf6103")
|
||||
(cons 200 "#D76C03")
|
||||
(cons 220 "#bc6003")
|
||||
(cons 240 "#a15403")
|
||||
(cons 260 "#874804")
|
||||
(cons 280 "#693906")
|
||||
(cons 300 "#4b2b08")
|
||||
(cons 320 "#2d1c0a")
|
||||
(cons 340 "#a28c6f")
|
||||
(cons 360 "#a28c6f")))
|
||||
'(vc-annotate-very-old-color nil))
|
||||
(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.
|
||||
)
|
||||
|
||||
|
|
@ -0,0 +1 @@
|
|||
("~/.emacs.d/")
|
||||
Loading…
Reference in New Issue