#+begin_html
<p align="center">
  <img width="100%" src="images/banner.png" alt="BannerImg">
</p>
<h1 align="center">Arsenic's Emacs</h1>
#+end_html

The configuration is mostly inspired from  [[https://github.com/daviwil/emacs-from-scratch][David willson's emacs from scratch series]] and [[https://github.com/MatthewZMD/.emacs.d][Mingde (Matthew) Zeng's M-Emacs]], plus some extensions to make it fit for my personal workflow and C/C++ development needs.

most of the packages are set up using [[https://github.com/jwiegley/use-package][use-package]] declarations, and should make sure to download and install the packages before using it, so you don't have to do it manually. This also means that it might take a *lot of time* the first time you try to set it up.

I personally use [[https://github.com/d12frosted/homebrew-emacs-plus][emacs-plus]] with support for [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Native-Compilation.html][native compilation]] and [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Xwidgets.html][Xwidgets]] support enabled, the configuration should not break otherwise also so if it does, please report it via opening an issue.

** Requirements

- [[https://www.gnu.org/software/emacs/download.html][GNU Emacs]] (version >= 27) ( tested on GNU Emacs 29.0.60 )
- (optional) [[https://github.com/tonsky/FiraCode][FIra code font]] : you may change font to your preferred one ( see [[./elisp/init-font.el][./elisp/init-font.el]] )

** Repository structure

#+BEGIN_SRC
emacs-config
├── elisp/
│   └── init-<package-name>.el
├── non-melpa-elisp/
│   └──  packages that are not installed from MELPA
└── init.el
#+END_SRC

- Initialization for similar modes exist in their own =./elisp/init-<package-name>.el= file which is then loaded by the main init.el
- [[./init.el][init.el]] only initializes the load path and then loads all the configurations from =./elisp/= directory using =(require 'init-<package-name>)=
- All The packages download from elpa repositories ( MELPA or GNU-ELPA ) should exist in their default location ( generally =./elpa/= )
- All the packages that are not available on ELPA repository but are used by this config exist in [[./non-melpa-elisp][=./non-melpa-elisp/=]] directory

** Screenshots

[[./images/ss1.png]]
[[./images/ss2.png]]

** How to use it ?

 1. *clone/download*
    - Non MELPA packages are provided with the repository as git submodules, you may use =--recurse-submodules= to initialize and update those submodules at the time of pulling.

    - MELPA packages are not provided and should be installed by =(use-package)= at the time of initial startup in the  appropriate directory ( generally in =elpa/= )

    - Here is how the sequence of commands should look like

     #+BEGIN_SRC bash
     git clone --recurse-submodules https://github.com/Arsenic-ATG/Emacs-config.git
     cd Emacs-config
     #+END_SRC

 2. *load the init file:*\\
        Now you would want to use the provided init file (=init.el=) instead of using it's own default init file which could be either =~/.emacs.el= or another =.init.el= file, check [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Find-Init.html][this link]] for more information about how to locate your initialization file . This can be done in 2 ways
    - Replace your default user directory (=~/.emacs.d=) with repository ( you might want to keep a backup of your old config if you go for this option).
    - Prevent emacs to load your local init file and use this file instead ( using =-q= and =-u= switches )
    read [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html][this official doc]] for more detailed info about the same.

 3. *Start your Emacs:*\\
        When launched for the first time, it might take more time than expected as on initial startup =(use-package)= will download and install all the packages ( so make sure to have stable connection to MELPA/GNU-ELPA package repositories )

 4. *(optional) Restart Emacs:*\\
        When all the packages are installed then you may restart the emacs to make sure =(use-package)= did it job correctly.

** Doubts / Query
feel free to open an issue on GitHub if you face any issue during the installation or have any query regarding the configuration.

** Suggestions for possible improvements ?
You are more than welcome to leave your suggestions via an Issue or a Pull Request, I would love to hear from you experts out there.

* License

All code found in this repository is licensed under  [[./LICENSE][GPL v3]].
