diff options
-rw-r--r-- | custom.el | 2 | ||||
-rw-r--r-- | init.el | 11 | ||||
-rw-r--r-- | lisp/init-dokuwiki.el | 4 | ||||
-rw-r--r-- | lisp/init-editorconfig.el | 8 | ||||
-rw-r--r-- | lisp/init-pkgbuild.el | 4 | ||||
-rw-r--r-- | lisp/init-yaml.el | 5 | ||||
-rw-r--r-- | lisp/lib/myemacs.el | 18 | ||||
-rw-r--r-- | modules/init-ccc.el (renamed from lisp/init-ccc.el) | 0 | ||||
-rw-r--r-- | modules/init-crystal.el (renamed from lisp/init-crystal.el) | 9 | ||||
-rw-r--r-- | modules/init-diminish.el (renamed from lisp/init-diminish.el) | 8 | ||||
-rw-r--r-- | modules/init-dokuwiki.el | 12 | ||||
-rw-r--r-- | modules/init-ecb.el (renamed from lisp/init-ecb.el) | 10 | ||||
-rw-r--r-- | modules/init-editing-utils.el (renamed from lisp/init-editing-utils.el) | 14 | ||||
-rw-r--r-- | modules/init-editorconfig.el | 16 | ||||
-rw-r--r-- | modules/init-elpa.el (renamed from lisp/init-elpa.el) | 8 | ||||
-rw-r--r-- | modules/init-emmet-mode.el (renamed from lisp/init-emmet-mode.el) | 8 | ||||
-rw-r--r-- | modules/init-flycheck.el (renamed from lisp/init-flycheck.el) | 9 | ||||
-rw-r--r-- | modules/init-git.el (renamed from lisp/init-git.el) | 10 | ||||
-rw-r--r-- | modules/init-gui.el (renamed from lisp/init-gui.el) | 0 | ||||
-rw-r--r-- | modules/init-html.el (renamed from lisp/init-html.el) | 11 | ||||
-rw-r--r-- | modules/init-icons.el (renamed from lisp/init-icons.el) | 11 | ||||
-rw-r--r-- | modules/init-indent-guides.el (renamed from lisp/init-indent-guides.el) | 9 | ||||
-rw-r--r-- | modules/init-less.el (renamed from lisp/init-less.el) | 8 | ||||
-rw-r--r-- | modules/init-markdown.el (renamed from lisp/init-markdown.el) | 10 | ||||
-rw-r--r-- | modules/init-modeline.el (renamed from lisp/init-modeline.el) | 10 | ||||
-rw-r--r-- | modules/init-neotree.el (renamed from lisp/init-neotree.el) | 0 | ||||
-rw-r--r-- | modules/init-nginx.el (renamed from lisp/init-nginx.el) | 8 | ||||
-rw-r--r-- | modules/init-nlinum.el (renamed from lisp/init-nlinum.el) | 48 | ||||
-rw-r--r-- | modules/init-php.el (renamed from lisp/init-php.el) | 0 | ||||
-rw-r--r-- | modules/init-pkgbuild.el | 10 | ||||
-rw-r--r-- | modules/init-python.el (renamed from lisp/init-python.el) | 13 | ||||
-rw-r--r-- | modules/init-rainbow.el (renamed from lisp/init-rainbow.el) | 6 | ||||
-rw-r--r-- | modules/init-ready.el (renamed from lisp/init-ready.el) | 11 | ||||
-rw-r--r-- | modules/init-sass.el (renamed from lisp/init-sass.el) | 7 | ||||
-rw-r--r-- | modules/init-scss.el (renamed from lisp/init-scss.el) | 7 | ||||
-rw-r--r-- | modules/init-security.el (renamed from lisp/init-security.el) | 10 | ||||
-rw-r--r-- | modules/init-theme.el (renamed from lisp/init-theme.el) | 7 | ||||
-rw-r--r-- | modules/init-utils.el (renamed from lisp/init-utils.el) | 17 | ||||
-rw-r--r-- | modules/init-web-mode.el (renamed from lisp/init-web-mode.el) | 6 | ||||
-rw-r--r-- | modules/init-whitespace.el (renamed from lisp/init-whitespace.el) | 6 | ||||
-rw-r--r-- | modules/init-yaml.el | 11 | ||||
-rw-r--r-- | modules/lib/myemacs.el | 37 | ||||
-rw-r--r-- | modules/lib/sachachua.el (renamed from lisp/lib/sachachua.el) | 0 | ||||
-rw-r--r-- | settings.el | 15 |
44 files changed, 366 insertions, 68 deletions
@@ -11,7 +11,7 @@ '(ecb-options-version "2.50") '(package-selected-packages (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 was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -1,12 +1,16 @@ +;;; init.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; ;; Emacs!!! +;;; Code: (package-initialize) (when (version<= emacs-version "24") (error "This is made form Emacs >=24")) (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 (add-hook 'after-init-hook @@ -63,6 +67,7 @@ (require 'init-web-mode) (require 'init-ready) (require 'init-dokuwiki) + ;;; Loads custom file (when (file-exists-p custom-file) (load custom-file)) @@ -73,3 +78,7 @@ (message "[STARTUP] Loading %s ... done (%.3fs)" load-file-name elapsed))) (provide 'init) +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init.el ends here diff --git a/lisp/init-dokuwiki.el b/lisp/init-dokuwiki.el deleted file mode 100644 index 011c5bb..0000000 --- a/lisp/init-dokuwiki.el +++ /dev/null @@ -1,4 +0,0 @@ -;; dokuwiki-mode -(use-package dokuwiki-mode) - -(provide 'init-dokuwiki) diff --git a/lisp/init-editorconfig.el b/lisp/init-editorconfig.el deleted file mode 100644 index b2eed4f..0000000 --- a/lisp/init-editorconfig.el +++ /dev/null @@ -1,8 +0,0 @@ -;;---------------------------------------------------------------------------- -;; EditorConfig -;;---------------------------------------------------------------------------- -(use-package editorconfig) - -(editorconfig-mode 1) - -(provide 'init-editorconfig) diff --git a/lisp/init-pkgbuild.el b/lisp/init-pkgbuild.el deleted file mode 100644 index 6f6835c..0000000 --- a/lisp/init-pkgbuild.el +++ /dev/null @@ -1,4 +0,0 @@ -(use-package pkgbuild-mode - :mode ("/PKGBUILD$" . pkgbuild-mode)) - -(provide 'init-pkgbuild) diff --git a/lisp/init-yaml.el b/lisp/init-yaml.el deleted file mode 100644 index 637cb7b..0000000 --- a/lisp/init-yaml.el +++ /dev/null @@ -1,5 +0,0 @@ -;; yaml-mode -(use-package yaml-mode - :mode ("\\.yml\\'" . yaml-mode)) - -(provide 'init-yaml) diff --git a/lisp/lib/myemacs.el b/lisp/lib/myemacs.el deleted file mode 100644 index 6846bdc..0000000 --- a/lisp/lib/myemacs.el +++ /dev/null @@ -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)))
\ No newline at end of file diff --git a/lisp/init-ccc.el b/modules/init-ccc.el index 6733f3e..6733f3e 100644 --- a/lisp/init-ccc.el +++ b/modules/init-ccc.el diff --git a/lisp/init-crystal.el b/modules/init-crystal.el index a62061b..462b902 100644 --- a/lisp/init-crystal.el +++ b/modules/init-crystal.el @@ -1,3 +1,9 @@ +;;; init-crystal.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: + ;;---------------------------------------------------------------------------- ;; Crystal Mode ;;---------------------------------------------------------------------------- @@ -5,3 +11,6 @@ :mode ("\\.cr\\'" . crystal-mode)) (provide 'init-crystal) + +;; End: +;;; init-crystal.el ends here diff --git a/lisp/init-diminish.el b/modules/init-diminish.el index 3187103..1968f0d 100644 --- a/lisp/init-diminish.el +++ b/modules/init-diminish.el @@ -1,3 +1,8 @@ +;;; init-diminish.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; Diminish - is minor modes with no modeline display ;;---------------------------------------------------------------------------- @@ -7,3 +12,6 @@ (diminish 'undo-tree-mode) (provide 'init-diminish) + +;; End: +;;; init-diminish.el ends here diff --git a/modules/init-dokuwiki.el b/modules/init-dokuwiki.el new file mode 100644 index 0000000..40762a5 --- /dev/null +++ b/modules/init-dokuwiki.el @@ -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 diff --git a/lisp/init-ecb.el b/modules/init-ecb.el index 83e1286..865b206 100644 --- a/lisp/init-ecb.el +++ b/modules/init-ecb.el @@ -1,3 +1,8 @@ +;;; init-ecb.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; ECB ;;---------------------------------------------------------------------------- @@ -17,3 +22,8 @@ ) (provide 'init-ecb) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init-ecb.el ends here diff --git a/lisp/init-editing-utils.el b/modules/init-editing-utils.el index 292fa1d..b789d2c 100644 --- a/lisp/init-editing-utils.el +++ b/modules/init-editing-utils.el @@ -1,3 +1,9 @@ +;;; init-editing-utils.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: + ;;---------------------------------------------------------------------------- ;; Remove whitespaces ;;---------------------------------------------------------------------------- @@ -53,5 +59,11 @@ (setq undo-tree-visualizer-diff nil))) ;;---------------------------------------------------------------------------- -(myemacs/elapsed-time) +(load-file "~/.emacs.d/modules/lib/myemacs.el") + (provide 'init-editing-utils) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init-editing-utils.el ends here diff --git a/modules/init-editorconfig.el b/modules/init-editorconfig.el new file mode 100644 index 0000000..614dcce --- /dev/null +++ b/modules/init-editorconfig.el @@ -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 diff --git a/lisp/init-elpa.el b/modules/init-elpa.el index e5a6a3d..51f29c8 100644 --- a/lisp/init-elpa.el +++ b/modules/init-elpa.el @@ -1,3 +1,8 @@ +;;; init-elpa.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;; Find and load the correct package.el ;; ===================================================== ;; use-package → https://github.com/jwiegley/use-package @@ -31,3 +36,6 @@ ;; ===================================================== (provide 'init-elpa) + +;; End: +;;; init-elpa.el ends here diff --git a/lisp/init-emmet-mode.el b/modules/init-emmet-mode.el index e0a49f8..565266b 100644 --- a/lisp/init-emmet-mode.el +++ b/modules/init-emmet-mode.el @@ -1,3 +1,8 @@ +;;; init-emmet-mode.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;; emmet-mode (use-package emmet-mode ;; Enable for only languages @@ -8,3 +13,6 @@ ) (provide 'init-emmet-mode) + +;; End: +;;; init-emmet-mode.el ends here diff --git a/lisp/init-flycheck.el b/modules/init-flycheck.el index aa513c5..e4d383e 100644 --- a/lisp/init-flycheck.el +++ b/modules/init-flycheck.el @@ -1,3 +1,9 @@ +;;; init-flycheck.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: + (use-package flycheck ;; Enable for only languages :init @@ -24,3 +30,6 @@ ) (provide 'init-flycheck) + +;; End: +;;; init-flycheck.el ends here diff --git a/lisp/init-git.el b/modules/init-git.el index ef7acc1..7e96247 100644 --- a/lisp/init-git.el +++ b/modules/init-git.el @@ -29,7 +29,8 @@ (max-line-length 0)) (save-excursion (while (<= linenum-start linenum-end) - (goto-line linenum-start) + (with-no-warnings + (goto-line linenum-start)) (setq tmp-line (replace-regexp-in-string "^[ \t]*" "" (buffer-substring (line-beginning-position) (line-end-position)))) @@ -55,7 +56,8 @@ ;; ivy8- strip the `(car e)' ;; we handle both data structure (unless (numberp e) (setq e (cdr e))) - (goto-line e))) + (with-no-warnings + (goto-line e)))) (message "NO git-gutters-fringe!"))))) (use-package gitconfig-mode @@ -94,4 +96,8 @@ (add-hook 'buffer-list-update-hook #'enable-smerge-maybe)) (provide 'init-git) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: ;;; init-git.el ends here diff --git a/lisp/init-gui.el b/modules/init-gui.el index 9bd32a5..9bd32a5 100644 --- a/lisp/init-gui.el +++ b/modules/init-gui.el diff --git a/lisp/init-html.el b/modules/init-html.el index b2ad2ef..45e1131 100644 --- a/lisp/init-html.el +++ b/modules/init-html.el @@ -1,3 +1,9 @@ +;;; init-html.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: + ;;;;;;;;;;;;;;;;;;;;;;;;; ;; HTML Mode ;;;;;;;;;;;;;;;;;;;;;;;;; @@ -11,3 +17,8 @@ (add-hook 'html-mode-hook 'highlight-indent-guides-mode) (provide 'init-html) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init-html.el ends here diff --git a/lisp/init-icons.el b/modules/init-icons.el index 198d8c0..ff2d81f 100644 --- a/lisp/init-icons.el +++ b/modules/init-icons.el @@ -1,3 +1,9 @@ +;;; init-icons.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: + ;;---------------------------------- ;; All-the-icons ;;---------------------------------- @@ -15,3 +21,8 @@ (setq inhibit-compacting-font-caches t) (provide 'init-icons) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init-icons.el ends here diff --git a/lisp/init-indent-guides.el b/modules/init-indent-guides.el index 24fb8d2..ced3ad0 100644 --- a/lisp/init-indent-guides.el +++ b/modules/init-indent-guides.el @@ -1,3 +1,9 @@ +;;; init-indent-guides.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: + ;; This minor mode highlights indentation levels via font-lock (use-package highlight-indent-guides @@ -7,3 +13,6 @@ (setq highlight-indent-guides-method 'character)) (provide 'init-indent-guides) + +;; End: +;;; init-indent-guides.el ends here diff --git a/lisp/init-less.el b/modules/init-less.el index fdd5527..5579f18 100644 --- a/lisp/init-less.el +++ b/modules/init-less.el @@ -1,3 +1,8 @@ +;;; init-less.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; Less Mode ;;---------------------------------------------------------------------------- @@ -5,3 +10,6 @@ :mode ("\\.less\\'" . less-css-mode)) (provide 'init-less) + +;; End: +;;; init-less.el ends here diff --git a/lisp/init-markdown.el b/modules/init-markdown.el index 0e86560..b7032db 100644 --- a/lisp/init-markdown.el +++ b/modules/init-markdown.el @@ -1,6 +1,8 @@ -;;---------------------------------------------------------------------------- -;; Markdown mode -;;---------------------------------------------------------------------------- +;;; init-markdown.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: (use-package markdown-mode :mode (("\\.markdown\\'" . markdown-mode) ("\\.md\\'" . markdown-mode)) @@ -31,3 +33,5 @@ "</html>\n"))) (provide 'init-markdown) + +;;; init-markdown.el ends here diff --git a/lisp/init-modeline.el b/modules/init-modeline.el index 56e4f3d..4444a09 100644 --- a/lisp/init-modeline.el +++ b/modules/init-modeline.el @@ -1,3 +1,8 @@ +;;; init-modeline.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; Modeline configuration ;;---------------------------------------------------------------------------- @@ -42,5 +47,8 @@ (global-set-key (kbd "M-%") '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) + +;; End: +;;; init-modeline.el ends here diff --git a/lisp/init-neotree.el b/modules/init-neotree.el index ff38aa8..ff38aa8 100644 --- a/lisp/init-neotree.el +++ b/modules/init-neotree.el diff --git a/lisp/init-nginx.el b/modules/init-nginx.el index 2ed0b4d..bc8cdad 100644 --- a/lisp/init-nginx.el +++ b/modules/init-nginx.el @@ -1,3 +1,8 @@ +;;; init-nginx.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;--------------------------- ;; Nginx Mode ;;--------------------------- @@ -5,3 +10,6 @@ :mode ("/nginx/sites-\\(?:available\\|enabled\\)/" . nginx-mode)) (provide 'init-nginx) + +;; End: +;;; init-nginx.el ends here diff --git a/lisp/init-nlinum.el b/modules/init-nlinum.el index bd2737f..be26193 100644 --- a/lisp/init-nlinum.el +++ b/modules/init-nlinum.el @@ -1,8 +1,18 @@ +;;; init-nlinum.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; Line numbers ;;---------------------------------------------------------------------------- ;; 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 hl-line) @@ -13,6 +23,8 @@ (add-hook 'linum-before-numbering-hook '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 (count-lines (point-min) (point-max)))))) (format (concat "%" (number-to-string width) "d \u2502"))) @@ -21,6 +33,8 @@ (defvar my-linum-current-line-number 0) (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 (if (eq line-number my-linum-current-line-number) 'my-linum-hl @@ -28,6 +42,8 @@ (setq linum-format 'my-linum-format) (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))) ad-do-it)) (ad-activate 'linum-update) @@ -35,33 +51,46 @@ (defvar *linum-mdown-line* nil) (defun line-at-click () + "Funtions for position lines. +this helps maintain the move visual." (save-excursion (let ((click-y (cdr (cdr (mouse-position)))) (line-move-visual-store line-move-visual)) (setq line-move-visual t) (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) ;; If you are using tabbar substitute the next line with ;; (line-number-at-pos)))) (1+ (line-number-at-pos))))) (defun md-select-linum () + "Funtions for position lines. +this helps maintain the move visual." (interactive) - (goto-line (line-at-click)) + (with-no-warnings + (goto-line (line-at-click))) (set-mark (point)) (setq *linum-mdown-line* (line-number-at-pos))) (defun mu-select-linum () + "Funtions for position lines. +this helps maintain the move visual." (interactive) (when *linum-mdown-line* (let (mu-line) ;; (goto-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)) - (goto-line (min *linum-mdown-line* mu-line)) + (with-no-warnings + (goto-line (min *linum-mdown-line* mu-line))) (setq *linum-mdown* nil)))) @@ -69,8 +98,9 @@ (global-set-key (kbd "<left-margin> <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) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init-nlinum.el ends here diff --git a/lisp/init-php.el b/modules/init-php.el index b81e5b8..b81e5b8 100644 --- a/lisp/init-php.el +++ b/modules/init-php.el diff --git a/modules/init-pkgbuild.el b/modules/init-pkgbuild.el new file mode 100644 index 0000000..427e442 --- /dev/null +++ b/modules/init-pkgbuild.el @@ -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 diff --git a/lisp/init-python.el b/modules/init-python.el index fd2845a..cbce258 100644 --- a/lisp/init-python.el +++ b/modules/init-python.el @@ -1,3 +1,8 @@ +;;; init-python.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; Python Mode ;;---------------------------------------------------------------------------- @@ -19,7 +24,8 @@ (use-package pip-requirements) (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) (define-key python-mode-map (kbd "C-]") 'jedi:goto-definition) ;goto define (local-set-key (kbd "<f1>") 'jedi:show-doc) @@ -30,3 +36,8 @@ ;; M-x jedi:install-server (provide 'init-python) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init-python.el ends here diff --git a/lisp/init-rainbow.el b/modules/init-rainbow.el index 8305867..52db71e 100644 --- a/lisp/init-rainbow.el +++ b/modules/init-rainbow.el @@ -1,3 +1,8 @@ +;;; init-rainbow.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;; rainbow-mode (use-package rainbow-mode :init @@ -9,3 +14,4 @@ (add-hook 'html-mode-hook 'rainbow-mode)) (provide 'init-rainbow) +;;; init-rainbow.el ends here diff --git a/lisp/init-ready.el b/modules/init-ready.el index 787a5d0..dba8a0f 100644 --- a/lisp/init-ready.el +++ b/modules/init-ready.el @@ -1,13 +1,18 @@ +;;; init-ready.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;------------------------- ;; Emacs Ready :) ;;------------------------- - (add-hook 'emacs-startup-hook (lambda () - (message "Emacs cargado en %s y listo para ser usado." - (format "%.2f segundos" + (message "Emacs ready in %s with %d garbage collections." + (format "%.2f seconds" (float-time (time-subtract after-init-time before-init-time))) gcs-done))) (provide 'init-ready) +;;; init-ready.el ends here diff --git a/lisp/init-sass.el b/modules/init-sass.el index bcce530..cd9c878 100644 --- a/lisp/init-sass.el +++ b/modules/init-sass.el @@ -1,3 +1,8 @@ +;;; init-sass.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; Sass Mode ;;---------------------------------------------------------------------------- @@ -5,3 +10,5 @@ :mode ("\\.sass\\'" . sass-mode)) (provide 'init-sass) + +;;; init-sass.el ends here diff --git a/lisp/init-scss.el b/modules/init-scss.el index a9c4a63..76cb770 100644 --- a/lisp/init-scss.el +++ b/modules/init-scss.el @@ -1,3 +1,8 @@ +;;; init-scss.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; Scss Mode ;;---------------------------------------------------------------------------- @@ -5,3 +10,5 @@ :mode ("\\.scss\\'" . scss-mode)) (provide 'init-scss) + +;;; init-scss.el ends here diff --git a/lisp/init-security.el b/modules/init-security.el index 995916d..68b1eb6 100644 --- a/lisp/init-security.el +++ b/modules/init-security.el @@ -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 ;;--------------------------------------------------------------------------------------------- @@ -10,3 +15,8 @@ (setq gnutls-trustfiles (list trustfile))) (provide 'init-security) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init-security.el ends here diff --git a/lisp/init-theme.el b/modules/init-theme.el index b3f0cd1..379b294 100644 --- a/lisp/init-theme.el +++ b/modules/init-theme.el @@ -1,3 +1,8 @@ +;;; init-theme.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: (use-package sublime-themes :config (load-theme 'spolsky t) @@ -8,3 +13,5 @@ :group 'linum)) (provide 'init-theme) + +;;; init-theme.el ends here diff --git a/lisp/init-utils.el b/modules/init-utils.el index a0b9fe0..ffcdd9f 100644 --- a/lisp/init-utils.el +++ b/modules/init-utils.el @@ -1,24 +1,31 @@ +;;; init-utils.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;; Loads functions from libs (defun load-directory (dir) + "Load functions from the libs DIR. +read the .el files" (let ((load-it (lambda (f) (load-file (concat (file-name-as-directory dir) f))) )) (mapc load-it (directory-files dir nil "\\.el$")))) ;; 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. - (if (fboundp 'with-eval-after-load) (defalias 'after-load 'with-eval-after-load) (defmacro after-load (feature &rest body) "After FEATURE is loaded, evaluate BODY." (declare (indent defun)) - '(eval-after-load, feature - '(progn, @body)))) + `(eval-after-load, feature + '(progn ,@body)))) ;; Elapsed time -(myemacs/elapsed-time) +(load-file "~/.emacs.d/modules/lib/myemacs.el") (provide 'init-utils) +;;; init-utils.el ends here diff --git a/lisp/init-web-mode.el b/modules/init-web-mode.el index 720e7ec..ae3be70 100644 --- a/lisp/init-web-mode.el +++ b/modules/init-web-mode.el @@ -1,3 +1,8 @@ +;;; init-web-mode.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: (use-package web-mode :mode (("\\.html?\\'" . web-mode) ("\\.djhtml\\'" . web-mode) @@ -12,3 +17,4 @@ ) (provide 'init-web-mode) +;;; init-web-mode.el ends here diff --git a/lisp/init-whitespace.el b/modules/init-whitespace.el index 27f61c3..573dbb9 100644 --- a/lisp/init-whitespace.el +++ b/modules/init-whitespace.el @@ -1,6 +1,12 @@ +;;; init-whitespace.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: ;;---------------------------------------------------------------------------- ;; Whitespace Mode | tool ;;---------------------------------------------------------------------------- (use-package whitespace-cleanup-mode) (provide 'init-whitespace) +;;; init-whitespace.el ends here diff --git a/modules/init-yaml.el b/modules/init-yaml.el new file mode 100644 index 0000000..47c533c --- /dev/null +++ b/modules/init-yaml.el @@ -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 diff --git a/modules/lib/myemacs.el b/modules/lib/myemacs.el new file mode 100644 index 0000000..1800e97 --- /dev/null +++ b/modules/lib/myemacs.el @@ -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 diff --git a/lisp/lib/sachachua.el b/modules/lib/sachachua.el index c862223..c862223 100644 --- a/lisp/lib/sachachua.el +++ b/modules/lib/sachachua.el diff --git a/settings.el b/settings.el index 8e0bce3..70f9cc1 100644 --- a/settings.el +++ b/settings.el @@ -1,5 +1,11 @@ -;; Garbage collection threshold -(setq local/gc-cons-threshold (* 512 1024 1024)) +;;; settings.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; 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-mail-address "heckyel@hyperbola.info") @@ -7,3 +13,8 @@ (setq large-file-warning-threshold (* 15 1024 1024)) (prefer-coding-system 'utf-8) (setq-default buffer-file-coding-system 'utf-8-auto-unix) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; settings.el ends here |