Change directory lisp/ to modules/

FS #2
This commit is contained in:
Jesús 2019-01-22 15:45:41 -05:00
parent d0f44d8546
commit ced0fe8f9e
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
44 changed files with 366 additions and 68 deletions

View File

@ -11,7 +11,7 @@
'(ecb-options-version "2.50") '(ecb-options-version "2.50")
'(package-selected-packages '(package-selected-packages
(quote (quote
(shrink-path git-gutter-fringe git-timemachine gitattributes-mode gitignore-mode gitconfig-mode yaml-mode whitespace-cleanup-mode web-mode use-package undo-tree sublime-themes sml-modeline smart-mode-line-powerline-theme scss-mode sass-mode rainbow-mode pkgbuild-mode pip-requirements php-refactor-mode nlinum nginx-mode neotree markdown-mode less-css-mode jedi highlight-indent-guides flycheck emmet-mode ecb dokuwiki-mode diminish crystal-mode company-php anzu all-the-icons)))) (editorconfig yaml-mode whitespace-cleanup-mode web-mode vlf use-package undo-tree sublime-themes sml-modeline smart-mode-line-powerline-theme shrink-path scss-mode sass-mode rainbow-mode pkgbuild-mode pip-requirements php-refactor-mode nlinum nginx-mode neotree markdown-mode less-css-mode jedi highlight-indent-guides gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-gutter-fringe flycheck emmet-mode ecb dokuwiki-mode diminish crystal-mode company-php bug-hunter anzu all-the-icons))))
(custom-set-faces (custom-set-faces
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.

11
init.el
View File

@ -1,12 +1,16 @@
;;; init.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;; Emacs!!! ;; Emacs!!!
;;; Code:
(package-initialize) (package-initialize)
(when (version<= emacs-version "24") (when (version<= emacs-version "24")
(error "This is made form Emacs >=24")) (error "This is made form Emacs >=24"))
(defconst emacs-start-time (current-time)) (defconst emacs-start-time (current-time))
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/" user-emacs-directory)) (add-to-list 'load-path (expand-file-name "~/.emacs.d/modules/" user-emacs-directory))
;;; Raise garbage collection threshold after init ;;; Raise garbage collection threshold after init
(add-hook 'after-init-hook (add-hook 'after-init-hook
@ -63,6 +67,7 @@
(require 'init-web-mode) (require 'init-web-mode)
(require 'init-ready) (require 'init-ready)
(require 'init-dokuwiki) (require 'init-dokuwiki)
;;; Loads custom file ;;; Loads custom file
(when (file-exists-p custom-file) (when (file-exists-p custom-file)
(load custom-file)) (load custom-file))
@ -73,3 +78,7 @@
(message "[STARTUP] Loading %s ... done (%.3fs)" load-file-name elapsed))) (message "[STARTUP] Loading %s ... done (%.3fs)" load-file-name elapsed)))
(provide 'init) (provide 'init)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init.el ends here

View File

@ -1,4 +0,0 @@
;; dokuwiki-mode
(use-package dokuwiki-mode)
(provide 'init-dokuwiki)

View File

@ -1,8 +0,0 @@
;;----------------------------------------------------------------------------
;; EditorConfig
;;----------------------------------------------------------------------------
(use-package editorconfig)
(editorconfig-mode 1)
(provide 'init-editorconfig)

View File

@ -1,4 +0,0 @@
(use-package pkgbuild-mode
:mode ("/PKGBUILD$" . pkgbuild-mode))
(provide 'init-pkgbuild)

View File

@ -1,5 +0,0 @@
;; yaml-mode
(use-package yaml-mode
:mode ("\\.yml\\'" . yaml-mode))
(provide 'init-yaml)

View File

@ -1,18 +0,0 @@
;;----------------------------------------------------------------------------
;; Some cool functions
;;----------------------------------------------------------------------------
;; These functions are made by me (Quitter: @heckyel) or
;; heavily modified by me
;;----------------------------------------------------------------------------
;; Toggles fullscreen
;;----------------------------------------------------------------------------
(defun myemacs/toggle-fullscreen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
(defun myemacs/elapsed-time ()
(let ((elapsed (float-time (time-subtract (current-time)
emacs-start-time))))
(message "[STARTUP] Loading %s ... done (%.3fs)" load-file-name elapsed)))

View File

@ -1,3 +1,9 @@
;;; init-crystal.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Crystal Mode ;; Crystal Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -5,3 +11,6 @@
:mode ("\\.cr\\'" . crystal-mode)) :mode ("\\.cr\\'" . crystal-mode))
(provide 'init-crystal) (provide 'init-crystal)
;; End:
;;; init-crystal.el ends here

View File

@ -1,3 +1,8 @@
;;; init-diminish.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Diminish - is minor modes with no modeline display ;; Diminish - is minor modes with no modeline display
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -7,3 +12,6 @@
(diminish 'undo-tree-mode) (diminish 'undo-tree-mode)
(provide 'init-diminish) (provide 'init-diminish)
;; End:
;;; init-diminish.el ends here

12
modules/init-dokuwiki.el Normal file
View File

@ -0,0 +1,12 @@
;;; init-dokuwiki.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;; dokuwiki-mode
(use-package dokuwiki-mode)
(provide 'init-dokuwiki)
;; End:
;;; init-dokuwiki.el ends here

View File

@ -1,3 +1,8 @@
;;; init-ecb.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; ECB ;; ECB
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -17,3 +22,8 @@
) )
(provide 'init-ecb) (provide 'init-ecb)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-ecb.el ends here

View File

@ -1,3 +1,9 @@
;;; init-editing-utils.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Remove whitespaces ;; Remove whitespaces
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -53,5 +59,11 @@
(setq undo-tree-visualizer-diff nil))) (setq undo-tree-visualizer-diff nil)))
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(myemacs/elapsed-time) (load-file "~/.emacs.d/modules/lib/myemacs.el")
(provide 'init-editing-utils) (provide 'init-editing-utils)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-editing-utils.el ends here

