From fd5ba4a1a51e7ace900444b28b378f521bdfdbff Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Tue, 8 Nov 2022 17:53:04 +0000 Subject: [PATCH] Initial commit --- .gitignore | 4 +++ init.el | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 .gitignore create mode 100644 init.el diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14a7768 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +eln-cache/ +auto-save-list/ +straight/ +elpa/ \ No newline at end of file diff --git a/init.el b/init.el new file mode 100644 index 0000000..4d3aa43 --- /dev/null +++ b/init.el @@ -0,0 +1,77 @@ +;; Disable Emacs window resizing at startup +(setq frame-resize-pixelwise t) + +;; Remove the startup screen +(setq inhibit-startup-message t) + +;; Disable some GTK decoration +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) + +;; Enable line numbers globally +(global-display-line-numbers-mode 1) + +;; Add the melpa package repository and initialize package repositories +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(package-initialize) + +;; Straight.el bootstrap +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 6)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + +;; Install use-package for simplicity, and use straight.el for it by default +(straight-use-package 'use-package) +(setq straight-use-package-by-default t) + +;; Install the Doom Emacs theme megapack. +(use-package doom-themes + :ensure t + :config + (setq doom-themes-enable-bold t + doom-themes-enable-italic t) + (doom-themes-treemacs-config) + (doom-themes-org-config)) + +;; Don't enable package.el at startup +(setq package-enable-at-startup nil) + +;; Set theme to doom-tokyo-night, Dianicemacs' default +(load-theme 'doom-tokyo-night t) + +;; Vi layer inside of Emacs +(use-package evil + :config + (evil-mode 1)) + +;; Keep packages up to date +(use-package auto-package-update + :config + (setq auto-package-update-delete-old-versions t) + (setq auto-package-update-hide-results t) + (auto-package-update-maybe)) + +;; Custom variables set by user +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages '(use-package))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + )