From 4fca372ecbe5854ab8ec36b0116df49e67414df5 Mon Sep 17 00:00:00 2001 From: Henry Hirsch Date: Sat, 25 Nov 2023 09:03:36 +0100 Subject: [PATCH] feat: initial commit --- init.el | 95 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ logo.svg | 29 +++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 init.el create mode 100644 logo.svg diff --git a/init.el b/init.el new file mode 100644 index 0000000..57f38c4 --- /dev/null +++ b/init.el @@ -0,0 +1,95 @@ +(require 'package) +(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) + +(unless (package-installed-p 'use-package) +(package-refresh-contents) +(package-install 'use-package)) + +(eval-when-compile + (require 'use-package)) + +(tool-bar-mode -1) +(menu-bar-mode -1) +(gcmh-mode 1) +(global-linum-mode 1) +(ido-mode 1) +(set-face-attribute 'default nil :height 150) + +(setq-default indent-tabs-mode nil) +(setq-default tab-width 2) +(setq indent-line-function 'insert-tab) + +(setq backup-directory-alist + `((".*" . "~/.saves"))) +(setq auto-save-file-name-transforms + `((".*" "~/.saves" t))) + +(use-package server + :config +(unless (server-running-p) +(server-start))) + +(use-package dashboard + :ensure t + :config + (dashboard-setup-startup-hook) + (setq dashboard-set-footer nil) + (setq dashboard-startup-banner "~/.emacs.d/logo.svg") + (setq dashboard-banner-logo-title "MeMacs") + (setq dashboard-init-info "Keep things light")) + +(use-package lsp-mode + :ensure t + :config + (add-hook 'php-mode-hook #'lsp) + (add-hook 'c-mode-hook #'lsp) + (add-hook 'c++-mode-hook #'lsp) + (add-hook 'js-mode-hook #'lsp) + ) + +(use-package dap-php + :config +) + +(use-package doom-themes + :ensure t + :config + ;; Global settings (defaults) + (setq doom-themes-enable-bold t ; if nil, bold is universally disabled + doom-themes-enable-italic t) ; if nil, italics is universally disabled + (load-theme 'doom-one t) + ;; Enable flashing mode-line on errors + (doom-themes-visual-bell-config) + ;; Enable custom neotree theme (all-the-icons must be installed!) + (doom-themes-neotree-config) + ;; or for treemacs users + (setq doom-themes-treemacs-theme "doom-atom") ; use "doom-colors" for less minimal icon theme + (doom-themes-treemacs-config) + ;; Corrects (and improves) org-mode's native fontification. + (doom-themes-org-config)) + + + +(defun autocompile nil + "compile itself if init file" + (interactive) + (require 'bytecomp) + (let ((dotemacs (file-truename user-init-file))) + (if (string= (buffer-file-name) (file-chase-links dotemacs)) + (byte-compile-file dotemacs)))) + +(add-hook 'after-save-hook 'autocompile) + +(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 + '(nerd-icons all-the-icons dap-mode php-mode company lsp-mode dashboard))) +(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. + ) diff --git a/logo.svg b/logo.svg new file mode 100644 index 0000000..bc52321 --- /dev/null +++ b/logo.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + +