diff options
author | Cesar Monroy <[email protected]> | 2023-08-22 15:14:08 -0600 |
---|---|---|
committer | Cesar Monroy <[email protected]> | 2023-08-22 15:14:08 -0600 |
commit | 98435019221ee0785aa77395db4703072f0dc1a9 (patch) | |
tree | 6bd6855bcb4515a3e488f5fb43ebf55987772292 /config.org |
Configuracion general
Diffstat (limited to 'config.org')
-rw-r--r-- | config.org | 259 |
1 files changed, 259 insertions, 0 deletions
diff --git a/config.org b/config.org new file mode 100644 index 0000000..9cb9cd6 --- /dev/null +++ b/config.org @@ -0,0 +1,259 @@ +#+TITLE: Emacs Configuration File +#+Author: BugGhost +* Package configuration +** Melpa +Define the melpa respository to packages +#+begin_src emacs-lisp + (require 'package) + (setq package-enable-at-startup nil) + (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) + (package-initialize) +#+end_src +** Use package +Instal the package "use-package" to manager packages in emacs +#+begin_src emacs-lisp + (unless (package-installed-p 'use-package) + (package-refresh-contents) + (package-install 'use-package)) + (require 'use-package) +#+end_src +* exclude files +Exclude message of error or custom vars of config file +#+begin_src emacs-lisp + (setq custom-file (locate-user-emacs-file "custom-vars-el")) + (load custom-file 'noerror 'nomessage) +#+end_src +* Customization +** Theme +#+begin_src emacs-lisp + (use-package doom-themes + :ensure t + :config + (load-theme 'doom-solarized-light t) + (doom-themes-org-config) + (doom-themes-visual-bell-config)) +#+end_src +** Font +#+begin_src emacs-lisp + (add-to-list 'default-frame-alist '(font . "JetBrains Mono-14")) +#+end_src +** Dashboard +#+begin_src emacs-lisp + (use-package dashboard + :ensure t + :init + (setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))) + (setq dashboard-startup-banner "~/.emacs.d/icon-emacs.png") + (setq dashboard-banner-logo-title "I am just a coder for fun") + (setq dashboard-center-content t) + (setq dashboard-items '((recents . 5) + ;; (bookmarks . 5) + (projects . 5) + (agenda . 5) + ;; (registers . 5) + )) + :config + (dashboard-setup-startup-hook)) +#+end_src +** Modeline +#+begin_src emacs-lisp + (use-package doom-modeline + :ensure t + :config (doom-modeline-mode) + :custom ((doom-modeline-height 15))) +#+end_src +** General +#+begin_src emacs-lisp + (fido-vertical-mode) + (menu-bar-mode -1) + (tool-bar-mode -1) + (setq org-startup-folded t) + (recentf-mode) + (savehist-mode) + (global-hl-line-mode) + (global-subword-mode) + (global-auto-revert-mode) + (save-place-mode) + (column-number-mode) + (size-indication-mode) + (global-visual-line-mode) + (delete-selection-mode) + (setq use-dialog-box nil) + (setq visible-bell t) + (setq org-startup-indented t) + (setq make-backup-files nil) + (setq auto-save-default nil) + (setq global-auto-revert-non-file-buffers t) + (defalias 'yes-or-no-p 'y-or-n-p) + (global-set-key (kbd "C-x k") 'kill-buffer-and-window) + (global-set-key "\C-x\ \C-r" 'recentf-open-files) + (add-hook 'prog-mode-hook 'display-line-numbers-mode) +#+end_src +* Interface Functions +** Newsticker +#+begin_src emacs-lisp + (setq newsticker-url-list + '(("Bugsswriter Videos" "https://bugswriter.com/videos.xml") + ("Muñe" "https://www.youtube.com/feeds/videos.xml?channel_id=UCSKzNn35M7HFzHgxz7OikMA") + ("Last Dragon" "https://www.youtube.com/feeds/videos.xml?channel_id=UCllrFdkbcxcuAdzRHj-KSMA") + ("Muy Linux" "https://www.muylinux.com/feed/") + ("Xataka" "https://www.xataka.com.mx/feedburner.xml"))) + #+end_src +** Which key +#+begin_src emacs-lisp + (use-package which-key + :ensure t + :init + (setq which-key-idle-delay 0.3) + :config + (which-key-mode)) +#+end_src +** Undo tree +#+begin_src emacs-lisp + (use-package undo-tree + :ensure t + :init + (global-undo-tree-mode)) +#+end_src +** Writeroom +Delet the disctractions when write. +#+begin_src emacs-lisp + (use-package writeroom-mode + :ensure t) +#+end_src +** Rainbow Delimiter +Change the color of parentheses and other deleimiters depending of the +deep. +#+begin_src elisp + (use-package rainbow-delimiters + :ensure t + :hook (prog-mode . rainbow-delimiters-mode)) +#+end_src +** Avy +#+begin_src emacs-lisp + (use-package avy + :ensure t + :bind + ("C-." . avy-goto-char-timer)) +#+end_src +* COMMENT hs-minor-mode +#+begin_src emacs-lisp + (add-hook 'c-mode-common-hook 'hs-minor-mode) + (add-hook 'emacs-lisp-mode-hook 'hs-minor-mode) + (add-hook 'java-mode-hook 'hs-minor-mode) + (add-hook 'lisp-mode-hook 'hs-minor-mode) + (add-hook 'perl-mode-hook 'hs-minor-mode) + (add-hook 'sh-mode-hook 'hs-minor-mode) +#+end_src +* Develop +** Projectile +#+begin_src emacs-lisp + (use-package projectile + :ensure t + :bind ("C-x p" . projectile-command-map) + :config (projectile-mode)) +#+end_src +** Magit +#+begin_src emacs-lisp + (use-package magit + :ensure t + :init + (setq auto-revert-check-vc-info t)) +#+end_src +** IDE +*** Lsp +#+begin_src emacs-lisp + (use-package lsp-mode + :ensure t + :hook + ((lsp-mode . lsp-enable-which-key-integration)) + :config + (setq lsp-completion-enable-additional-text-edit nil)) + (use-package lsp-ui :ensure t) +#+end_src +*** Dap +#+begin_src emacs-lisp + (use-package dap-mode + :after lsp-mode + :ensure t + :config (dap-auto-configure-mode)) +#+end_src + +*** Company +#+begin_src emacs-lisp + (use-package company + :ensure t) +#+end_src +*** Yasnippet +#+begin_src emacs-lisp + (use-package yasnippet + :ensure t + :config (yas-global-mode)) +#+end_src +** Web +*** Web Mode +#+begin_src emacs-lisp + (use-package web-mode + :ensure t + :mode (("\\.html?\\'" . web-mode) + ("\\.css?\\'" . web-mode)) + :init + (setq web-mode-markup-indent-offset 2) + (setq web-mode-css-indent-offset 2) + (setq web-mode-code-indent-offset 2) + (setq web-mode-enable-current-element-highlight t) + (setq web-mode-enable-current-column-highlight t) + :config + (web-mode)) +#+end_src +*** Emmet +#+begin_src emacs-lisp + (use-package emmet-mode + :ensure t + :hook (sgml-mode css-mode web-mode) + :config + (emmet-mode) + (emmet-preview-mode)) +#+end_src +*** Javascript Mode +#+begin_src emacs-lisp + (use-package js2-mode + :ensure t + :mode ("\\.js?\\'" . js2-mode) + :init + (setq js-indent-level 2)) +#+end_src +*** Live Server +#+begin_src emacs-lisp + (use-package simple-httpd + :ensure t) + (use-package impatient-mode + :ensure t) +#+end_src +** Java +*** LSP +#+begin_src emacs-lisp + (use-package lsp-java + :ensure t + :config (add-hook 'java-mode-hook 'lsp)) +#+end_src +*** Dap +#+begin_src emacs-lisp + (use-package dap-java :ensure nil) +#+end_src +** COMMENT PlantUML +#+begin_src emacs-lisp + (org-babel-do-load-languages + 'org-babel-load-languages + '((plantuml . t))) ; this line activates plantuml + + (use-package plantuml-mode + :ensure t + :init + (setq plantuml-default-exec-mode 'jar) + (setq plantuml-jar-path "/usr/share/plantuml/plantuml.jar") + (setq org-plantuml-jar-path (expand-file-name "/usr/share/plantuml/plantuml.jar")) + (setq org-startup-with-inline-images t) + (add-to-list 'org-src-lang-modes '("plantuml" . plantuml)) + (org-babel-do-load-languages 'org-babel-load-languages '((plantuml . t)))) +#+end_src |