View File

@ -0,0 +1,16 @@
;;; init-editorconfig.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;----------------------------------------------------------------------------
;; EditorConfig
;;----------------------------------------------------------------------------
(use-package editorconfig
:config
(editorconfig-mode 1))
(provide 'init-editorconfig)
;; End:
;;; init-editorconfig.el ends here

View File

@ -1,3 +1,8 @@
;;; init-elpa.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;; Find and load the correct package.el ;;; Find and load the correct package.el
;; ===================================================== ;; =====================================================
;; use-package → https://github.com/jwiegley/use-package ;; use-package → https://github.com/jwiegley/use-package
@ -31,3 +36,6 @@
;; ===================================================== ;; =====================================================
(provide 'init-elpa) (provide 'init-elpa)
;; End:
;;; init-elpa.el ends here

View File

@ -1,3 +1,8 @@
;;; init-emmet-mode.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;; emmet-mode ;; emmet-mode
(use-package emmet-mode (use-package emmet-mode
;; Enable for only languages ;; Enable for only languages
@ -8,3 +13,6 @@
) )
(provide 'init-emmet-mode) (provide 'init-emmet-mode)
;; End:
;;; init-emmet-mode.el ends here

View File

@ -1,3 +1,9 @@
;;; init-flycheck.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
(use-package flycheck (use-package flycheck
;; Enable for only languages ;; Enable for only languages
:init :init
@ -24,3 +30,6 @@
) )
(provide 'init-flycheck) (provide 'init-flycheck)
;; End:
;;; init-flycheck.el ends here

View File

@ -29,7 +29,8 @@
(max-line-length 0)) (max-line-length 0))
(save-excursion (save-excursion
(while (<= linenum-start linenum-end) (while (<= linenum-start linenum-end)
(goto-line linenum-start) (with-no-warnings
(goto-line linenum-start))
(setq tmp-line (replace-regexp-in-string "^[ \t]*" "" (setq tmp-line (replace-regexp-in-string "^[ \t]*" ""
(buffer-substring (line-beginning-position) (buffer-substring (line-beginning-position)
(line-end-position)))) (line-end-position))))
@ -55,7 +56,8 @@
;; ivy8- strip the `(car e)' ;; ivy8- strip the `(car e)'
;; we handle both data structure ;; we handle both data structure
(unless (numberp e) (setq e (cdr e))) (unless (numberp e) (setq e (cdr e)))
(goto-line e))) (with-no-warnings
(goto-line e))))
(message "NO git-gutters-fringe!"))))) (message "NO git-gutters-fringe!")))))
(use-package gitconfig-mode (use-package gitconfig-mode
@ -94,4 +96,8 @@
(add-hook 'buffer-list-update-hook #'enable-smerge-maybe)) (add-hook 'buffer-list-update-hook #'enable-smerge-maybe))
(provide 'init-git) (provide 'init-git)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-git.el ends here ;;; init-git.el ends here

View File

