From 9239ac249f7801f31a2f853b0f9beab33e705ca5 Mon Sep 17 00:00:00 2001 From: Taylor Bockman Date: Wed, 1 Mar 2023 21:52:16 -0800 Subject: [PATCH] Add new section on customization. Gitignore cache, treemacs refresh. --- .gitignore | 4 +++- README.md | 32 ++++++++++++++++++++++++++++++++ elisp/keybinds.el | 1 + 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2e23564..e7a7384 100644 --- a/.gitignore +++ b/.gitignore @@ -53,4 +53,6 @@ transient/ eln-cache .lsp-session-* -session.* \ No newline at end of file +session.* + +.cache \ No newline at end of file diff --git a/README.md b/README.md index d45c92e..ce76230 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,35 @@ way into the broken file. Most problems, however, can be fixed by `M-x load-file ~/.emacs.d/init.el` once more. This fixes problems caused by weird states during intiialization. Alternatively you can always debug further or use `package-install` to install packages you care about. +## Customization + +The emacs folder itself is laid out logically: + +``` +├── elisp +│   ├── custom.el +│   ├── git.el +│   ├── ibuffer-settings.el +│   ├── keybinds.el +│   ├── modes +│   │   ├── default-modes.el +│   │   ├── json-mode-settings.el +│   │   ├── lisp-mode-settings.el +│   │   ├── markdown-mode-settings.el +│   │   └── python-mode-settings.el +│   └── ui.el +├── emacs.png +├── init.el +├── README.md +``` + +The `elisp` directory contains all associated emacs lisp files. In particular `keybinds.el` contains the default keybinds. There are other mode +settings that can be left alone assuming you keep the default packages. Theming and other UI elements can be customized in `ui.el`. The general +philosophy is to keep the emacs lisp as modular as possible to make it as maintainable as possible. Keybinds are adjusted sparingly and most +are left with the plugin defaults. + +You will notice this project makes heavy use of `use-package`. I would recommend keeping it this way. + ## Server By default `init.el` spins up an Emacs server as it's last task. You can set `EDITOR` to `emacsclient` in order to use your existing @@ -55,6 +84,9 @@ The current configuration is set to use multimarkdown. You may wish to install i A nice project/tree addin that works similar to eclipse. Launch using `M-t`. Mouse navigation support is enabled. +Refreshing is done manually to help with compatibility across operating systems. To refresh your treemacs +pane and capture any updates (such as file creation) use `M-p r`. + ## Project Management `Projectile` is installed. You may learn more about how to use it [here](https://github.com/bbatsov/projectile). diff --git a/elisp/keybinds.el b/elisp/keybinds.el index dcf115a..08d7173 100644 --- a/elisp/keybinds.el +++ b/elisp/keybinds.el @@ -15,6 +15,7 @@ ;; Treemacs (will start new project if none exists) (global-set-key (kbd "M-t") 'treemacs) +(global-set-key (kbd "M-p r") 'treemacs-refresh) ;; Use projectile find file to help ;; with larger projects.