diff --git a/emacs/emacs b/emacs/emacs deleted file mode 100644 index ec22a5f..0000000 --- a/emacs/emacs +++ /dev/null @@ -1,25 +0,0 @@ -(require 'package) -(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) - (not (gnutls-available-p)))) - (proto (if no-ssl "http" "https"))) - ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired - (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) - ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) - (when (< emacs-major-version 24) - ;; For important compatibility libraries like cl-lib - (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/"))))) -(package-initialize) -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(package-selected-packages (quote (evil magit)))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) -(require 'evil) -(evil-mode 1) diff --git a/emacs/init.el b/emacs/init.el new file mode 100644 index 0000000..2d32ecc --- /dev/null +++ b/emacs/init.el @@ -0,0 +1,24 @@ +(require 'package) +(add-to-list 'package-archives + '("melpa" . "https://melpa.org/packages/") t) +(package-initialize) + + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(package-selected-packages (quote (evil-magit evil magit)))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) + +(require 'evil) +(evil-mode 1) + +(require 'fringe) +(set-fringe-mode nil) diff --git a/playbooks/roles/common/tasks/main.yml b/playbooks/roles/common/tasks/main.yml index 9385fe8..759878a 100644 --- a/playbooks/roles/common/tasks/main.yml +++ b/playbooks/roles/common/tasks/main.yml @@ -5,6 +5,8 @@ - dev_machine == true - import_role: name: neovim +- import_role: + name: emacs - import_role: name: rust vars: diff --git a/playbooks/roles/emacs/defaults/main.yml b/playbooks/roles/emacs/defaults/main.yml new file mode 100644 index 0000000..3660559 --- /dev/null +++ b/playbooks/roles/emacs/defaults/main.yml @@ -0,0 +1,2 @@ +--- +dev_machine: yes diff --git a/playbooks/roles/emacs/tasks/main.yml b/playbooks/roles/emacs/tasks/main.yml new file mode 100644 index 0000000..005529d --- /dev/null +++ b/playbooks/roles/emacs/tasks/main.yml @@ -0,0 +1,13 @@ +--- +- name: Ensure emacs config directory exists + file: + path: ~/.emacs.d + state: directory + +- name: Symlink init.el + file: + src: ~/.dotfiles/emacs/init.el + dest: ~/.emacs.d/init.el + state: link + force: yes +