@ -1,3 +1,9 @@
;;; init-html.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;
;; HTML Mode ;; HTML Mode
;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;
@ -11,3 +17,8 @@
(add-hook 'html-mode-hook 'highlight-indent-guides-mode) (add-hook 'html-mode-hook 'highlight-indent-guides-mode)
(provide 'init-html) (provide 'init-html)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-html.el ends here

View File

@ -1,3 +1,9 @@
;;; init-icons.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------- ;;----------------------------------
;; All-the-icons ;; All-the-icons
;;---------------------------------- ;;----------------------------------
@ -15,3 +21,8 @@
(setq inhibit-compacting-font-caches t) (setq inhibit-compacting-font-caches t)
(provide 'init-icons) (provide 'init-icons)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-icons.el ends here

View File

@ -1,3 +1,9 @@
;;; init-indent-guides.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;; This minor mode highlights indentation levels via font-lock ;; This minor mode highlights indentation levels via font-lock
(use-package highlight-indent-guides (use-package highlight-indent-guides
@ -7,3 +13,6 @@
(setq highlight-indent-guides-method 'character)) (setq highlight-indent-guides-method 'character))
(provide 'init-indent-guides) (provide 'init-indent-guides)
;; End:
;;; init-indent-guides.el ends here

View File

@ -1,3 +1,8 @@
;;; init-less.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Less Mode ;; Less Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -5,3 +10,6 @@
:mode ("\\.less\\'" . less-css-mode)) :mode ("\\.less\\'" . less-css-mode))
(provide 'init-less) (provide 'init-less)
;; End:
;;; init-less.el ends here

View File

@ -1,6 +1,8 @@
;;---------------------------------------------------------------------------- ;;; init-markdown.el --- .Emacs Configuration -*- lexical-binding: t -*-
;; Markdown mode ;;; Commentary:
;;---------------------------------------------------------------------------- ;;
;;; Code:
(use-package markdown-mode (use-package markdown-mode
:mode (("\\.markdown\\'" . markdown-mode) :mode (("\\.markdown\\'" . markdown-mode)
("\\.md\\'" . markdown-mode)) ("\\.md\\'" . markdown-mode))
@ -31,3 +33,5 @@
"</html>\n"))) "</html>\n")))
(provide 'init-markdown) (provide 'init-markdown)
;;; init-markdown.el ends here

View File

@ -1,3 +1,8 @@
;;; init-modeline.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Modeline configuration ;; Modeline configuration
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -42,5 +47,8 @@
(global-set-key (kbd "M-%") 'anzu-query-replace) (global-set-key (kbd "M-%") 'anzu-query-replace)
(global-set-key (kbd "s-<SPC>") 'anzu-query-replace)) (global-set-key (kbd "s-<SPC>") 'anzu-query-replace))
(myemacs/elapsed-time) (load-file "~/.emacs.d/modules/lib/myemacs.el")
(provide 'init-modeline) (provide 'init-modeline)
;; End:
;;; init-modeline.el ends here

View File

@ -1,3 +1,8 @@
;;; init-nginx.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;--------------------------- ;;---------------------------
;; Nginx Mode ;; Nginx Mode
;;--------------------------- ;;---------------------------
@ -5,3 +10,6 @@
:mode ("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode)) :mode ("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode))
(provide 'init-nginx) (provide 'init-nginx)
;; End:
;;; init-nginx.el ends here

View File

