From f9abcc830898fe211d7b7e29c41c5b13119b8e71 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Thu, 21 Dec 2023 18:31:20 -0600 Subject: Initial commit --- .gitignore | 7 +++ init.el | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 182 insertions(+) create mode 100644 .gitignore create mode 100644 init.el diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6328026 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +elpa/ +moebius.png +projectile-bookmarks.eld +recentf +tramp +*~ + diff --git a/init.el b/init.el new file mode 100644 index 0000000..ebedfea --- /dev/null +++ b/init.el @@ -0,0 +1,175 @@ +;;; Use package initialization. +;;; WARNING: Install use-package BEFORE uncommenting these lines. +(eval-when-compile + (require 'use-package)) + +(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. + '(custom-enabled-themes '(doom-oceanic-next)) + '(custom-safe-themes + '("ddffe74bc4bf2c332c2c3f67f1b8141ee1de8fd6b7be103ade50abb97fe70f0c" "00cec71d41047ebabeb310a325c365d5bc4b7fab0a681a2a108d32fb161b4006" "1a1ac598737d0fcdc4dfab3af3d6f46ab2d5048b8e72bc22f50271fd6d393a00" "7e068da4ba88162324d9773ec066d93c447c76e9f4ae711ddd0c5d3863489c52" "7ea883b13485f175d3075c72fceab701b5bf76b2076f024da50dff4107d0db25" "8d3ef5ff6273f2a552152c7febc40eabca26bae05bd12bc85062e2dc224cde9a" "b54376ec363568656d54578d28b95382854f62b74c32077821fdfd604268616a" "3fe1ebb870cc8a28e69763dde7b08c0f6b7e71cc310ffc3394622e5df6e4f0da" "b99e334a4019a2caa71e1d6445fc346c6f074a05fcbb989800ecbe54474ae1b0" "a9abd706a4183711ffcca0d6da3808ec0f59be0e8336868669dc3b10381afb6f" "8d8207a39e18e2cc95ebddf62f841442d36fcba01a2a9451773d4ed30b632443" "251ed7ecd97af314cd77b07359a09da12dcd97be35e3ab761d4a92d8d8cf9a71" "be84a2e5c70f991051d4aaf0f049fa11c172e5d784727e0b525565bb1533ec78" "b9761a2e568bee658e0ff723dd620d844172943eb5ec4053e2b199c59e0bcc22" "9d29a302302cce971d988eb51bd17c1d2be6cd68305710446f658958c0640f68" "2721b06afaf1769ef63f942bf3e977f208f517b187f2526f0e57c1bd4a000350" "da75eceab6bea9298e04ce5b4b07349f8c02da305734f7c0c8c6af7b5eaa9738" "f053f92735d6d238461da8512b9c071a5ce3b9d972501f7a5e6682a90bf29725" "ff24d14f5f7d355f47d53fd016565ed128bf3af30eb7ce8cae307ee4fe7f3fd0" "991ca4dbb23cab4f45c1463c187ac80de9e6a718edc8640003892a2523cb6259" "1aa4243143f6c9f2a51ff173221f4fd23a1719f4194df6cef8878e75d349613d" "dc8285f7f4d86c0aebf1ea4b448842a6868553eded6f71d1de52f3dcbc960039" "2853dd90f0d49439ebd582a8cbb82b9b3c2a02593483341b257f88add195ad76" "5586a5db9dadef93b6b6e72720205a4fa92fd60e4ccfd3a5fa389782eab2371b" "683b3fe1689da78a4e64d3ddfce90f2c19eb2d8ab1bab1738a63d8263119c3f4" "e3daa8f18440301f3e54f2093fe15f4fe951986a8628e98dcd781efbec7a46f2" "467dc6fdebcf92f4d3e2a2016145ba15841987c71fbe675dcfe34ac47ffb9195" "4ff1c4d05adad3de88da16bd2e857f8374f26f9063b2d77d38d14686e3868d8d" "f458b92de1f6cf0bdda6bce23433877e94816c3364b821eb4ea9852112f5d7dc" "016f665c0dd5f76f8404124482a0b13a573d17e92ff4eb36a66b409f4d1da410" "49acd691c89118c0768c4fb9a333af33e3d2dca48e6f79787478757071d64e68" "eca44f32ae038d7a50ce9c00693b8986f4ab625d5f2b4485e20f22c47f2634ae" "aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8" "2e05569868dc11a52b08926b4c1a27da77580daa9321773d92822f7a639956ce" "512ce140ea9c1521ccaceaa0e73e2487e2d3826cc9d287275550b47c04072bc4" "bf948e3f55a8cd1f420373410911d0a50be5a04a8886cabe8d8e471ad8fdba8e" "680f62b751481cc5b5b44aeab824e5683cf13792c006aeba1c25ce2d89826426" "a44e2d1636a0114c5e407a748841f6723ed442dc3a0ed086542dc71b92a87aee" "631c52620e2953e744f2b56d102eae503017047fb43d65ce028e88ef5846ea3b" "a138ec18a6b926ea9d66e61aac28f5ce99739cf38566876dc31e29ec8757f6e2" "2dd4951e967990396142ec54d376cced3f135810b2b69920e77103e0bcedfba9" "6945dadc749ac5cbd47012cad836f92aea9ebec9f504d32fe89a956260773ca4" "7a424478cb77a96af2c0f50cfb4e2a88647b3ccca225f8c650ed45b7f50d9525" "18624b2da7749af193a4eeaa7be1dc2abe94a97a8562ba69f5ee0f06d6dd156e" default)) + '(global-display-line-numbers-mode t) + '(package-selected-packages + '(plantuml-mode neotree yasnippet yasnippet-snippets jinja2-mode realgud-ipdb realgud org-modern pyvenv company flycheck-inline flycheck projectile page-break-lines all-the-icons doom-themes helm))) +(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. + '(default ((t (:family "SourceCodeVF" :foundry "ADBO" :slant normal :weight regular :height 140 :width normal))))) + +;;; Hide toolbar, menu bar and scroll bar. +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) + +;;; Enable line numbers globally +(global-display-line-numbers-mode 1) ;; enable line numbers globally +(setq linum-format "%4d \u2502 ") ;; format line number spacing + +;;; MELPA setup. +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) +(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t) +(package-initialize) + +;; Refresh the packages available. +(unless package-archive-contents + (package-refresh-contents)) + +;;; Package listing and installation. +;;; Add the packages you wish emacs to install here. +(defvar myPackages + '(helm + subatomic-theme + doom-themes + all-the-icons + use-package + page-break-lines + projectile + dashboard + flycheck + flycheck-inline + company + pyvenv + org-modern + realgud + realgud-ipdb + jinja2-mode + yasnippet + yasnippet-snippets + neotree + plantuml-mode)) + +;; Install the packages. +(mapc #'(lambda (package) + (unless (package-installed-p package) + (package-install package))) + myPackages) + +;;; Helm configuration. +(helm-mode 1) +(global-set-key (kbd "C-x C-f") 'helm-find-files) + +;; Rebind tab for helm completion. +(define-key helm-map (kbd "") 'helm-execute-persistent-action) +;; Make tab work in terminal +(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) +;; Open helm buffer inside current window. +(setq helm-split-window-inside-p t) +;; Move to end or beginning of source when reaching top or bottom of source. +(setq helm-move-to-line-cycle-in-source t) +;; Search for library in `require' and `declare-function' sexp. +(setq helm-ff-search-library-in-sexp t) +;; Scroll 8 lines other window using M-/M- +(setq helm-scroll-amount 8) +(setq helm-ff-file-name-history-use-recentf t) +(setq helm-echo-input-in-header-line t) + +;;; All-the-icons configuration. +(use-package all-the-icons + :if (display-graphic-p)) + + +;;; Projectile configuration +(use-package projectile + :ensure t + :init + (projectile-mode +1) + :bind (:map projectile-mode-map + ("C-c p" . projectile-command-map))) + +;;; Dashboard configuration. +(use-package dashboard + :ensure t + :config + (dashboard-setup-startup-hook) + :custom + (dashboard-startup-banner "~/.emacs.d/moebius.png") + (dashboard-banner-logo-title "All of them have ribbon insignias!") + (dashboard-center-content t) + (dashboard-icon-type 'all-the-icons) + (dashboard-set-heading-icons t) + (dashboard-set-file-icons t) + (dashboard-items '((recents . 5) + (projects . 1)))) + +;;; Flycheck configuration. +(use-package flycheck + :ensure t + :init (global-flycheck-mode)) + +;; Enable flycheck inline. +(with-eval-after-load 'flycheck + (add-hook 'flycheck-mode-hook #'flycheck-inline-mode)) + +;;; Company mode configuration. +(add-hook 'after-init-hook 'global-company-mode) + +;;; Eglot modes. + +;; C mode +(add-hook 'c-mode-hook 'eglot-ensure) + +;; C++ mode +(add-hook 'c++-mode-hook 'eglot-ensure) + +;; Python mode +(add-hook 'python-mode-hook 'eglot-ensure) + +;;; Org mode configuration +(setq org-hide-emphasis-markers t + org-pretty-entities t + org-auto-align-tags nil + org-tags-column 0 + org-ellipsis "…" + org-catch-invisible-edits 'show-and-error + org-special-ctrl-a/e t + org-insert-heading-respect-content t) + +;; Setup org-modern globally. +(with-eval-after-load 'org (global-org-modern-mode)) + +;;; Jinja2 mode flobal enabling. +(add-to-list 'auto-mode-alist '("\\.jinja\\'" . jinja2-mode)) +(add-to-list 'auto-mode-alist '("\\.uml\\'" . plantuml-mode)) + +;;; YASnippets configuration +(add-to-list 'load-path + "~/.emacs.d/plugins/yasnippet") +(require 'yasnippet) +(yas-global-mode 1) + +;;; Neotree configuration +(require 'neotree) +(global-set-key [f8] 'neotree-toggle) +(setq neo-theme (if (display-graphic-p) 'icons 'arrow)) + +;;; PlantUML mode configuration +(setq plantuml-jar-path "/home/sebastian/Programas/plantuml-1.2023.13.jar") +(setq plantuml-default-exec-mode 'jar) + +;;; init.el ends here -- cgit v1.2.3