Simplify treemacs config
This commit is contained in:
62
README.org
62
README.org
@@ -7,7 +7,7 @@ Points of intrest:
|
||||
- Both files are loaded automatically.
|
||||
- When Exporting HTML from ~org-mode~ the style from the ~org-theme.css~ file is inlined automatically.
|
||||
|
||||
* Set up ~use-package~
|
||||
* Set Up use-package
|
||||
State that we will need package support and define a macro for adding package repos to the archives
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'package)
|
||||
@@ -43,6 +43,7 @@ Remove all those UI elements. They do not look good and waste space.
|
||||
(tooltip-mode -1)
|
||||
(fringe-mode -1)
|
||||
#+END_SRC
|
||||
|
||||
** Disable file backups
|
||||
Emacs sure loves to clutter directories with backup files.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
@@ -50,6 +51,7 @@ Emacs sure loves to clutter directories with backup files.
|
||||
(setq auto-save-default nil)
|
||||
(setq create-lockfiles nil)
|
||||
#+END_SRC
|
||||
|
||||
** Other Settings
|
||||
#+begin_src emacs-lisp
|
||||
;; The default encoding should be utf-8 everywhere
|
||||
@@ -89,11 +91,12 @@ Emacs sure loves to clutter directories with backup files.
|
||||
(setq ring-bell-function 'ignore)
|
||||
|
||||
;; Dialogues always go in the modeline.
|
||||
(setq use-dialog-box nil)
|
||||
(setq use-dialog-box nil)
|
||||
|
||||
;; Better line wraping
|
||||
(global-visual-line-mode 1)
|
||||
#+end_src
|
||||
|
||||
** Keybindings
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(bind-key "C-x k" 'kill-buffer-with-prejudice)
|
||||
@@ -115,6 +118,7 @@ Unbind useless keys.
|
||||
(unbind-key "C-x C-d") ;; list-directory is utterly useless given the existence of dired
|
||||
(unbind-key "C-x C-r") ;; as is find-file-read-only
|
||||
#+END_SRC
|
||||
|
||||
* Useful Functions
|
||||
** Edit the config file
|
||||
A simple funtion to open this file for quick editing.
|
||||
@@ -256,7 +260,6 @@ Set up the fonts to use
|
||||
|
||||
* Dired
|
||||
Use the imporved =dired+= package instead of the buildin one.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'dired+)
|
||||
|
||||
@@ -578,7 +581,6 @@ Here we define templates we want to use to quickly capture stuff and automatical
|
||||
|
||||
* Treemacs
|
||||
Treemacs makes navigating folders and files much easier. This is the default config from [[https://github.com/Alexander-Miller/treemacs][the offical repository]] as a base, with slight modifications to suite my config.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package treemacs
|
||||
:defer t
|
||||
@@ -587,62 +589,22 @@ Treemacs makes navigating folders and files much easier. This is the default con
|
||||
(define-key winum-keymap (kbd "M-0") #'treemacs-select-window))
|
||||
:config
|
||||
(progn
|
||||
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
|
||||
treemacs-deferred-git-apply-delay 0.5
|
||||
treemacs-display-in-side-window t
|
||||
treemacs-eldoc-display t
|
||||
treemacs-file-event-delay 5000
|
||||
treemacs-file-follow-delay 0.2
|
||||
treemacs-follow-after-init t
|
||||
treemacs-git-command-pipe ""
|
||||
treemacs-goto-tag-strategy 'refetch-index
|
||||
treemacs-indentation 2
|
||||
treemacs-indentation-string " "
|
||||
treemacs-is-never-other-window nil
|
||||
treemacs-max-git-entries 5000
|
||||
treemacs-missing-project-action 'ask
|
||||
treemacs-no-png-images nil
|
||||
treemacs-no-delete-other-windows t
|
||||
treemacs-project-follow-cleanup nil
|
||||
treemacs-persist-file (expand-file-name ".cache/treemacs-persist" user-emacs-directory)
|
||||
treemacs-position 'left
|
||||
treemacs-recenter-distance 0.1
|
||||
treemacs-recenter-after-file-follow nil
|
||||
treemacs-recenter-after-tag-follow nil
|
||||
treemacs-recenter-after-project-jump 'always
|
||||
treemacs-recenter-after-project-expand 'on-distance
|
||||
treemacs-show-cursor nil
|
||||
treemacs-show-hidden-files t
|
||||
treemacs-silent-filewatch nil
|
||||
treemacs-silent-refresh nil
|
||||
treemacs-sorting 'alphabetic-desc
|
||||
treemacs-space-between-root-nodes t
|
||||
treemacs-tag-follow-cleanup t
|
||||
treemacs-tag-follow-delay 1.5
|
||||
treemacs-width 35)
|
||||
(setq treemacs-show-hidden-files t
|
||||
treemacs-sorting 'alphabetic-desc
|
||||
treemacs-width 35)
|
||||
|
||||
(treemacs-follow-mode t)
|
||||
(treemacs-filewatch-mode t)
|
||||
(treemacs-fringe-indicator-mode t)
|
||||
(treemacs-toggle-show-dotfiles)
|
||||
(pcase (cons (not (null (executable-find "git")))
|
||||
(not (null treemacs-python-executable)))
|
||||
(`(t . t)
|
||||
(treemacs-git-mode 'deferred))
|
||||
(`(t . _)
|
||||
(treemacs-git-mode 'simple))))
|
||||
(treemacs-toggle-show-dotfiles))
|
||||
:bind
|
||||
(:map global-map
|
||||
("M-0" . treemacs)
|
||||
("C-x t 1" . treemacs-delete-other-windows)
|
||||
("C-x t B" . treemacs-bookmark)
|
||||
("C-x t C-t" . treemacs-find-file)
|
||||
("C-x t M-t" . treemacs-find-tag)))
|
||||
("C-x t t" . treemacs)))
|
||||
|
||||
(use-package treemacs-magit
|
||||
:after treemacs magit
|
||||
:ensure t)
|
||||
#+END_SRC
|
||||
|
||||
* Elfeed
|
||||
[[https://github.com/skeeto/elfeed][Elfeed]] is an RSS reader for emacs.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
||||
Reference in New Issue
Block a user