@ -1,8 +1,18 @@
;;; init-nlinum.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Line numbers ;; Line numbers
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Linum snippets from: https://www.emacswiki.org/emacs/LineNumbers ;; Linum snippets from: https://www.emacswiki.org/emacs/LineNumbers
(use-package nlinum) (use-package nlinum
:config
(add-hook 'find-file-hook (lambda () (linum-mode 1)))
(linum-mode)
(setq global-linum-mode t))
(use-package linum) (use-package linum)
(use-package hl-line) (use-package hl-line)
@ -13,6 +23,8 @@
(add-hook 'linum-before-numbering-hook 'my-linum-get-format-string) (add-hook 'linum-before-numbering-hook 'my-linum-get-format-string)
(defun my-linum-get-format-string () (defun my-linum-get-format-string ()
"Format the string of the column in the buffer.
It helps to show the numbering plus a separation bar."
(let* ((width (1+ (length (number-to-string (let* ((width (1+ (length (number-to-string
(count-lines (point-min) (point-max)))))) (count-lines (point-min) (point-max))))))
(format (concat "%" (number-to-string width) "d \u2502"))) (format (concat "%" (number-to-string width) "d \u2502")))
@ -21,6 +33,8 @@
(defvar my-linum-current-line-number 0) (defvar my-linum-current-line-number 0)
(defun my-linum-format (line-number) (defun my-linum-format (line-number)
"Defines LINE-NUMBER the numbering format of each.
this helps maintain the format in the numbering"
(propertize (format my-linum-format-string line-number) 'face (propertize (format my-linum-format-string line-number) 'face
(if (eq line-number my-linum-current-line-number) (if (eq line-number my-linum-current-line-number)
'my-linum-hl 'my-linum-hl
@ -28,6 +42,8 @@
(setq linum-format 'my-linum-format) (setq linum-format 'my-linum-format)
(defadvice linum-update (around my-linum-update) (defadvice linum-update (around my-linum-update)
"Defines LINUM-UPDATE for update lines.
this helps maintain the format in the numbering"
(let ((my-linum-current-line-number (line-number-at-pos))) (let ((my-linum-current-line-number (line-number-at-pos)))
ad-do-it)) ad-do-it))
(ad-activate 'linum-update) (ad-activate 'linum-update)
@ -35,33 +51,46 @@
(defvar *linum-mdown-line* nil) (defvar *linum-mdown-line* nil)
(defun line-at-click () (defun line-at-click ()
"Funtions for position lines.
this helps maintain the move visual."
(save-excursion (save-excursion
(let ((click-y (cdr (cdr (mouse-position)))) (let ((click-y (cdr (cdr (mouse-position))))
(line-move-visual-store line-move-visual)) (line-move-visual-store line-move-visual))
(setq line-move-visual t) (setq line-move-visual t)
(goto-char (window-start)) (goto-char (window-start))
(next-line (1- click-y))
(with-no-warnings
(next-line (1- click-y)))
(setq line-move-visual line-move-visual-store) (setq line-move-visual line-move-visual-store)
;; If you are using tabbar substitute the next line with ;; If you are using tabbar substitute the next line with
;; (line-number-at-pos)))) ;; (line-number-at-pos))))
(1+ (line-number-at-pos))))) (1+ (line-number-at-pos)))))
(defun md-select-linum () (defun md-select-linum ()
"Funtions for position lines.
this helps maintain the move visual."
(interactive) (interactive)
(goto-line (line-at-click)) (with-no-warnings
(goto-line (line-at-click)))
(set-mark (point)) (set-mark (point))
(setq *linum-mdown-line* (setq *linum-mdown-line*
(line-number-at-pos))) (line-number-at-pos)))
(defun mu-select-linum () (defun mu-select-linum ()
"Funtions for position lines.
this helps maintain the move visual."
(interactive) (interactive)
(when *linum-mdown-line* (when *linum-mdown-line*
(let (mu-line) (let (mu-line)
;; (goto-line (line-at-click)) ;; (goto-line (line-at-click))
(setq mu-line (line-at-click)) (setq mu-line (line-at-click))
(goto-line (max *linum-mdown-line* mu-line)) (with-no-warnings
(goto-line (max *linum-mdown-line* mu-line)))
(set-mark (line-end-position)) (set-mark (line-end-position))
(goto-line (min *linum-mdown-line* mu-line)) (with-no-warnings
(goto-line (min *linum-mdown-line* mu-line)))
(setq *linum-mdown* (setq *linum-mdown*
nil)))) nil))))
@ -69,8 +98,9 @@
(global-set-key (kbd "<left-margin> <mouse-1>") 'mu-select-linum) (global-set-key (kbd "<left-margin> <mouse-1>") 'mu-select-linum)
(global-set-key (kbd "<left-margin> <drag-mouse-1>") 'mu-select-linum) (global-set-key (kbd "<left-margin> <drag-mouse-1>") 'mu-select-linum)
(add-hook 'find-file-hook (lambda () (linum-mode 1)))
(linum-mode)
(setq global-linum-mode t)
(provide 'init-nlinum) (provide 'init-nlinum)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-nlinum.el ends here

10
modules/init-pkgbuild.el Normal file
View File

@ -0,0 +1,10 @@
;;; init-pkgbuild.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
(use-package pkgbuild-mode
:mode ("/PKGBUILD$" . pkgbuild-mode))
(provide 'init-pkgbuild)
;;; init-pkgbuild.el ends here

View File

@ -1,3 +1,8 @@
;;; init-python.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Python Mode ;; Python Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -19,7 +24,8 @@
(use-package pip-requirements) (use-package pip-requirements)
(defun my/python-mode-stuff () (defun my/python-mode-stuff ()
;; Jedi makes everything a lot easier for everybody! "Jedi make everything a lot easier for everybody!.
It's helps prepare jedi in Emacs."
(jedi:setup) (jedi:setup)
(define-key python-mode-map (kbd "C-]") 'jedi:goto-definition) ;goto define (define-key python-mode-map (kbd "C-]") 'jedi:goto-definition) ;goto define
(local-set-key (kbd "<f1>") 'jedi:show-doc) (local-set-key (kbd "<f1>") 'jedi:show-doc)
@ -30,3 +36,8 @@
;; M-x jedi:install-server ;; M-x jedi:install-server
(provide 'init-python) (provide 'init-python)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-python.el ends here

View File

@ -1,3 +1,8 @@
;;; init-rainbow.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;; rainbow-mode ;; rainbow-mode
(use-package rainbow-mode (use-package rainbow-mode
:init :init
@ -9,3 +14,4 @@
(add-hook 'html-mode-hook 'rainbow-mode)) (add-hook 'html-mode-hook 'rainbow-mode))
(provide 'init-rainbow) (provide 'init-rainbow)
;;; init-rainbow.el ends here

View File

@ -1,13 +1,18 @@
;;; init-ready.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;------------------------- ;;-------------------------
;; Emacs Ready :) ;; Emacs Ready :)
;;------------------------- ;;-------------------------
(add-hook 'emacs-startup-hook (add-hook 'emacs-startup-hook
(lambda () (lambda ()
(message "Emacs cargado en %s y listo para ser usado." (message "Emacs ready in %s with %d garbage collections."
(format "%.2f segundos" (format "%.2f seconds"
(float-time (float-time
(time-subtract after-init-time before-init-time))) (time-subtract after-init-time before-init-time)))
gcs-done))) gcs-done)))
(provide 'init-ready) (provide 'init-ready)
;;; init-ready.el ends here

View File

@ -1,3 +1,8 @@
;;; init-sass.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Sass Mode ;; Sass Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -5,3 +10,5 @@
:mode ("\\.sass\\'" . sass-mode)) :mode ("\\.sass\\'" . sass-mode))
(provide 'init-sass) (provide 'init-sass)
;;; init-sass.el ends here

View File

@ -1,3 +1,8 @@
;;; init-scss.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Scss Mode ;; Scss Mode
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
@ -5,3 +10,5 @@
:mode ("\\.scss\\'" . scss-mode)) :mode ("\\.scss\\'" . scss-mode))
(provide 'init-scss) (provide 'init-scss)
;;; init-scss.el ends here

View File

@ -1,3 +1,8 @@
;;; init-security.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;--------------------------------------------------------------------------------------------- ;;---------------------------------------------------------------------------------------------
;; Security. Check https://web.archive.org/web/20170413150436/https://ogbe.net/emacsconfig.html ;; Security. Check https://web.archive.org/web/20170413150436/https://ogbe.net/emacsconfig.html
;;--------------------------------------------------------------------------------------------- ;;---------------------------------------------------------------------------------------------
@ -10,3 +15,8 @@
(setq gnutls-trustfiles (list trustfile))) (setq gnutls-trustfiles (list trustfile)))
(provide 'init-security) (provide 'init-security)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-security.el ends here

