aboutsummaryrefslogtreecommitdiffstats
path: root/config.org
blob: 3bf0d232053f519e0efa86386948efb234eb28ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
#+TITLE: Surgot's Emacs Config
#+AUTHOR: Biswakalyan Bhuyan
#+SETUPFILE: https://fniessen.github.io/org-html-themes/org/theme-readtheorg.setup
#+EXPORT_FILE_NAME: index.html
#+EXPORT_DIR: /ssh:server:~/www/site/emacs/

* Introduction
This is an Elisp program that runs every time I start my Emacs editor. Some people also call it an *emacs config*. Why am I writing it under Org mode? /Literate Programming, Bitch/!

- *Author*: Biswakalyan Bhuyan
- *Created*: 26-10-2022
- *License*: [[./LICENSE][GNU General Public License (GPL)]]

#+CAPTION: XKCD Emacs Comic
#+NAME: fig:Emacs meme
[[https://imgs.xkcd.com/comics/real_programmers.png]]

* Installation
You can use my Emacs config anytime; the installation is pretty simple.

#+BEGIN_VERSE
*Note*: I won't suggest you use it without understanding the code.
#+END_VERSE

- First, get rid of your =~/.emacs.d= and =~/.emacs=.
- Run =git clone git@surgot.tech:/var/www/git/emacs.d ~/.emacs.d=
- Open Emacs with fingers crossed!

* Package Management
Emacs is like an operating system; it is highly extensible. You can install new functionality by just installing a package, similar to how you do it in an OS. You can also configure these programs by changing some Elisp variables.

#+BEGIN_VERSE
An average Emacs user can easily end up installing 100+ packages.
#+END_VERSE

** Melpa
- *Reference*: https://www.melpa.org/

By default, Emacs contains a limited number of package choices. This is why we need Melpa. It's a package repository for Emacs.

#+BEGIN_VERSE
MELPA is an ELPA-compatible package repository that contains an enormous number of useful Emacs packages.
#+END_VERSE

Think of it like the VSCode Plugin Marketplace (eww).

#+BEGIN_SRC elisp
(require 'package)
(setq package-enable-at-startup nil)

(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
#+END_SRC

** Package Manager
- /Reference: https://jwiegley.github.io/use-package/
The use-package macro allows you to isolate package configuration in your .emacs file in a way that is both performance-oriented and, well, tidy.

#+BEGIN_SRC elisp
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
#+END_SRC

* Better Appearance
** Basic Interface Settings

- Disable dialog boxes:
  This setting disables the display of dialog boxes, such as confirmation or warning pop-ups, in Emacs. It allows for a smoother and uninterrupted workflow.

  #+BEGIN_SRC emacs-lisp
  (setq use-dialog-box nil)
  #+END_SRC

- Disable file dialogs:
  This setting disables the use of file selection dialogs in Emacs. Instead, Emacs will rely on command-line or programmatic methods for file operations.

  #+BEGIN_SRC emacs-lisp
  (setq use-file-dialog nil)
  #+END_SRC

- Disable backup files:
  By setting this variable to `nil`, Emacs will not create backup files. This helps to avoid cluttering the file system with unnecessary backup copies.

  #+BEGIN_SRC emacs-lisp
  (setq make-backup-files nil)
  #+END_SRC

- Disable auto-save:
  Auto-save automatically saves buffer contents periodically in case of unexpected Emacs or system crashes. However, if you prefer to disable this feature, you can set this variable to `nil`.

  #+BEGIN_SRC emacs-lisp
  (setq auto-save-default nil)
  #+END_SRC

- Hide menu bar:
  This setting hides the menu bar in Emacs, providing more vertical space for your text and reducing visual distractions.

  #+BEGIN_SRC emacs-lisp
  (menu-bar-mode -1)
  #+END_SRC

- Hide tool bar:
  This setting hides the tool bar, which contains various icons and shortcuts, in Emacs. It further maximizes the available space for editing and reduces clutter.

  #+BEGIN_SRC emacs-lisp
  (tool-bar-mode -1)
  #+END_SRC

- Hide fringes:
  Fringes are the narrow areas on the left and right sides of the Emacs window. By disabling them, you can utilize the full width of the window for your text.

  #+BEGIN_SRC emacs-lisp
  (fringe-mode -1)
  #+END_SRC

- Hide scroll bar:
  Emacs provides a scroll bar for navigating through the buffer. If you prefer a more minimalistic interface, you can hide the scroll bar with this setting.

  #+BEGIN_SRC emacs-lisp
  (scroll-bar-mode -1)
  #+END_SRC

- Enable subword navigation:
  Subword navigation allows moving the cursor through CamelCase or snake_case words more intelligently. This setting enables subword navigation globally in Emacs.

  #+BEGIN_SRC emacs-lisp
  (global-subword-mode 1)
  #+END_SRC

- Use y-or-n-p for prompts:
  By default, Emacs prompts for user confirmation using 'yes' or 'no.' This setting changes it to use 'y' or 'n' for shorter and faster responses.

  #+BEGIN_SRC emacs-lisp
  (defalias 'yes-or-no-p 'y-or-n-p)
  #+END_SRC

** Theme
The =ef-themes= package is an Emacs package that provides a collection of visually appealing themes for Emacs. It enhances the visual experience of Emacs by offering different color schemes and styles that can be applied to the editor.

#+BEGIN_SRC emacs-lisp
(use-package ef-themes
  :if window-system
  :ensure t
  :config
  ;; Enable the theme
  (load-theme 'ef-winter t))
#+END_SRC

** Font
I love =JetBrains Mono=. Best for programming. Using it since 2018. Make sure to install it in your system. I use Arch, so I run =sudo pacman -S ttf-jetbrains-mono=.

#+BEGIN_SRC elisp
(add-to-list 'default-frame-alist
             '(font . "JetBrains Mono-14"))
#+END_SRC
* Editing Features
** Hungry Delete
- /Reference: https://github.com/nflath/hungry-delete/

Hungry Delete is a minor-mode that causes deletion to delete all whitespace in the direction you are deleting. Works exactly like c-hungry-delete-mode, which is where the code was from. This just packages it up to be easier to use in other modes.

#+BEGIN_SRC elisp
  (use-package hungry-delete
    :ensure t
    :defer t
    :config (global-hungry-delete-mode))
#+END_SRC

* Better Emacs
** Startup Screen (dashboard)
The "emacs-dashboard" package elevates your Emacs startup experience by providing an extensible and customizable startup screen. It presents you with important information, such as recent files, project directories, and agenda items, in a visually appealing layout. With "emacs-dashboard," you can quickly access frequently used commands, navigate to recent projects, and stay organized, all while setting the right mood for your Emacs sessions.
- /Reference - https://github.com/emacs-dashboard/emacs-dashboard/

#+BEGIN_SRC elisp
(use-package dashboard
  :ensure t
  :config
  (dashboard-setup-startup-hook)
  (setq dashboard-startup-banner "~/.emacs.d/avatar.png")
  (setq dashboard-banner-logo-title "I am just a coder for fun"))
(setq inhibit-startup-screen t)
#+END_SRC

** Modeline (moodline)
"Mood-line" is an Emacs package that enhances the mode line, providing a visually appealing and informative display. It enriches your editing experience by showing essential details about the buffer, active modes, and other relevant information, all in a sleek and elegant format.
- /Reference - https://github.com/jessiehildebrandt/mood-line/

#+BEGIN_SRC elisp
(use-package mood-line
  :ensure t
  :if window-system
  :init
  (mood-line-mode))
#+END_SRC

** Command Menu
After pressing =M-x=, Emacs users see a prompt below; this prompt allows us to run any command within Emacs. This is what I loved about Emacs when I was learning it first. Almost anything, any functionality, any program, everything is a function, and I can access that function by just pressing =M-x=. But memorizing all these commands is hard, also typing it. Emacs does provide tab completion, but it sucks. So we are gonna pull up the Emacs magic and install some packages to make it better.

*** Ido Mode
The Ido package lets you switch between buffers and visit files and directories with a minimum of keystrokes. It is a superset of Iswitchb, the interactive buffer switching package by Stephen Eglen.
- /Reference - https://www.emacswiki.org/emacs/InteractivelyDoThings/
#+begin_src elisp
(use-package ido-vertical-mode
  :ensure t
  :config
  (setq ido-enable-flex-matching t)
  (setq ido-everywhere t)
  (setq ido-vertical-define-keys 'C-n-and-C-p-only)
  :init
  (ido-mode 1)
  (ido-vertical-mode 1))
#+end_src

*** Smex
Smex is an M-x enhancement for Emacs. Built on top of Ido, it provides a convenient interface to your recently and most frequently used commands. And to all the other commands, too.
- /Reference - https://github.com/nonsequitur/smex/
#+begin_src elisp
(use-package smex
  :ensure t
  :init (smex-initialize)
  :bind
  ("M-x" . smex))
#+end_src
** Emacs Config
*** Custom Variables File
#+begin_src elisp
  (setq custom-file (expand-file-name "custom.el" user-emacs-directory))
#+end_src

* IDE Features
** Centaur Tabs
Centaur Tabs is an Emacs package that enhances the tab bar functionality, providing a more visually appealing and user-friendly way to manage multiple open buffers (files) within the editor. It may offer features such as clickable tabs, grouping tabs based on projects or file types, tab previews, and convenient tab navigation options. For more detailed information about Centaur Tabs and its specific functionalities, it is recommended to refer to its documentation or source code repository.
- /Reference - https://github.com/ema2159/centaur-tabs/
#+begin_src elisp
  (use-package centaur-tabs
    :if window-system
    :demand
    :init
    ;; Set the style to rounded with icons
    (setq centaur-tabs-style "bar")
    (setq centaur-tabs-set-icons t)

    :config
    ;; Enable centaur-tabs
    (centaur-tabs-mode t))
#+end_src

** Treemacs
"Treemacs" is an Emacs package that brings a tree-style file explorer directly into your Emacs workspace. With its intuitive and organized display, Treemacs allows you to navigate and manage files and directories effortlessly. It provides a visual representation of your project's structure, making it easy to switch between different files, directories, and buffers. Treemacs supports various project management features and integrates seamlessly with popular version control systems like Git. This powerful package enhances your Emacs workflow, making file management and project navigation a breeze.

- /Reference - https://github.com/Alexander-Miller/treemacs/

#+begin_src elisp
  (use-package treemacs
    :ensure t
    :defer t
    :bind
    (("C-c t" . treemacs))
    :config
    (setq treemacs-width 30)
    (setq-local mode-line-format nil))
#+end_src

** Highlight Indent Guides
The "highlight-indent-guides" package is an Emacs extension that enhances code readability by providing visual indent guides. As you work with code, it displays vertical lines at each level of indentation, making it easier to distinguish different blocks and understand the code's structure. This feature is particularly useful for languages with significant indentation, such as Python. "highlight-indent-guides" helps maintain consistent and well-organized code, ensuring a more pleasant coding experience in Emacs.

- /Reference - https://github.com/DarthFennec/highlight-indent-guides/

#+begin_src elisp
  (use-package highlight-indent-guides
    :ensure t
    :defer t
    :hook (prog-mode . highlight-indent-guides-mode)
    :config
    (setq highlight-indent-guides-method 'character)
    (setq highlight-indent-guides-character ?\|)
    (setq highlight-indent-guides-responsive 'top))
#+end_src

** Format all
A "format all" package in Emacs typically aims to automate and simplify the process of formatting code in various programming languages. It offers a unified command to apply code formatting rules across the entire buffer or project, ensuring consistent code style. Such packages may support multiple programming languages and use popular code formatters (e.g., Prettier, Black, clang-format) to automatically reformat code according to predefined configurations. By using the "format all" package, Emacs users can save time and effort in maintaining clean and well-formatted code. For specific details on a particular "format all" package, users should refer to its documentation or repository.

- /Reference - https://github.com/lassik/emacs-format-all-the-code/

#+begin_src elisp
  (use-package format-all
    :ensure t)
#+end_src

** Company
Company mode in Emacs is a versatile and intelligent completion framework that enhances coding productivity by providing context-aware code suggestions. As you type, Company mode offers a list of potential completions based on the current context, language, and installed backends. It supports various programming languages and can integrate with external completion tools like LSP (Language Server Protocol) servers. With its seamless and customizable integration, Company mode enables faster and more accurate code writing, streamlining the coding process and making Emacs an efficient and powerful text editor for developers.

- /Reference - https://github.com/company-mode/company-mode/

#+begin_src elisp
  (use-package company
    :ensure t
    :defer t
    :config
    (add-hook 'after-init-hook 'global-company-mode))
#+end_src

** Projectile
Projectile is a powerful project interaction library for Emacs that enhances project management and navigation. It provides a unified interface to work with multiple projects, enabling developers to switch between projects effortlessly, find files quickly, and execute project-specific commands with ease. Projectile indexes project files for speedy searches and supports various version control systems. With its intuitive keybindings and customizable behavior, Projectile simplifies project-related tasks and significantly improves productivity, making Emacs a more efficient and developer-friendly text editor for managing and working with projects of all sizes.

- /Reference - https://github.com/bbatsov/projectile/

#+begin_src elisp
  (use-package projectile
    :ensure t
    :defer t
    :config
    ;; Enable Projectile globally
    (setq projectile-completion-system 'ido)
    (setq ido-enable-flex-matching t)
    (projectile-mode 1))
#+end_src

* Advance IDE Features
Emacs is a versatile tool that can serve as a writer's machine, enabling tasks like writing books, creating spreadsheets, and crafting theses, among other uses. Personally, I primarily utilize Emacs for programming, blogging, and journaling.

While I prefer a minimalist text editor with fewer distractions, I recognize the need for more robust IDE features, especially for larger projects involving frameworks. Auto-completion and type checking are indispensable in such scenarios. Therefore, I appreciate the flexibility of Emacs, as it allows me to tailor the environment to suit my various programming needs.

** Emacs LSP
The "emacs-lsp" project is a collection of Emacs packages and tools that implement the Language Server Protocol (LSP) in Emacs. LSP is a standardized communication protocol that enables integration with language servers, which are external programs providing advanced code analysis and language-specific features.

The goal of the "emacs-lsp" project is to enhance the Emacs text editor and turn it into a powerful Integrated Development Environment (IDE) by leveraging the capabilities of language servers. These packages provide language-specific features such as autocompletion, real-time error checking, code navigation, and more. By adhering to the LSP, developers can use a consistent approach across various programming languages, streamlining their workflow and improving productivity.

The project offers a diverse range of packages, each tailored to specific programming languages and their corresponding language servers. This initiative fosters an integrated and standardized environment for Emacs users, enabling them to efficiently code in different languages and benefit from advanced language-specific tooling within their favorite text editor. The "emacs-lsp" project is a valuable resource for developers seeking a robust and unified coding experience in Emacs.

- /Reference - https://emacs-lsp.github.io/

*** LSP Mode
LSP mode (Language Server Protocol mode) in Emacs is a powerful extension that brings IDE-like capabilities to various programming languages. It provides integration with language servers, which are separate programs that offer advanced code analysis, autocompletion, and other language-specific features. LSP mode allows developers to benefit from a consistent development experience across different programming languages, eliminating the need for language-specific configurations and setups. With LSP mode, Emacs users can enjoy enhanced code navigation, error checking, and automatic code formatting, significantly improving their productivity and coding efficiency.

#+CAPTION: LSP mode completion
#+NAME: fig:LSP completion
https://emacs-lsp.github.io/lsp-mode/examples/completion.gif

- /Reference - https://github.com/emacs-lsp/lsp-mode/

#+begin_src elisp
  (use-package lsp-mode
    :ensure t
    :defer t
    :init
    (setq lsp-keymap-prefix "C-c l")
    :config
    (setq lsp-headerline-breadcrumb-enable nil))
#+end_src

*** LSP UI
In Emacs, lsp-ui is a complementary extension to lsp-mode (Language Server Protocol mode). It enhances the Language Server Protocol experience by offering a user-friendly interface with features like real-time error checking, code actions, and code lenses. lsp-ui also enables convenient peeking into definitions and references. With lsp-ui, Emacs users can enjoy a more interactive and productive coding experience with language servers.

- /Reference - https://github.com/emacs-lsp/lsp-ui/

#+begin_src elisp
  (use-package lsp-ui
    :ensure t
    :defer t)
#+end_src

*** DAP mode
DAP mode (Debug Adapter Protocol mode) in Emacs is an extension that provides a powerful debugging experience within the text editor. By leveraging the Debug Adapter Protocol, DAP mode enables seamless integration with debug servers, allowing developers to debug their programs efficiently. With DAP mode, users gain access to essential debugging features such as breakpoints, stepping through code, inspecting variables, and evaluating expressions. This extension facilitates a smooth and consistent debugging process across various programming languages, empowering developers to identify and resolve issues with ease, all within the familiar environment of Emacs.

- /Reference: https://github.com/emacs-lsp/dap-mode/

#+begin_src elisp
  (use-package dap-mode
    :after lsp-mode
    :ensure t
    :defer t)
#+end_src

** Languages
Now, we will configure language server protocol and other settings for each,
languages I work on, one by one.
*** Web (html/css/js)
**** Web Mode
Web Mode in Emacs is a major mode that enhances web development by providing specialized editing features for working with HTML, CSS, JavaScript, and other web-related languages. It intelligently handles nested tags, auto-closes HTML tags, and offers indentation and syntax highlighting tailored for web development. Web Mode also supports embedded templates and server-side code, making it a versatile tool for web developers to efficiently create and edit web pages and applications within the Emacs text editor.

- /Reference: https://web-mode.org/

#+begin_src elisp
  (use-package web-mode
    :ensure t
    :defer t
    :config
    (setq
     web-mode-markup-indent-offset 2
     web-mode-css-indent-offset 2
     web-mode-code-indent-offset 2
     web-mode-style-padding 2
     web-mode-script-padding 2
     web-mode-enable-auto-closing t
     web-mode-enable-auto-opening t
     web-mode-enable-auto-pairing t
     web-mode-enable-auto-indentation t)
    :mode
    (".html$" "*.php$" "*.tsx"))
#+end_src

**** Emmet-mode
Emmet Mode in Emacs is an extension that significantly boosts web development productivity by enabling advanced HTML and CSS abbreviations. Originally inspired by the Emmet toolkit, this mode allows developers to write complex markup with ease using intuitive shortcuts and expand them into full HTML or CSS code. It supports dynamic placeholders, numeric repetition, and custom abbreviation expansion, making it a powerful tool for rapidly generating and editing HTML and CSS structures. With Emmet Mode, Emacs users can streamline their web development workflow, saving time and effort while maintaining clean and well-structured code.

- /Reference: https://https://github.com/smihica/emmet-mode/

#+CAPTION: Emmet Mode Demo
#+NAME:   fig:emmet mode
[[https://www.philnewton.net/assets/blog/2015/08/emmet.gif]]

#+begin_src elisp
  (use-package emmet-mode
    :ensure t
    :defer t)
#+end_src

*** Typescript
**** Tide Mode
- /Reference: https://github.com/ananthakumaran/tide/
TypeScript Interactive Development Environment for Emacs.
#+begin_src elisp
  (use-package tide
    :ensure t
    :defer t
    :config
    (setq company-tooltip-align-annotations t)
    (add-hook 'before-save-hook 'tide-format-before-save))
  (add-hook 'typescript-mode-hook #'setup-tide-mode)

  (defun setup-tide-mode ()
    "Set up Tide mode."
    (interactive)
    (tide-setup)
    (flycheck-mode +1)
    (setq flycheck-check-syntax-automatically '(save-mode-enabled))
    (eldoc-mode +1)
    (tide-hl-identifier-mode +1)
    (company-mode +1))
#+end_src
**** TSX
Tide also support TSX, just need to enable web-mode with tsx files.
#+BEGIN_SRC elisp
  (add-hook 'web-mode-hook
	    (lambda ()
	      (when (string-equal "tsx" (file-name-extension buffer-file-name))
		(setup-tide-mode))))
#+END_SRC
*** Python
***** Language Server Protocol
- /Reference: https://github.com/emacs-lsp/lsp-pyright/
Pyright is a fast type checker meant for large Python source bases. It can run
in a “watch” mode and performs fast incremental updates when files are modified.
For python I decided to use pyright language server protocol.
#+begin_src elisp
  (use-package lsp-pyright
    :ensure t
    :defer t
    :hook (python-mode . (lambda ()
			   (setq indent-tabs-mode t)
			   (setq tab-width 4)
			   (setq python-indent-offset 4)
			   (company-mode 1)
			   (require 'lsp-pyright)
			   (pyvenv-autoload)
			   (lsp))))
#+end_src
***** Virutal Environment
- /Reference: https://github.com/jorgenschaefer/pyvenv/
This is a simple global minor mode which will replicate the changes done by
virtualenv activation inside Emacs, basically it helps me loading my python
virtualenv for IDE features like autocompletion.
#+begin_src elisp
  (use-package pyvenv
    :ensure t
    :defer t)
#+end_src
I use my self made elisp function, for automatically load python virtualenv,
I always use =env= dir as virtualenv inside project root. So everytime I open
=python-mode= (aka python file), it looks for any =env= dir and load the env.
#+begin_src elisp
  (defun pyvenv-autoload ()
    (require 'pyvenv)
    (require 'projectile)
    (interactive)
    "auto activate venv directory if exists"
    (f-traverse-upwards (lambda (path)
			  (let ((venv-path (f-expand "env" path)))
			    (when (f-exists? venv-path)
			      (pyvenv-activate venv-path))))))
  (add-hook 'python-mode 'pyvenv-autoload)
#+end_src

** Git Integration
I can't use git without /Magit/.
Magit is a complete text-based user interface to Git. It fills the glaring gap
between the Git command-line interface and various GUIs, letting you perform
trivial as well as elaborate version control tasks with just a couple of
mnemonic key presses. Magit looks like a prettified version of what you get
after running a few Git commands but in Magit every bit of visible information
is also actionable to an extent that goes far beyond what any Git GUI provides
and it takes care of automatically refreshing this output when it becomes
outdated. In the background Magit just runs Git commands and if you wish you
can see what exactly is being run, making it possible for you to learn the git
command-line by using Magit.
I ❤ Magit.

- /Reference: https://magit.vc/

#+begin_src elisp
  (use-package magit
    :ensure t
    :defer t)
#+end_src

* Org Mode
Org Mode in Emacs is a powerful and versatile outlining and organizing tool that extends the text editor's capabilities beyond simple plain text. It provides a structured and hierarchical format for creating notes, to-do lists, project plans, and more. Org Mode offers features such as headings, lists, tables, tags, and timestamps, enabling users to manage complex information with ease. It supports exporting to various formats like HTML, PDF, and LaTeX, making it suitable for both personal organization and professional document preparation. With its extensive functionality and seamless integration with Emacs, Org Mode empowers users to efficiently manage tasks, maintain documentation, and stay organized in a clutter-free and efficient environment.

** Org Bullet
Org Bullet is an Emacs package that enhances the visual appearance of Org Mode outlines by replacing plain text bullet points with custom symbols. It offers a variety of stylish bullets to represent different outline levels, making the organization of tasks and information more visually appealing and easier to comprehend. Org Bullet is highly configurable, allowing users to customize the bullet symbols to their preference and create a more visually pleasing and organized presentation of hierarchical data within Org Mode documents.

- /Reference - https://github.com/sabof/org-bullets/

#+begin_src elisp
  (use-package org-bullets
    :ensure t
    :defer t
    :config
    (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
#+end_src

** Org Agenda
Org Agenda in Emacs is a powerful and flexible tool for managing tasks, appointments, and notes. It provides a dynamic view of scheduled events, deadlines, and TODO items from various Org Mode files, enabling users to organize and prioritize their work effectively. With its customizable views, filters, and sorting options, Org Agenda offers a comprehensive overview of upcoming events and pending tasks, making it an essential feature for staying organized and productive in Emacs.

#+begin_src elisp
  (setq org-agenda-files (append
                          (file-expand-wildcards "~/dox/org/*.org")))
#+end_src

* Misc
Some extra setting, which doesn't fall in any category above.
** Locales
- /Reference: https://www.gnu.org/software/emacs/manual/html_node/elisp/Locales.html/
#+begin_src elisp
  (setq locale-coding-system 'utf-8)
  (set-terminal-coding-system 'utf-8)
  (set-keyboard-coding-system 'utf-8)
  (set-selection-coding-system 'utf-8)
  (prefer-coding-system 'utf-8)
#+end_src