From 8a82a3b03cb156638bb2344d62a24deab288c497 Mon Sep 17 00:00:00 2001
From: ThanosApollo <apollothanosmd@gmail.com>
Date: Tue, 25 Oct 2022 14:03:18 +0300
Subject: Add custom init.el

---
 Developer/emacs/init.el | 194 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 194 insertions(+)
 create mode 100644 Developer/emacs/init.el

diff --git a/Developer/emacs/init.el b/Developer/emacs/init.el
new file mode 100644
index 0000000..0911bf3
--- /dev/null
+++ b/Developer/emacs/init.el
@@ -0,0 +1,194 @@
+
+
+ (setq inhibit-startup-message t)
+
+ (scroll-bar-mode -1)
+ (tool-bar-mode -1)
+ (tooltip-mode -1)
+ (set-fringe-mode 10)
+
+ (menu-bar-mode -1)
+
+ ;Visible bell
+ (setq visible-bell t)
+
+ ;Fonts
+ (set-face-attribute 'default nil :font "JetBrains Mono" :height 130)
+
+
+ ;Make ESC quit prompts
+ (global-set-key (kbd "<escape>") 'keyboard-escape-quit)
+ ;Initialize packages sources
+ (require 'package)
+
+ (setq package-archives '(("melpa" . "https://melpa.org/packages/")
+ 		 ("org" . "https://orgmode.org/elpa/")
+ 		 ("elpa" . "https://elpa.gnu.org/packages/")))
+
+ (package-initialize)
+ (unless package-archive-contents
+  (package-refresh-contents))
+
+ (unless (package-installed-p 'use-package)
+  (package-install 'use-package))
+
+ (require 'use-package)
+ (setq use-package-always-ensure t)
+
+ (use-package command-log-mode)
+(use-package counsel
+  :bind (("M-x" . counsel-M-x)
+	 ("C-x b" . counsel-ibuffer)
+	 ("C-x C-f" . counsel-find-file)
+	 :map minibuffer-local-map
+	 ("C-r" . 'counsel-minibuffer-history))
+  :config
+  (setq ivy-initial-inputs-alist nil)) ;;No symbol at search
+
+ (use-package ivy
+  :diminish
+  :bind (("C-s" . swiper)
+  :map ivy-minibuffer-map
+  ("TAB" . ivy-alt-done)
+  ("C-l" . ivy-alt-done)
+  ("C-j" . ivy-next-line)
+  ("C-k" . ivy-previous-line)
+  :map ivy-switch-buffer-map
+  ("C-k" . ivy-previous-line)
+  ("C-l" . ivy-done)
+  ("C-d" . ivy-switch-buffer-kill)
+  :map ivy-reverse-i-search-map
+  ("C-k" . ivy-previous-line)
+  ("C-d" . ivy-reverse-i-search-kill))
+  :config
+  (ivy-mode 1))
+
+
+(use-package all-the-icons
+  :ensure t)
+
+
+(use-package doom-modeline
+  :ensure t
+  :init (doom-modeline-mode 1)
+  :custom ((doom-modeline-height 35)))
+
+(global-set-key (kbd "C-x C-b") 'ibuffer)
+(define-key (current-global-map) (kbd "C-c e") 'eval-buffer)
+
+;;themes
+(use-package doom-themes)
+(load-theme 'doom-dracula t)
+
+;;maggit
+(use-package magit)
+
+
+;;org
+(defun org-insert-src-block (src-code-type)
+  "Insert a `SRC-CODE-TYPE' type source code block in org-mode."
+  (interactive
+   (let ((src-code-types
+          '("emacs-lisp" "python" "C" "sh" "java" "js" "clojure" "C++" "css"
+            "calc" "asymptote" "dot" "gnuplot" "ledger" "lilypond" "mscgen"
+            "octave" "oz" "plantuml" "R" "sass" "screen" "sql" "awk" "ditaa"
+            "haskell" "latex" "lisp" "matlab" "ocaml" "org" "perl" "ruby"
+            "scheme" "sqlite")))
+     (list (ido-completing-read "Source code type: " src-code-types))))
+  (progn
+    (newline-and-indent)
+    (insert (format "#+BEGIN_SRC %s\n" src-code-type))
+    (newline-and-indent)
+    (insert "#+END_SRC\n")
+    (previous-line 2)
+    (org-edit-src-code)))
+
+;;lines
+(column-number-mode)
+(global-display-line-numbers-mode t)
+(menu-bar--display-line-numbers-mode-relative)
+;;Disable line numbers for some modes
+(dolist (mode '(term-mode-hook
+		eshell-mode-hook))
+  (add-hook mode (lambda () (display-line-numbers-mode 0))))
+
+;;Rainbow
+(use-package rainbow-delimiters
+  :hook (prog-mode . rainbow-delimiters-mode))
+
+(use-package which-key
+  :init (which-key-mode)
+  :diminish which-key-mode
+  :config
+  (setq which-key-idle-delay 0))
+
+(use-package ivy-rich
+  :init
+  (ivy-rich-mode 1))
+
+;;helpfull
+(use-package helpful
+  :custom
+  (counsel-describe-function-function #'helpful-callable)
+  (counsel-describe-variable-function #'helpful-variable)
+  :bind					;
+  ([remap describe-function] . counsel-describe-function)
+  ([remap describe-command] . helpful-command)
+  ([remap describe-variable] . counsel-describe-variable)
+  ([remap describe-key] . helpful-key))
+
+(use-package general
+ :config
+ (general-create-definer apollo/leader-keys
+   :keymaps '(normal insert visual emacs)
+   :prefix "SPC"
+   :global-prefix "C-SPC")
+ 
+ (apollo/leader-keys
+  "t" '(:ignore t :which-key "toggles")
+  "tt" '(counsel-load-theme :which-key "choose theme")))
+
+;; (defun apollo/evil-hook ()
+;;   (dolist (mode '(custom-mode
+;; 		  eshell-mode
+;; 		  git-rebase-mode
+;; 		  erc-mode
+;; 		  circe-server-mode
+;; 		  circe-chat-mode
+;; 		  circe-query-mode
+;; 		  sauron-mode
+;; 		  term-mode))
+;;     (add-to-list 'evil-emacs-state-modes mode)))
+
+(use-package evil
+  :init
+  (setq evil-want-integration t)
+  (setq evil-want-keybinding nil)
+  (setq evil-want-C-u-scroll t)
+  (setq evil-want-C-i-jump nil)
+  ;; :hook (evil-mode . apollo/evil-hook)
+  :config
+  (evil-mode 1)
+  (define-key evil-insert-state-map (kbd "C-g") 'evil-normal-state)
+
+  (evil-global-set-key 'motion "j" 'evil-next-visual-line)
+  (evil-global-set-key 'motion "k" 'evil-previous-visual-line)
+
+  (evil-set-initial-state 'messages-buffer-mode 'normal)
+  (evil-set-initial-state 'dashboard-mode 'normal))
+
+(use-package evil-collection
+  :after evil
+  :config
+  (evil-collection-init))
+
+(use-package hydra)
+
+(defhydra hydra-text-scale (:timeout 4)
+  "scale text"
+  ("j" text-scale-increase "in")
+  ("k" text-scale-decrease "out") 
+  ("f" nil "finished" :exit t))
+
+(apollo/leader-keys
+  "ts" '(hydra-text-scale/body :which-key "scale text"))
-- 
cgit v1.2.3