View File

@ -1,3 +1,8 @@
;;; init-theme.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
(use-package sublime-themes (use-package sublime-themes
:config :config
(load-theme 'spolsky t) (load-theme 'spolsky t)
@ -8,3 +13,5 @@
:group 'linum)) :group 'linum))
(provide 'init-theme) (provide 'init-theme)
;;; init-theme.el ends here

View File

@ -1,24 +1,31 @@
;;; init-utils.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;; Loads functions from libs ;; Loads functions from libs
(defun load-directory (dir) (defun load-directory (dir)
"Load functions from the libs DIR.
read the .el files"
(let ((load-it (lambda (f) (let ((load-it (lambda (f)
(load-file (concat (file-name-as-directory dir) f))) (load-file (concat (file-name-as-directory dir) f)))
)) ))
(mapc load-it (directory-files dir nil "\\.el$")))) (mapc load-it (directory-files dir nil "\\.el$"))))
;; Load lib functions ;; Load lib functions
(load-directory (expand-file-name "~/.emacs.d/lisp/lib/" user-emacs-directory)) (load-directory (expand-file-name "~/.emacs.d/modules/lib/" user-emacs-directory))
;; This is borrowed from https://github.com/purcell/emacs.d/blob/master/lisp/init-utils.el by Steve Purcell but I have added some stuff. ;; This is borrowed from https://github.com/purcell/emacs.d/blob/master/lisp/init-utils.el by Steve Purcell but I have added some stuff.
(if (fboundp 'with-eval-after-load) (if (fboundp 'with-eval-after-load)
(defalias 'after-load 'with-eval-after-load) (defalias 'after-load 'with-eval-after-load)
(defmacro after-load (feature &rest body) (defmacro after-load (feature &rest body)
"After FEATURE is loaded, evaluate BODY." "After FEATURE is loaded, evaluate BODY."
(declare (indent defun)) (declare (indent defun))
'(eval-after-load, feature `(eval-after-load, feature
'(progn, @body)))) '(progn ,@body))))
;; Elapsed time ;; Elapsed time
(myemacs/elapsed-time) (load-file "~/.emacs.d/modules/lib/myemacs.el")
(provide 'init-utils) (provide 'init-utils)
;;; init-utils.el ends here

