Move everything to folders.

* Remove not working function to create files with helm
* Add SQL language file
* Fine-tune emacs lisp completion settings
This commit is contained in:
Maciej Szlosarczyk 2017-10-29 00:52:41 +03:00
parent 5bd7066cde
commit 42ebb1394d
No known key found for this signature in database
GPG key ID: 94798DD7F02D70C1
13 changed files with 45 additions and 39 deletions

View file

@ -14,7 +14,6 @@
kept-old-versions 2
version-control t)
; Use Shells variables
(when (memq window-system '(mac ns))
(exec-path-from-shell-initialize))
@ -207,11 +206,4 @@
(require 'helm-projectile)
(with-eval-after-load 'helm-projectile
(defvar helm-source-file-not-found
(helm-build-dummy-source
"Create file"
:action (lambda (cand) (find-file cand))))
(add-to-list 'helm-projectile-sources-list helm-source-file-not-found t))
;;; behaviour.el ends here

View file

View file

@ -7,28 +7,15 @@
(require 'company)
;; Imports
(load "~/.emacs.d/languages/ruby.el")
(load "~/.emacs.d/languages/python.el")
(load "~/.emacs.d/languages/elisp.el")
(load "~/.emacs.d/languages/elixir.el")
(load "~/.emacs.d/languages/rust.el")
(load "~/.emacs.d/languages/web.el")
(load "~/.emacs.d/languages/js.el")
(load "~/.emacs.d/languages/ruby.elc")
(load "~/.emacs.d/languages/python.elc")
(load "~/.emacs.d/languages/elisp.elc")
(load "~/.emacs.d/languages/elixir.elc")
(load "~/.emacs.d/languages/rust.elc")
(load "~/.emacs.d/languages/web.elc")
(load "~/.emacs.d/languages/js.elc")
(load "~/.emacs.d/languages/sql.elc")
;;; SQL
(defun sql-mode-hook ()
"Editor setup for SQL."
(remove-hook 'ruby-mode-hook 'ruby-mode-config)
(remove-hook 'elixir-mode-hook 'elixir-mode-config)
(remove-hook 'emacs-lisp-mode-hook 'elisp-mode-config)
(remove-hook 'html-mode-hook 'web-mode-config)
(remove-hook 'haskell-mode-hook 'haskell-mode-config)
(remove-hook 'java-mode-hook 'java-mode-config)
(set-indent 4))
(add-hook 'sql-mode-hook 'flycheck-mode)
(add-hook 'sql-mode-hook 'set-width-120)
;;; Haskell
(defun haskell-mode-config ()

View file

@ -14,7 +14,7 @@
(display-time-mode t)
()
(load-theme 'flatui t t)
(load "~/.emacs.d/base16-not-harmonic-theme.el")
(load "~/.emacs.d/config/base16-not-harmonic-theme.el")
(load-theme 'base16-not-harmonic t t)
(load-theme 'base16-mexico-light t t)
(load-theme 'base16-unikitty-light t t)

16
init.el
View file

@ -8,14 +8,14 @@
;; You may delete these explanatory comments.
(package-initialize)
(load "~/.emacs.d/packages.elc")
(load "~/.emacs.d/functions.elc")
(load "~/.emacs.d/behaviour.elc")
(load "~/.emacs.d/themes.elc")
(load "~/.emacs.d/key-bindings.elc")
(load "~/.emacs.d/spelling.elc")
(load "~/.emacs.d/languages.elc")
(load "~/.emacs.d/windows.elc")
(load "~/.emacs.d/config/packages.elc")
(load "~/.emacs.d/config/functions.elc")
(load "~/.emacs.d/config/behaviour.elc")
(load "~/.emacs.d/config/themes.elc")
(load "~/.emacs.d/config/key-bindings.elc")
(load "~/.emacs.d/config/spelling.elc")
(load "~/.emacs.d/config/languages.elc")
(load "~/.emacs.d/config/windows.elc")
(provide 'init)
;;; init.el ends here

View file

@ -15,7 +15,7 @@
(company-mode 1)
(flycheck-mode 1)
(set (make-local-variable 'company-backends)
'((company-yasnippet company-dabbrev-code company-files))))
'((company-yasnippet company-capf company-dabbrev-code company-files))))
;;========== Hooks =================================
(add-hook 'emacs-lisp-mode-hook 'editor-config-elisp)

27
languages/sql.el Normal file
View file

@ -0,0 +1,27 @@
;;; SQL -- summary
;;; Commentary:
;;; Code:
;;========== Editor config =========================
(defun editor-config-sql ()
"Setup editor for SQL."
(set-indent 4)
(set-width-120))
;;========== Company config =========================
(defun completion-config-sql ()
(company-mode 1)
(flycheck-mode 1)
(set (make-local-variable 'company-backends)
'(company-yasnippet company-etags company-dabbrev-code company-capf
company-files)))
;;========== Hooks =========================
(add-hook 'sql-mode-hook 'editor-config-sql)
(add-hook 'sql-mode-hook 'completion-config-sql)
;;; sql.el ends here.