From 58462d2961fb0683f9942af1aea6a36705c8f9e6 Mon Sep 17 00:00:00 2001 From: Maciej Szlosarczyk Date: Sun, 9 Sep 2018 01:01:00 +0300 Subject: [PATCH] Add Elixir and ispell configuration --- 06company-yasnippet.el | 13 +++---------- 08purpose.el | 3 ++- 09ispell.el | 6 ++++++ 20elixir.el | 5 +++++ init.el | 6 +++++- 5 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 09ispell.el create mode 100644 20elixir.el diff --git a/06company-yasnippet.el b/06company-yasnippet.el index 592f002..67aba7c 100644 --- a/06company-yasnippet.el +++ b/06company-yasnippet.el @@ -24,18 +24,11 @@ company-yasnippet ) company-elisp ; Emacs Lisp - ;; company-semantic ; C/C++ - (company-clang company-cmake) ; C/C++ - company-robe - ;; company-eclim ; Java - ;; company-ropemacs ; Python - company-nxml company-css ; HTML, CSS, XML - ;; company-xcode ; for Xcode projects - company-bbdb ; BBDB - (company-dabbrev-code company-dabbrev company-abbrev) ; abbrev + company-robe ;; Ruby + alchemist-company ;; Elixir + (company-dabbrev-code company-dabbrev company-abbrev) ;; abbrev company-files ; files & directory company-ispell ; Ispell - ;; company-oddmuse ; wiki )) (global-company-mode 1) diff --git a/08purpose.el b/08purpose.el index 6d613c6..71b96ca 100644 --- a/08purpose.el +++ b/08purpose.el @@ -60,7 +60,8 @@ (add-to-list 'purpose-user-mode-purposes '(dired-mode . tools)) (add-to-list 'purpose-user-mode-purposes '(magit-mode . tools)) (add-to-list 'purpose-user-mode-purposes '(help-mode . tools)) -(add-to-list 'purpose-user-mode-purposes '(helm-mode . tools)) +(add-to-list 'purpose-user-mode-purposes '(ivy-mode . tools)) +(add-to-list 'purpose-user-mode-purposes '(counsel-mode . tools)) (add-to-list 'purpose-user-mode-purposes '(compilation-mode . tools)) (add-to-list 'purpose-user-mode-purposes '(etags-select-mode . tools)) (add-to-list 'purpose-user-mode-purposes '(reb-mode . tools)) ;; Regexp builder diff --git a/09ispell.el b/09ispell.el new file mode 100644 index 0000000..b800c21 --- /dev/null +++ b/09ispell.el @@ -0,0 +1,6 @@ +(require 'ispell) +;; Highlight misspelled words +(setq ispell-program-name "aspell") +(setq ispell-extra-args + '("--run-together" "--run-together-limit=5" "--run-together-min=2")) +(add-hook 'prog-mode-hook 'flyspell-mode) diff --git a/20elixir.el b/20elixir.el new file mode 100644 index 0000000..d44a248 --- /dev/null +++ b/20elixir.el @@ -0,0 +1,5 @@ +(add-hook 'elixir-mode 'alchemist-mode) +(add-hook 'elixir-mode 'ruby-end-mode) + +(eval-after-load 'company + '(push 'alchemist-company company-backends)) diff --git a/init.el b/init.el index 1defceb..cb38116 100644 --- a/init.el +++ b/init.el @@ -59,6 +59,9 @@ rvm ;; Support rvm usage ruby-end ;; Insert end for methods automatically + ;; Elixir + alchemist + ;; Web web-mode @@ -84,6 +87,7 @@ (load "~/.emacs.d/06company-yasnippet.el") (load "~/.emacs.d/07projectile.el") (load "~/.emacs.d/08purpose.el") +(load "~/.emacs.d/09ispell.el") (load "~/.emacs.d/10themes.el") ;; Actual supported languages @@ -98,7 +102,7 @@ ;; If there is more than one, they won't work right. '(package-selected-packages (quote - (evil-magit window-purpose column-enforce-mode yaml-mode ansible dockerfile-mode evil-nerd-commenter ruby-end web-mode flymake-ruby rvm dash-at-point robe base16-theme exec-path-from-shell evil)))) + (company-ansible alchemist evil-magit window-purpose column-enforce-mode yaml-mode ansible dockerfile-mode evil-nerd-commenter ruby-end web-mode flymake-ruby rvm dash-at-point robe base16-theme exec-path-from-shell evil)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful.