emacs.d

bloated emacs configuration
git clone git://git.ckyln.com/~cem/emacs.d.git
Log | Files | Refs | README

commit 54f02ec622bf69caac6660ce0cbe30eebdf8dff2
parent 2972c0c43b39ca88def5811f35097f30877232a5
Author: Cem Keylan <cem@ckyln.com>
Date:   Wed,  1 Apr 2020 02:43:01 +0300

better use-package usage

Diffstat:
Minit.html | 357+++++++++++++++++++++++++++++++++++++------------------------------------------
Minit.org | 59+++++++++++++++++++++--------------------------------------
2 files changed, 188 insertions(+), 228 deletions(-)

diff --git a/init.html b/init.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> -<!-- 2020-04-01 Wed 02:17 --> +<!-- 2020-04-01 Wed 02:43 --> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Emacs Configuration</title> @@ -222,63 +222,63 @@ <div id="content"> <h1 class="title">Emacs Configuration</h1> -<div id="outline-container-org2d1f648" class="outline-2"> -<h2 id="org2d1f648"><span class="section-number-2">1</span> Table of Contents&#xa0;&#xa0;&#xa0;<span class="tag"><span class="TOC_2_org">TOC_2_org</span></span></h2> +<div id="outline-container-orga06a225" class="outline-2"> +<h2 id="orga06a225"><span class="section-number-2">1</span> Table of Contents&#xa0;&#xa0;&#xa0;<span class="tag"><span class="TOC_2_org">TOC_2_org</span></span></h2> <div class="outline-text-2" id="text-1"> <ul class="org-ul"> -<li><a href="#org5369497">Intro</a> +<li><a href="#org952ba64">Intro</a> <ul class="org-ul"> -<li><a href="#orgcf79123">Installation Instructions</a></li> -<li><a href="#org0878513">Ignoring init.el changes on Git</a></li> -<li><a href="#org3fd88b4">Meta</a></li> -<li><a href="#org56945ca">Attribution</a></li> +<li><a href="#orgea40fdc">Installation Instructions</a></li> +<li><a href="#org46e5b3d">Ignoring init.el changes on Git</a></li> +<li><a href="#org5902905">Meta</a></li> +<li><a href="#orge98bc3b">Attribution</a></li> </ul></li> -<li><a href="#orga5a78f6">Startup Settings</a> +<li><a href="#org29242a3">Startup Settings</a> <ul class="org-ul"> -<li><a href="#orgae2047d">Declutter</a></li> -<li><a href="#org3c6b505">Package management</a></li> -<li><a href="#orgd8b01a5">Custom-file</a></li> -<li><a href="#org735ac6b">Private file</a></li> -<li><a href="#org98af7b2">Starting the server</a></li> +<li><a href="#org45cbd35">Declutter</a></li> +<li><a href="#org82cef3c">Package management</a></li> +<li><a href="#org93627d4">Custom-file</a></li> +<li><a href="#org68eb947">Private file</a></li> +<li><a href="#org7fc693e">Starting the server</a></li> </ul></li> -<li><a href="#org10cc32a">Packages</a> +<li><a href="#orgd094f23">Packages</a> <ul class="org-ul"> -<li><a href="#org3338e06">Evil-mode</a></li> -<li><a href="#orgcffb2ed">Org-mode</a></li> -<li><a href="#orgf783bc2">Magit</a></li> -<li><a href="#orgde8420f">Flycheck</a></li> -<li><a href="#org7dedeec">Company Mode</a></li> -<li><a href="#orgbcc5271">Mingus</a></li> -<li><a href="#orgd39743f">Projectile</a></li> -<li><a href="#org2b34757">Treemacs</a></li> -<li><a href="#orgf5d3ae8">emacs-dashboard</a></li> -<li><a href="#org9a59c8c">Extras</a></li> +<li><a href="#org267e425">Evil-mode</a></li> +<li><a href="#org6411ae0">Org-mode</a></li> +<li><a href="#orge827d77">Magit</a></li> +<li><a href="#org5c519d0">Flycheck</a></li> +<li><a href="#orgbe0bfd2">Company Mode</a></li> +<li><a href="#org5768c8e">Mingus</a></li> +<li><a href="#org563fbfa">Projectile</a></li> +<li><a href="#org3aae9a6">Treemacs</a></li> +<li><a href="#org1b8709e">emacs-dashboard</a></li> +<li><a href="#org8a4efe2">Extras</a></li> </ul></li> -<li><a href="#orgeb25b1a">Themes and Icons</a></li> -<li><a href="#org2a454fa">Filetype Configurations</a> +<li><a href="#org8878d23">Themes and Icons</a></li> +<li><a href="#orged63b08">Filetype Configurations</a> <ul class="org-ul"> -<li><a href="#org1164d5a">Default Formatting</a></li> -<li><a href="#org5573921">Markdown</a></li> -<li><a href="#orgd05bb0c">Shell</a></li> -<li><a href="#org0c28082">Python</a></li> +<li><a href="#org7b4775c">Default Formatting</a></li> +<li><a href="#org80329be">Markdown</a></li> +<li><a href="#org01be50f">Shell</a></li> +<li><a href="#orgca93f4d">Python</a></li> </ul></li> -<li><a href="#orgde6d74f">Other Settings</a> +<li><a href="#org97e1f19">Other Settings</a> <ul class="org-ul"> -<li><a href="#org8c966f6">Dired &#x2013; ls dired</a></li> -<li><a href="#orgb2871d8">Coding System for Terminal</a></li> -<li><a href="#org78d77d0">Backup Options</a></li> -<li><a href="#orgdc99eff">Set Browser</a></li> +<li><a href="#org1a25229">Dired &#x2013; ls dired</a></li> +<li><a href="#org765d3de">Coding System for Terminal</a></li> +<li><a href="#org4985fc2">Backup Options</a></li> +<li><a href="#orge4dfde6">Set Browser</a></li> </ul></li> -<li><a href="#orge5f3801">Notes</a> +<li><a href="#org580c81a">Notes</a> <ul class="org-ul"> -<li><a href="#org4760904">Reverting to package.el</a></li> +<li><a href="#orgb4f11b7">Reverting to package.el</a></li> </ul></li> </ul> </div> </div> -<div id="outline-container-org5369497" class="outline-2"> -<h2 id="org5369497"><span class="section-number-2">2</span> Intro</h2> +<div id="outline-container-org952ba64" class="outline-2"> +<h2 id="org952ba64"><span class="section-number-2">2</span> Intro</h2> <div class="outline-text-2" id="text-2"> <p> This is my emacs configuration file, I used to have a big @@ -294,8 +294,8 @@ might not want on your own setup. </p> </div> -<div id="outline-container-orgcf79123" class="outline-3"> -<h3 id="orgcf79123"><span class="section-number-3">2.1</span> Installation Instructions</h3> +<div id="outline-container-orgea40fdc" class="outline-3"> +<h3 id="orgea40fdc"><span class="section-number-3">2.1</span> Installation Instructions</h3> <div class="outline-text-3" id="text-2-1"> <p> If you want to use my emacs configuration, it is pretty simple @@ -322,8 +322,8 @@ emacs after the initial configuration is done. </div> </div> -<div id="outline-container-org0878513" class="outline-3"> -<h3 id="org0878513"><span class="section-number-3">2.2</span> Ignoring init.el changes on Git</h3> +<div id="outline-container-org46e5b3d" class="outline-3"> +<h3 id="org46e5b3d"><span class="section-number-3">2.2</span> Ignoring init.el changes on Git</h3> <div class="outline-text-3" id="text-2-2"> <p> It can be annoying to see whenever you change your init.org @@ -338,8 +338,8 @@ this by doing </div> </div> -<div id="outline-container-org3fd88b4" class="outline-3"> -<h3 id="org3fd88b4"><span class="section-number-3">2.3</span> Meta</h3> +<div id="outline-container-org5902905" class="outline-3"> +<h3 id="org5902905"><span class="section-number-3">2.3</span> Meta</h3> <div class="outline-text-3" id="text-2-3"> <p> To load init.el properly we run a function such as this. @@ -362,8 +362,8 @@ To load init.el properly we run a function such as this. </div> </div> -<div id="outline-container-org56945ca" class="outline-3"> -<h3 id="org56945ca"><span class="section-number-3">2.4</span> Attribution</h3> +<div id="outline-container-orge98bc3b" class="outline-3"> +<h3 id="orge98bc3b"><span class="section-number-3">2.4</span> Attribution</h3> <div class="outline-text-3" id="text-2-4"> <p> I am still relatively new to the emacs environment myself. These are @@ -384,8 +384,8 @@ file to manage my Emacs configuration. <a href="https://github.com/larstvei/dot- </div> </div> -<div id="outline-container-orga5a78f6" class="outline-2"> -<h2 id="orga5a78f6"><span class="section-number-2">3</span> Startup Settings</h2> +<div id="outline-container-org29242a3" class="outline-2"> +<h2 id="org29242a3"><span class="section-number-2">3</span> Startup Settings</h2> <div class="outline-text-2" id="text-3"> <p> The most important stuff are (for me) is <code>use-package</code> and @@ -394,8 +394,8 @@ bars and menus. Also let's disable the splash screen. </p> </div> -<div id="outline-container-orgae2047d" class="outline-3"> -<h3 id="orgae2047d"><span class="section-number-3">3.1</span> Declutter</h3> +<div id="outline-container-org45cbd35" class="outline-3"> +<h3 id="org45cbd35"><span class="section-number-3">3.1</span> Declutter</h3> <div class="outline-text-3" id="text-3-1"> <div class="org-src-container"> <pre class="src src-emacs-lisp">(menu-bar-mode 0) @@ -417,8 +417,8 @@ defined, and, if they are, will set them to 0. </div> </div> -<div id="outline-container-org3c6b505" class="outline-3"> -<h3 id="org3c6b505"><span class="section-number-3">3.2</span> Package management</h3> +<div id="outline-container-org82cef3c" class="outline-3"> +<h3 id="org82cef3c"><span class="section-number-3">3.2</span> Package management</h3> <div class="outline-text-3" id="text-3-2"> <p> I have switched to straight.el for package management. @@ -445,8 +445,8 @@ to install itself. </div> </div> -<div id="outline-container-org0814efd" class="outline-4"> -<h4 id="org0814efd"><span class="section-number-4">3.2.1</span> use-package</h4> +<div id="outline-container-org3debddc" class="outline-4"> +<h4 id="org3debddc"><span class="section-number-4">3.2.1</span> use-package</h4> <div class="outline-text-4" id="text-3-2-1"> <p> We need use-package for maintaining other packages. @@ -461,8 +461,8 @@ We need use-package for maintaining other packages. </div> </div> -<div id="outline-container-orgd8b01a5" class="outline-3"> -<h3 id="orgd8b01a5"><span class="section-number-3">3.3</span> Custom-file</h3> +<div id="outline-container-org93627d4" class="outline-3"> +<h3 id="org93627d4"><span class="section-number-3">3.3</span> Custom-file</h3> <div class="outline-text-3" id="text-3-3"> <p> I don't like custom variables on my init.el, I prefer having it on @@ -486,8 +486,8 @@ Let's load the custom-file if it is there </div> </div> -<div id="outline-container-org735ac6b" class="outline-3"> -<h3 id="org735ac6b"><span class="section-number-3">3.4</span> Private file</h3> +<div id="outline-container-org68eb947" class="outline-3"> +<h3 id="org68eb947"><span class="section-number-3">3.4</span> Private file</h3> <div class="outline-text-3" id="text-3-4"> <p> Let's load a private file if it exists @@ -503,15 +503,15 @@ Let's load a private file if it exists </div> </div> </div> -<div id="outline-container-org98af7b2" class="outline-3"> -<h3 id="org98af7b2"><span class="section-number-3">3.5</span> Starting the server</h3> +<div id="outline-container-org7fc693e" class="outline-3"> +<h3 id="org7fc693e"><span class="section-number-3">3.5</span> Starting the server</h3> <div class="outline-text-3" id="text-3-5"> <p> I used to have an alias for running emacsclient, now I use a tiny script for it. </p> <div class="org-src-container"> -<pre class="src src-sh" id="org00aa6a9"><span style="color: #62686E;">#</span><span style="color: #62686E;">!/bin/</span><span style="color: #51afef;">sh</span> +<pre class="src src-sh" id="org81b4b0e"><span style="color: #62686E;">#</span><span style="color: #62686E;">!/bin/</span><span style="color: #51afef;">sh</span> <span style="color: #DFDFDF;">EMACSCLIENT_EXTRA_OPTIONS</span>=<span style="color: #7bc275;">"${EMACSCLIENT_EXTRA_OPTIONS}"</span> tty &gt;/dev/null 2&gt;&amp;1 &amp;&amp; <span style="color: #DFDFDF;">EMACSCLIENT_EXTRA_OPTIONS</span>=<span style="color: #7bc275;">"$EMACSCLIENT_EXTRA_OPTIONS -nw"</span> @@ -545,8 +545,8 @@ You can install the generated emc script by doing </div> </div> -<div id="outline-container-org10cc32a" class="outline-2"> -<h2 id="org10cc32a"><span class="section-number-2">4</span> Packages</h2> +<div id="outline-container-orgd094f23" class="outline-2"> +<h2 id="orgd094f23"><span class="section-number-2">4</span> Packages</h2> <div class="outline-text-2" id="text-4"> <p> Now we can continue by loading our packages, those are listed according @@ -554,8 +554,8 @@ to how important they are to me. </p> </div> -<div id="outline-container-org3338e06" class="outline-3"> -<h3 id="org3338e06"><span class="section-number-3">4.1</span> Evil-mode</h3> +<div id="outline-container-org267e425" class="outline-3"> +<h3 id="org267e425"><span class="section-number-3">4.1</span> Evil-mode</h3> <div class="outline-text-3" id="text-4-1"> <p> I am an old vim user, and I do not want to miss out on the beauty of vim @@ -592,8 +592,8 @@ We didn't ask for the keybindings yet, because we are going to get the </div> </div> -<div id="outline-container-org477ea6c" class="outline-4"> -<h4 id="org477ea6c"><span class="section-number-4">4.1.1</span> evil-surround</h4> +<div id="outline-container-org5da1e1f" class="outline-4"> +<h4 id="org5da1e1f"><span class="section-number-4">4.1.1</span> evil-surround</h4> <div class="outline-text-4" id="text-4-1-1"> <p> I used to make use of vim-sandwich, but evil-surround will also @@ -613,14 +613,14 @@ do the job well for me. </div> </div> -<div id="outline-container-orgcffb2ed" class="outline-3"> -<h3 id="orgcffb2ed"><span class="section-number-3">4.2</span> Org-mode</h3> +<div id="outline-container-org6411ae0" class="outline-3"> +<h3 id="org6411ae0"><span class="section-number-3">4.2</span> Org-mode</h3> <div class="outline-text-3" id="text-4-2"> <p> Org mode is one of the biggest reasons I am using Emacs, and it is a must for me. These are my configurations. Starting with the obvious here. I am currently trying to tweak portions of it from Bernt's configuration. See -the <a href="#org56945ca">2.4</a> section. +the <a href="#orge98bc3b">2.4</a> section. </p> <div class="org-src-container"> @@ -679,8 +679,8 @@ the <a href="#org56945ca">2.4</a> section. </div> </div> -<div id="outline-container-org8da62ff" class="outline-4"> -<h4 id="org8da62ff"><span class="section-number-4">4.2.1</span> evil-org</h4> +<div id="outline-container-org8e13a6f" class="outline-4"> +<h4 id="org8e13a6f"><span class="section-number-4">4.2.1</span> evil-org</h4> <div class="outline-text-4" id="text-4-2-1"> <p> I am quite serious on this vim stuff now. I want it everywhere. @@ -707,8 +707,8 @@ further. </div> </div> -<div id="outline-container-orgf783bc2" class="outline-3"> -<h3 id="orgf783bc2"><span class="section-number-3">4.3</span> Magit</h3> +<div id="outline-container-orge827d77" class="outline-3"> +<h3 id="orge827d77"><span class="section-number-3">4.3</span> Magit</h3> <div class="outline-text-3" id="text-4-3"> <p> I like magit, it is quite useful when you don't want to leave emacs and @@ -724,8 +724,8 @@ along with it. </div> </div> -<div id="outline-container-org6e1a3ec" class="outline-4"> -<h4 id="org6e1a3ec"><span class="section-number-4">4.3.1</span> evil-magit</h4> +<div id="outline-container-org11ffe33" class="outline-4"> +<h4 id="org11ffe33"><span class="section-number-4">4.3.1</span> evil-magit</h4> <div class="outline-text-4" id="text-4-3-1"> <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">evil-magit</span> @@ -738,8 +738,8 @@ along with it. </div> </div> -<div id="outline-container-orgde8420f" class="outline-3"> -<h3 id="orgde8420f"><span class="section-number-3">4.4</span> Flycheck</h3> +<div id="outline-container-org5c519d0" class="outline-3"> +<h3 id="org5c519d0"><span class="section-number-3">4.4</span> Flycheck</h3> <div class="outline-text-3" id="text-4-4"> <p> I use flycheck for async syntax and error checking. It can be really useful @@ -750,16 +750,14 @@ hacky and buggy on Vim. <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">flycheck</span> <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:config</span> - (<span style="color: #51afef;">setq-default</span> flycheck-disabled-checkers '(emacs-lisp-checkdoc)) - <span style="color: #C57BDB;">:init</span> (global-flycheck-mode)) + <span style="color: #C57BDB;">:config</span> (global-flycheck-mode)) </pre> </div> </div> </div> -<div id="outline-container-org7dedeec" class="outline-3"> -<h3 id="org7dedeec"><span class="section-number-3">4.5</span> Company Mode</h3> +<div id="outline-container-orgbe0bfd2" class="outline-3"> +<h3 id="orgbe0bfd2"><span class="section-number-3">4.5</span> Company Mode</h3> <div class="outline-text-3" id="text-4-5"> <p> Company is a tool that I am still very unfamiliar with. I used to @@ -777,8 +775,8 @@ much yet. Pretty simple config. </div> </div> -<div id="outline-container-org9cf88a7" class="outline-4"> -<h4 id="org9cf88a7"><span class="section-number-4">4.5.1</span> Company LSP</h4> +<div id="outline-container-orgebd96a8" class="outline-4"> +<h4 id="orgebd96a8"><span class="section-number-4">4.5.1</span> Company LSP</h4> <div class="outline-text-4" id="text-4-5-1"> <p> I am using Company's own Language Server Protocol. It is good as @@ -797,8 +795,8 @@ far as I can wrap my head-around. </div> </div> -<div id="outline-container-orgbcc5271" class="outline-3"> -<h3 id="orgbcc5271"><span class="section-number-3">4.6</span> Mingus</h3> +<div id="outline-container-org5768c8e" class="outline-3"> +<h3 id="org5768c8e"><span class="section-number-3">4.6</span> Mingus</h3> <div class="outline-text-3" id="text-4-6"> <p> Mingus is an <a href="https://musicpd.org">MPD</a> client for the Emacs operating system. It has a rather @@ -812,8 +810,8 @@ simple, straightforward interface. </div> </div> </div> -<div id="outline-container-orgd39743f" class="outline-3"> -<h3 id="orgd39743f"><span class="section-number-3">4.7</span> Projectile</h3> +<div id="outline-container-org563fbfa" class="outline-3"> +<h3 id="org563fbfa"><span class="section-number-3">4.7</span> Projectile</h3> <div class="outline-text-3" id="text-4-7"> <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">projectile</span> @@ -824,13 +822,12 @@ simple, straightforward interface. </div> </div> </div> -<div id="outline-container-org2b34757" class="outline-3"> -<h3 id="org2b34757"><span class="section-number-3">4.8</span> Treemacs</h3> +<div id="outline-container-org3aae9a6" class="outline-3"> +<h3 id="org3aae9a6"><span class="section-number-3">4.8</span> Treemacs</h3> <div class="outline-text-3" id="text-4-8"> <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">treemacs</span> <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:defines</span> treemacs-no-png-images <span style="color: #C57BDB;">:bind</span> (<span style="color: #7bc275;">"C-c t"</span> . treemacs) <span style="color: #C57BDB;">:custom</span> (treemacs-no-png-images t)) @@ -853,7 +850,7 @@ simple, straightforward interface. </div> <ol class="org-ol"> -<li><a id="org078f070"></a>Keybindings<br /> +<li><a id="org3d852bd"></a>Keybindings<br /> <div class="outline-text-5" id="text-4-8-0-1"> <p> These tables are taken from the <a href="https://github.com/Alexander-Miller/treemacs">Treemacs Github page</a> @@ -962,8 +959,8 @@ These tables are taken from the <a href="https://github.com/Alexander-Miller/tre </ol> </div> -<div id="outline-container-orgf5d3ae8" class="outline-3"> -<h3 id="orgf5d3ae8"><span class="section-number-3">4.9</span> emacs-dashboard</h3> +<div id="outline-container-org1b8709e" class="outline-3"> +<h3 id="org1b8709e"><span class="section-number-3">4.9</span> emacs-dashboard</h3> <div class="outline-text-3" id="text-4-9"> <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">dashboard</span> @@ -980,16 +977,16 @@ These tables are taken from the <a href="https://github.com/Alexander-Miller/tre </div> </div> </div> -<div id="outline-container-org9a59c8c" class="outline-3"> -<h3 id="org9a59c8c"><span class="section-number-3">4.10</span> Extras</h3> +<div id="outline-container-org8a4efe2" class="outline-3"> +<h3 id="org8a4efe2"><span class="section-number-3">4.10</span> Extras</h3> <div class="outline-text-3" id="text-4-10"> <p> These don't really deserve their own sections, but I prefer to use them. </p> </div> -<div id="outline-container-orgd09fd32" class="outline-4"> -<h4 id="orgd09fd32"><span class="section-number-4">4.10.1</span> sudo-edit</h4> +<div id="outline-container-org12fd829" class="outline-4"> +<h4 id="org12fd829"><span class="section-number-4">4.10.1</span> sudo-edit</h4> <div class="outline-text-4" id="text-4-10-1"> <p> This is a package for re-initiating a file as root. @@ -1002,8 +999,8 @@ This is a package for re-initiating a file as root. </div> </div> -<div id="outline-container-org4a61b4d" class="outline-4"> -<h4 id="org4a61b4d"><span class="section-number-4">4.10.2</span> linum-relative</h4> +<div id="outline-container-org4fdc2e3" class="outline-4"> +<h4 id="org4fdc2e3"><span class="section-number-4">4.10.2</span> linum-relative</h4> <div class="outline-text-4" id="text-4-10-2"> <p> I just like seeing the current line number and the relatives of @@ -1013,34 +1010,17 @@ the other lines. <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">linum-relative</span> <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:init</span> - (<span style="color: #51afef;">setq</span> linum-relative-current-symbol <span style="color: #7bc275;">""</span>) - (global-set-key (kbd <span style="color: #7bc275;">"C-C r"</span>) 'linum-relative-mode) - <span style="color: #C57BDB;">:config</span> (linum-relative-mode 1)) + <span style="color: #C57BDB;">:bind</span> (<span style="color: #7bc275;">"C-c r"</span> . linum-relative-mode) + <span style="color: #C57BDB;">:custom</span> (linum-relative-current-symbol <span style="color: #7bc275;">""</span>)) </pre> </div> </div> </div> -<div id="outline-container-org58b0e5b" class="outline-4"> -<h4 id="org58b0e5b"><span class="section-number-4">4.10.3</span> elfeed</h4> +<div id="outline-container-org797936d" class="outline-4"> +<h4 id="org797936d"><span class="section-number-4">4.10.3</span> markdown-mode</h4> <div class="outline-text-4" id="text-4-10-3"> <p> -I have elfeed which I have connected to my Nextcloud account, it -is nice to have something synced. -</p> - -<div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">elfeed</span> <span style="color: #C57BDB;">:straight</span> t) -</pre> -</div> -</div> -</div> - -<div id="outline-container-org1405c17" class="outline-4"> -<h4 id="org1405c17"><span class="section-number-4">4.10.4</span> markdown-mode</h4> -<div class="outline-text-4" id="text-4-10-4"> -<p> I sometimes use this to test the HTML output of markdown documents that I write. </p> @@ -1054,9 +1034,9 @@ that I write. </div> </div> -<div id="outline-container-org465afd0" class="outline-4"> -<h4 id="org465afd0"><span class="section-number-4">4.10.5</span> htmlize</h4> -<div class="outline-text-4" id="text-4-10-5"> +<div id="outline-container-orgc1b4b06" class="outline-4"> +<h4 id="orgc1b4b06"><span class="section-number-4">4.10.4</span> htmlize</h4> +<div class="outline-text-4" id="text-4-10-4"> <p> I sometimes output html from org-mode as it comes handy. We use htmlize for that. @@ -1069,9 +1049,9 @@ that. </div> </div> -<div id="outline-container-org6db7e3c" class="outline-4"> -<h4 id="org6db7e3c"><span class="section-number-4">4.10.6</span> toc-org</h4> -<div class="outline-text-4" id="text-4-10-6"> +<div id="outline-container-orgc115b79" class="outline-4"> +<h4 id="orgc115b79"><span class="section-number-4">4.10.5</span> toc-org</h4> +<div class="outline-text-4" id="text-4-10-5"> <p> I want to have a basic table-of-contents generation on my org-files even without exporting the file itself. This is also useful for the @@ -1081,8 +1061,7 @@ Github README. <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">toc-org</span> <span style="color: #C57BDB;">:straight</span> t - <span style="color: #C57BDB;">:config</span> - (add-hook 'org-mode-hook 'toc-org-mode)) + <span style="color: #C57BDB;">:hook</span> org-mode) </pre> </div> </div> @@ -1090,8 +1069,8 @@ Github README. </div> </div> -<div id="outline-container-orgeb25b1a" class="outline-2"> -<h2 id="orgeb25b1a"><span class="section-number-2">5</span> Themes and Icons</h2> +<div id="outline-container-org8878d23" class="outline-2"> +<h2 id="org8878d23"><span class="section-number-2">5</span> Themes and Icons</h2> <div class="outline-text-2" id="text-5"> <p> I used to make use of my Xresources themes, but I sometimes sadly @@ -1100,8 +1079,8 @@ time. </p> </div> -<div id="outline-container-orgaee2751" class="outline-4"> -<h4 id="orgaee2751"><span class="section-number-4">5.0.1</span> Doom themes</h4> +<div id="outline-container-org3d5e4d1" class="outline-4"> +<h4 id="org3d5e4d1"><span class="section-number-4">5.0.1</span> Doom themes</h4> <div class="outline-text-4" id="text-5-0-1"> <p> I want to use the default doom-theme (perhaps I can switch to @@ -1117,14 +1096,12 @@ The 'if' statement makes sure we have <span style="color: #C57BDB;">:after</span> all-the-icons <span style="color: #C57BDB;">:straight</span> t <span style="color: #C57BDB;">:functions</span> doom-themes-org-config doom-themes-treemacs-config + <span style="color: #C57BDB;">:custom</span> + (doom-themes-enable-bold t) + (doom-themes-enable-italic t) + (doom-themes-treemacs-theme <span style="color: #7bc275;">"doom-colors"</span>) <span style="color: #C57BDB;">:config</span> - (<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">doom-themes-treemacs-theme</span>) - (<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">doom-themes-enable-bold</span>) - (<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">doom-themes-enable-italic</span>) - (<span style="color: #51afef;">setq</span> doom-themes-enable-bold t - doom-themes-enable-italic t) (load-theme 'doom-vibrant t) - (<span style="color: #51afef;">setq</span> doom-themes-treemacs-theme <span style="color: #7bc275;">"doom-colors"</span>) (doom-themes-treemacs-config) (doom-themes-org-config)) </pre> @@ -1132,8 +1109,8 @@ The 'if' statement makes sure we have </div> </div> -<div id="outline-container-org2679980" class="outline-4"> -<h4 id="org2679980"><span class="section-number-4">5.0.2</span> All the icons</h4> +<div id="outline-container-org4ac70d0" class="outline-4"> +<h4 id="org4ac70d0"><span class="section-number-4">5.0.2</span> All the icons</h4> <div class="outline-text-4" id="text-5-0-2"> <p> All the icons is an icon-pack. I mean it probably isn't hard to @@ -1148,8 +1125,8 @@ guess. Pretty straightforward. </div> </div> </div> -<div id="outline-container-org2a454fa" class="outline-2"> -<h2 id="org2a454fa"><span class="section-number-2">6</span> Filetype Configurations</h2> +<div id="outline-container-orged63b08" class="outline-2"> +<h2 id="orged63b08"><span class="section-number-2">6</span> Filetype Configurations</h2> <div class="outline-text-2" id="text-6"> <p> I would like to have some different configurations for filetypes. Those @@ -1157,8 +1134,8 @@ are for indents and spaces, mostly. </p> </div> -<div id="outline-container-org1164d5a" class="outline-3"> -<h3 id="org1164d5a"><span class="section-number-3">6.1</span> Default Formatting</h3> +<div id="outline-container-org7b4775c" class="outline-3"> +<h3 id="org7b4775c"><span class="section-number-3">6.1</span> Default Formatting</h3> <div class="outline-text-3" id="text-6-1"> <p> Here is the default formatting for most files. I don't like tabs as indents @@ -1174,46 +1151,43 @@ so I avoid them wherever I can. </div> </div> -<div id="outline-container-org5573921" class="outline-3"> -<h3 id="org5573921"><span class="section-number-3">6.2</span> Markdown</h3> +<div id="outline-container-org80329be" class="outline-3"> +<h3 id="org80329be"><span class="section-number-3">6.2</span> Markdown</h3> <div class="outline-text-3" id="text-6-2"> <p> For markdown, I want to have 4 spaces as an indentation. </p> <div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">md-indent-tabs-mode</span>) -(<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">md-tab-width</span>) -(<span style="color: #51afef;">setq</span> - md-indent-tabs-mode nil - md-tab-width 4 -) +<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">markdown-mode</span> + <span style="color: #C57BDB;">:straight</span> t + <span style="color: #C57BDB;">:custom</span> + (md-indent-tabs-mode nil) + (md-tab-width 4)) </pre> </div> </div> </div> -<div id="outline-container-orgd05bb0c" class="outline-3"> -<h3 id="orgd05bb0c"><span class="section-number-3">6.3</span> Shell</h3> +<div id="outline-container-org01be50f" class="outline-3"> +<h3 id="org01be50f"><span class="section-number-3">6.3</span> Shell</h3> <div class="outline-text-3" id="text-6-3"> <p> For shell, I want to have 4 spaces as an indentation. </p> <div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">sh-indent-tabs-mode</span>) -(<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">sh-tab-width</span>) -(<span style="color: #51afef;">setq</span> - sh-indent-tabs-mode nil - sh-tab-width 4 +<pre class="src src-emacs-lisp">(<span style="color: #51afef;">setq</span> + sh-indent-tabs-mode nil + sh-tab-width 4 ) </pre> </div> </div> </div> -<div id="outline-container-org0c28082" class="outline-3"> -<h3 id="org0c28082"><span class="section-number-3">6.4</span> Python</h3> +<div id="outline-container-orgca93f4d" class="outline-3"> +<h3 id="orgca93f4d"><span class="section-number-3">6.4</span> Python</h3> <div class="outline-text-3" id="text-6-4"> <p> I use the django framework quite frequently at work. So I want a few packages @@ -1221,8 +1195,8 @@ for that as well. </p> </div> -<div id="outline-container-org08a2f84" class="outline-4"> -<h4 id="org08a2f84"><span class="section-number-4">6.4.1</span> Company jedi</h4> +<div id="outline-container-org3d9828a" class="outline-4"> +<h4 id="org3d9828a"><span class="section-number-4">6.4.1</span> Company jedi</h4> <div class="outline-text-4" id="text-6-4-1"> <p> Company jedi is for better completion while I am editing python files. Here @@ -1233,7 +1207,7 @@ is the use-package <pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">company-jedi</span> <span style="color: #C57BDB;">:straight</span> t <span style="color: #C57BDB;">:after</span> company - <span style="color: #C57BDB;">:config</span> + <span style="color: #C57BDB;">:init</span> (add-to-list 'company-backends 'company-jedi)) </pre> </div> @@ -1241,8 +1215,8 @@ is the use-package </div> </div> </div> -<div id="outline-container-orgde6d74f" class="outline-2"> -<h2 id="orgde6d74f"><span class="section-number-2">7</span> Other Settings</h2> +<div id="outline-container-org97e1f19" class="outline-2"> +<h2 id="org97e1f19"><span class="section-number-2">7</span> Other Settings</h2> <div class="outline-text-2" id="text-7"> <p> Those are small settings for emacs that I cannot categorize but have importance @@ -1250,8 +1224,8 @@ for me. </p> </div> -<div id="outline-container-org8c966f6" class="outline-3"> -<h3 id="org8c966f6"><span class="section-number-3">7.1</span> Dired &#x2013; ls dired</h3> +<div id="outline-container-org1a25229" class="outline-3"> +<h3 id="org1a25229"><span class="section-number-3">7.1</span> Dired &#x2013; ls dired</h3> <div class="outline-text-3" id="text-7-1"> <p> I use suckless.org's <code>sbase</code> as my coreutils. The <code>ls</code> program that I use does @@ -1259,15 +1233,16 @@ not have a <code>--dired</code> option. Let's disable it. </p> <div class="org-src-container"> -<pre class="src src-emacs-lisp">(<span style="color: #51afef;">defvar</span> <span style="color: #DFDFDF;">dired-use-ls-dired</span>) -(<span style="color: #51afef;">setq</span> dired-use-ls-dired nil) +<pre class="src src-emacs-lisp">(<span style="color: #51afef;">use-package</span> <span style="color: #a991f1;">dired-explorer</span> + <span style="color: #C57BDB;">:straight</span> t + <span style="color: #C57BDB;">:custom</span> (dired-use-ls-dired nil)) </pre> </div> </div> </div> -<div id="outline-container-orgb2871d8" class="outline-3"> -<h3 id="orgb2871d8"><span class="section-number-3">7.2</span> Coding System for Terminal</h3> +<div id="outline-container-org765d3de" class="outline-3"> +<h3 id="org765d3de"><span class="section-number-3">7.2</span> Coding System for Terminal</h3> <div class="outline-text-3" id="text-7-2"> <p> I want emacs to use utf-8 so my terminal isn't filled with '?' characters. @@ -1278,8 +1253,8 @@ I want emacs to use utf-8 so my terminal isn't filled with '?' characters. </div> </div> </div> -<div id="outline-container-org78d77d0" class="outline-3"> -<h3 id="org78d77d0"><span class="section-number-3">7.3</span> Backup Options</h3> +<div id="outline-container-org4985fc2" class="outline-3"> +<h3 id="org4985fc2"><span class="section-number-3">7.3</span> Backup Options</h3> <div class="outline-text-3" id="text-7-3"> <div class="org-src-container"> <pre class="src src-emacs-lisp">(<span style="color: #51afef;">setq</span> backup-directory-alist `((<span style="color: #7bc275;">"."</span> . <span style="color: #7bc275;">"~/.cache/emacs/saves"</span>))) @@ -1288,8 +1263,8 @@ I want emacs to use utf-8 so my terminal isn't filled with '?' characters. </div> </div> -<div id="outline-container-orgdc99eff" class="outline-3"> -<h3 id="orgdc99eff"><span class="section-number-3">7.4</span> Set Browser</h3> +<div id="outline-container-orge4dfde6" class="outline-3"> +<h3 id="orge4dfde6"><span class="section-number-3">7.4</span> Set Browser</h3> <div class="outline-text-3" id="text-7-4"> <p> I am setting the default browser from the BROWSER environment variable @@ -1306,15 +1281,15 @@ so that I don't have to keep track of it in case I ever change my browser. </div> </div> </div> -<div id="outline-container-orge5f3801" class="outline-2"> -<h2 id="orge5f3801"><span class="section-number-2">8</span> Notes</h2> +<div id="outline-container-org580c81a" class="outline-2"> +<h2 id="org580c81a"><span class="section-number-2">8</span> Notes</h2> <div class="outline-text-2" id="text-8"> </div> -<div id="outline-container-org4760904" class="outline-3"> -<h3 id="org4760904"><span class="section-number-3">8.1</span> Reverting to package.el</h3> +<div id="outline-container-orgb4f11b7" class="outline-3"> +<h3 id="orgb4f11b7"><span class="section-number-3">8.1</span> Reverting to package.el</h3> <div class="outline-text-3" id="text-8-1"> <p> -You can always revert back to <code>package.el</code> by replacing the <a href="#org3c6b505">3.2</a> +You can always revert back to <code>package.el</code> by replacing the <a href="#org82cef3c">3.2</a> section with the following configuration steps. This can be for many reasons. For example I have reverted to package.el on my old laptop where I don't want deal with compilation, and I don't want to keep git repositories of every package @@ -1323,8 +1298,8 @@ about the internals of straight. </p> </div> -<div id="outline-container-orgaf67677" class="outline-4"> -<h4 id="orgaf67677"><span class="section-number-4">8.1.1</span> Replacing the bootstrap command</h4> +<div id="outline-container-orgb7350c9" class="outline-4"> +<h4 id="orgb7350c9"><span class="section-number-4">8.1.1</span> Replacing the bootstrap command</h4> <div class="outline-text-4" id="text-8-1-1"> <p> You need to replace the <code>straight.el</code> package manager bootstrapper. This is @@ -1352,8 +1327,8 @@ as it works with package.el </div> </div> -<div id="outline-container-orgdbe58ec" class="outline-4"> -<h4 id="orgdbe58ec"><span class="section-number-4">8.1.2</span> Making use-package work with package.el</h4> +<div id="outline-container-orgbece6b6" class="outline-4"> +<h4 id="orgbece6b6"><span class="section-number-4">8.1.2</span> Making use-package work with package.el</h4> <div class="outline-text-4" id="text-8-1-2"> <p> Now, replace the second code-block in the section with the following @@ -1364,6 +1339,8 @@ commands. <pre class="src src-emacs-lisp">(<span style="color: #51afef;">unless</span> (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) + +(<span style="color: #51afef;">require</span> '<span style="color: #a991f1;">use-package</span>) </pre> </div> @@ -1384,7 +1361,7 @@ run the following command. </div> <div id="postamble" class="status"> <p class="author">Author: Cem Keylan</p> -<p class="date">Created: 2020-04-01 Wed 02:17</p> +<p class="date">Created: 2020-04-01 Wed 02:43</p> <p class="validation"><a href="https://validator.w3.org/check?uri=referer">Validate</a></p> </div> </body> diff --git a/init.org b/init.org @@ -383,9 +383,7 @@ hacky and buggy on Vim. #+BEGIN_SRC emacs-lisp (use-package flycheck :straight t - :config - (setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc)) - :init (global-flycheck-mode)) + :config (global-flycheck-mode)) #+END_SRC ** Company Mode @@ -434,7 +432,6 @@ simple, straightforward interface. #+BEGIN_SRC emacs-lisp (use-package treemacs :straight t - :defines treemacs-no-png-images :bind ("C-c t" . treemacs) :custom (treemacs-no-png-images t)) @@ -507,19 +504,8 @@ the other lines. #+BEGIN_SRC emacs-lisp (use-package linum-relative :straight t - :init - (setq linum-relative-current-symbol "") - (global-set-key (kbd "C-C r") 'linum-relative-mode) - :config (linum-relative-mode 1)) -#+END_SRC - -*** elfeed - -I have elfeed which I have connected to my Nextcloud account, it -is nice to have something synced. - -#+BEGIN_SRC emacs-lisp - (use-package elfeed :straight t) + :bind ("C-c r" . linum-relative-mode) + :custom (linum-relative-current-symbol "")) #+END_SRC *** markdown-mode @@ -551,8 +537,7 @@ Github README. #+BEGIN_SRC emacs-lisp (use-package toc-org :straight t - :config - (add-hook 'org-mode-hook 'toc-org-mode)) + :hook org-mode) #+END_SRC * Themes and Icons @@ -571,14 +556,12 @@ The 'if' statement makes sure we have :after all-the-icons :straight t :functions doom-themes-org-config doom-themes-treemacs-config + :custom + (doom-themes-enable-bold t) + (doom-themes-enable-italic t) + (doom-themes-treemacs-theme "doom-colors") :config - (defvar doom-themes-treemacs-theme) - (defvar doom-themes-enable-bold) - (defvar doom-themes-enable-italic) - (setq doom-themes-enable-bold t - doom-themes-enable-italic t) (load-theme 'doom-vibrant t) - (setq doom-themes-treemacs-theme "doom-colors") (doom-themes-treemacs-config) (doom-themes-org-config)) #+END_SRC @@ -613,12 +596,11 @@ so I avoid them wherever I can. For markdown, I want to have 4 spaces as an indentation. #+BEGIN_SRC emacs-lisp - (defvar md-indent-tabs-mode) - (defvar md-tab-width) - (setq - md-indent-tabs-mode nil - md-tab-width 4 - ) + (use-package markdown-mode + :straight t + :custom + (md-indent-tabs-mode nil) + (md-tab-width 4)) #+END_SRC ** Shell @@ -626,11 +608,9 @@ For markdown, I want to have 4 spaces as an indentation. For shell, I want to have 4 spaces as an indentation. #+BEGIN_SRC emacs-lisp - (defvar sh-indent-tabs-mode) - (defvar sh-tab-width) (setq - sh-indent-tabs-mode nil - sh-tab-width 4 + sh-indent-tabs-mode nil + sh-tab-width 4 ) #+END_SRC @@ -646,7 +626,7 @@ is the use-package (use-package company-jedi :straight t :after company - :config + :init (add-to-list 'company-backends 'company-jedi)) #+END_SRC * Other Settings @@ -660,8 +640,9 @@ I use suckless.org's =sbase= as my coreutils. The =ls= program that I use does not have a =--dired= option. Let's disable it. #+BEGIN_SRC emacs-lisp - (defvar dired-use-ls-dired) - (setq dired-use-ls-dired nil) + (use-package dired-explorer + :straight t + :custom (dired-use-ls-dired nil)) #+END_SRC ** Coding System for Terminal @@ -723,6 +704,8 @@ commands. (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) + + (require 'use-package) #+END_SRC There is also the final step, which is the most important one. Replacing the use-package =:straight=