View File

@ -1,3 +1,8 @@
;;; init-web-mode.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
(use-package web-mode (use-package web-mode
:mode (("\\.html?\\'" . web-mode) :mode (("\\.html?\\'" . web-mode)
("\\.djhtml\\'" . web-mode) ("\\.djhtml\\'" . web-mode)
@ -12,3 +17,4 @@
) )
(provide 'init-web-mode) (provide 'init-web-mode)
;;; init-web-mode.el ends here

View File

@ -1,6 +1,12 @@
;;; init-whitespace.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
;; Whitespace Mode | tool ;; Whitespace Mode | tool
;;---------------------------------------------------------------------------- ;;----------------------------------------------------------------------------
(use-package whitespace-cleanup-mode) (use-package whitespace-cleanup-mode)
(provide 'init-whitespace) (provide 'init-whitespace)
;;; init-whitespace.el ends here

11
modules/init-yaml.el Normal file
View File

@ -0,0 +1,11 @@
;;; init-yaml.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;; yaml-mode
(use-package yaml-mode
:mode ("\\.yml\\'" . yaml-mode))
(provide 'init-yaml)
;;; init-yaml.el ends here

37
modules/lib/myemacs.el Normal file
View File

@ -0,0 +1,37 @@
;;; myemacs.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;; myemacs reloj
;;; Code:
;;----------------------------------------------------------------------------
;; Some cool functions
;;----------------------------------------------------------------------------
;; These functions are made by me (Quitter: @heckyel) or
;; heavily modified by me
;;----------------------------------------------------------------------------
;; Toggles fullscreen
;;----------------------------------------------------------------------------
(defun myemacs/toggle-fullscreen ()
"Return a message string if the current doc string is invalid."
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_FULLSCREEN" 0)))
;;----------------------------------------------------------------------------
;; Runtime Emacs
;;----------------------------------------------------------------------------
(defun elapsed-time ()
"Return a message string if the current doc string is invalid.
Emacs runtime: See the following URL for more details.
https://emacs.stackexchange.com/questions/13535/function-to-get-init-el-file-loading-times-multiple-times?rq=1"
(let ((elapsed (float-time (time-subtract (current-time)
emacs-start-time))))
(message "[STARTUP] Loading %s ... done (%.3fs)" load-file-name elapsed)))
(provide 'myemacs)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; myemacs.el ends here

View File

@ -1,5 +1,11 @@
;; Garbage collection threshold ;;; settings.el --- .Emacs Configuration -*- lexical-binding: t -*-
(setq local/gc-cons-threshold (* 512 1024 1024)) ;;; Commentary:
;;; Code:
;; Make startup faster by reducing the frequency of garbage
;; collection. The default is 800 kilobytes. Measured in bytes.
(setq local/gc-cons-threshold (* 50 1000 1000))
(setq user-full-name "Jesús E.") (setq user-full-name "Jesús E.")
(setq user-mail-address "heckyel@hyperbola.info") (setq user-mail-address "heckyel@hyperbola.info")
@ -7,3 +13,8 @@
(setq large-file-warning-threshold (* 15 1024 1024)) (setq large-file-warning-threshold (* 15 1024 1024))
(prefer-coding-system 'utf-8) (prefer-coding-system 'utf-8)
(setq-default buffer-file-coding-system 'utf-8-auto-unix) (setq-default buffer-file-coding-system 'utf-8-auto-unix)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; settings.el ends here