Initial Minimap Module
Created a new Minimap module based on minimap.el from ELPA the module sets some DOOM-specific config, and better defaults. Also added keybindings for it.
This commit is contained in:
parent
375faedb1b
commit
112b43fe9a
6 changed files with 72 additions and 2 deletions
|
@ -47,6 +47,7 @@
|
||||||
;;window-select ; visually switch windows
|
;;window-select ; visually switch windows
|
||||||
workspaces ; tab emulation, persistence & separate workspaces
|
workspaces ; tab emulation, persistence & separate workspaces
|
||||||
;;zen ; distraction-free coding or writing
|
;;zen ; distraction-free coding or writing
|
||||||
|
;;minimap ; show a map of the code on the side
|
||||||
|
|
||||||
:editor
|
:editor
|
||||||
(evil +everywhere); come to the dark side, we have cookies
|
(evil +everywhere); come to the dark side, we have cookies
|
||||||
|
|
|
@ -267,7 +267,9 @@
|
||||||
(:when (featurep! :lang org +pomodoro)
|
(:when (featurep! :lang org +pomodoro)
|
||||||
:desc "Pomodoro timer" "t" #'org-pomodoro)
|
:desc "Pomodoro timer" "t" #'org-pomodoro)
|
||||||
(:when (featurep! :ui zen)
|
(:when (featurep! :ui zen)
|
||||||
:desc "Zen mode" "z" #'writeroom-mode))
|
:desc "Zen mode" "z" #'writeroom-mode)
|
||||||
|
(:when (featurep! :ui minimap)
|
||||||
|
:desc "Minimap mode" "m" #'minimap-mode))
|
||||||
|
|
||||||
;;; <leader> v --- versioning
|
;;; <leader> v --- versioning
|
||||||
(:prefix-map ("v" . "versioning")
|
(:prefix-map ("v" . "versioning")
|
||||||
|
|
|
@ -655,7 +655,8 @@
|
||||||
:desc "Soft line wrapping" "w" #'visual-line-mode
|
:desc "Soft line wrapping" "w" #'visual-line-mode
|
||||||
(:when (featurep! :editor word-wrap)
|
(:when (featurep! :editor word-wrap)
|
||||||
:desc "Soft line wrapping" "w" #'+word-wrap-mode)
|
:desc "Soft line wrapping" "w" #'+word-wrap-mode)
|
||||||
:desc "Zen mode" "z" #'writeroom-mode))
|
:desc "Zen mode" "z" #'writeroom-mode
|
||||||
|
:desc "Minimap" "m" #'minimap-mode))
|
||||||
|
|
||||||
(after! which-key
|
(after! which-key
|
||||||
(let ((prefix-re (regexp-opt (list doom-leader-key doom-leader-alt-key))))
|
(let ((prefix-re (regexp-opt (list doom-leader-key doom-leader-alt-key))))
|
||||||
|
|
48
modules/ui/minimap/README.org
Normal file
48
modules/ui/minimap/README.org
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
#+TITLE: Minimap
|
||||||
|
#+DATE: May 8, 2020
|
||||||
|
#+SINCE: v2.0
|
||||||
|
#+STARTUP: inlineimages nofold
|
||||||
|
|
||||||
|
* Table of Contents :TOC_3:noexport:
|
||||||
|
- [[#description][Description]]
|
||||||
|
- [[#maintainers][Maintainers]]
|
||||||
|
- [[#module-flags][Module Flags]]
|
||||||
|
- [[#plugins][Plugins]]
|
||||||
|
- [[#hacks][Hacks]]
|
||||||
|
- [[#features][Features]]
|
||||||
|
- [[#configuration][Configuration]]
|
||||||
|
- [[#troubleshooting][Troubleshooting]]
|
||||||
|
- [[#scrolling-is-slowlaggy][Scrolling is slow/laggy]]
|
||||||
|
- [[#minimap-doesnt-close-when-disabled][Minimap doesn't close when disabled]]
|
||||||
|
|
||||||
|
* Description
|
||||||
|
This module adds a minimap to the right side of Emacs, similar to the feature
|
||||||
|
found in many other editors.
|
||||||
|
|
||||||
|
** Maintainers
|
||||||
|
+ [[https://github.com/rushsteve1][@rushsteve1]] (Author)
|
||||||
|
|
||||||
|
** Module Flags
|
||||||
|
This module provides no flags.
|
||||||
|
|
||||||
|
** Plugins
|
||||||
|
+ [[https://elpa.gnu.org/packages/minimap.html][minimap.el]]
|
||||||
|
|
||||||
|
** Hacks
|
||||||
|
+ The colors used by the minimap are terrible so are overridden with
|
||||||
|
=custom-set-faces!= using colors out of the current DOOM theme.
|
||||||
|
|
||||||
|
* Features
|
||||||
|
A minimap which provides an overview of the current buffer to the side,
|
||||||
|
displaying the currently visible region and the current line. You can left-click
|
||||||
|
and drag to scroll along the buffer, or right-click anywhere to jump to there.
|
||||||
|
|
||||||
|
* Configuration
|
||||||
|
There are a number of options provided by the =minimap.el= package this module
|
||||||
|
is based on. The easiest way to see all of them is =SPC h v minimap=.
|
||||||
|
|
||||||
|
* Troubleshooting
|
||||||
|
** Scrolling is slow/laggy
|
||||||
|
Disable the minimap using =SPC t m=
|
||||||
|
|
||||||
|
** TODO Minimap doesn't close when disabled
|
14
modules/ui/minimap/config.el
Normal file
14
modules/ui/minimap/config.el
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
;;; ~/Nextcloud/Dotfiles/doom/minimap/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
(use-package! minimap
|
||||||
|
:hook doom-load-theme-hook
|
||||||
|
:config
|
||||||
|
(setq minimap-window-location 'right
|
||||||
|
minimap-update-delay 0
|
||||||
|
minimap-width-fraction 0.09
|
||||||
|
minimap-minimum-width 15)
|
||||||
|
(custom-set-faces!
|
||||||
|
`(minimap-current-line-face
|
||||||
|
:background ,(doom-color 'selection))
|
||||||
|
`(minimap-active-region-background
|
||||||
|
:background ,(doom-color 'vertical-bar))))
|
4
modules/ui/minimap/packages.el
Normal file
4
modules/ui/minimap/packages.el
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; ~/Nextcloud/Dotfiles/doom/minimap/packages.el
|
||||||
|
|
||||||
|
(package! minimap)
|
Loading…
Add table
Add a link
Reference in a new issue