diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-16 18:11:09 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-16 18:11:09 -0400 |
commit | 12c465a8f6e127a599b0477094552fc90c7e2ce0 (patch) | |
tree | 81abef4c2a2d0230ca403eed1133815f2e37a740 /roles/wiki-edit | |
parent | 84ccb907a14bd8bd06afec7b5ac836fa7a0883f6 (diff) | |
parent | 54af5163644ef58a641e86288c7af8653970a319 (diff) | |
download | emacsconf-ansible-12c465a8f6e127a599b0477094552fc90c7e2ce0.tar.xz emacsconf-ansible-12c465a8f6e127a599b0477094552fc90c7e2ce0.zip |
Merge branch 'main' of git.emacsconf.org:pub/emacsconf-ansible into main
Diffstat (limited to 'roles/wiki-edit')
-rw-r--r-- | roles/wiki-edit/defaults/main.yml | 7 | ||||
-rw-r--r-- | roles/wiki-edit/tasks/main.yaml | 11 | ||||
-rw-r--r-- | roles/wiki-edit/templates/emacsconf-edit.el | 32 |
3 files changed, 50 insertions, 0 deletions
diff --git a/roles/wiki-edit/defaults/main.yml b/roles/wiki-edit/defaults/main.yml new file mode 100644 index 0000000..ea0fbdb --- /dev/null +++ b/roles/wiki-edit/defaults/main.yml @@ -0,0 +1,7 @@ +emacsconf_edit_packages: + - consult + - embark + - embark-consult + - vertico + - magit + - modus-themes diff --git a/roles/wiki-edit/tasks/main.yaml b/roles/wiki-edit/tasks/main.yaml new file mode 100644 index 0000000..f77535f --- /dev/null +++ b/roles/wiki-edit/tasks/main.yaml @@ -0,0 +1,11 @@ +--- +- name: Set up Emacs configuration for interactive editing + template: + src: emacsconf-edit.el + dest: "{{ emacs_config_dir }}/emacsconf-edit.el" +- name: Check if Emacs base configuration already exists + lineinfile: + dest: "{{ emacs_config_dir }}/init.el" + state: present + regexp: "emacsconf-edit" + line: "(load-file \"emacsconf-edit.el\")" diff --git a/roles/wiki-edit/templates/emacsconf-edit.el b/roles/wiki-edit/templates/emacsconf-edit.el new file mode 100644 index 0000000..78e11a8 --- /dev/null +++ b/roles/wiki-edit/templates/emacsconf-edit.el @@ -0,0 +1,32 @@ +(let ((packages '({% for package in emacsconf_edit_packages %}{{ package }}{% endfor %}))) + (mapc (lambda (package) (unless (package-installed-p package) (package-install package))) packages)) +;; Configuration +(vertico-mode) +(show-paren-mode) +(fset 'yes-or-no-p 'y-or-n-p) +(global-set-key (kbd "C-x g") 'magit-status) +(global-set-key (kbd "C-x b") 'consult-buffer) +(global-set-key (kbd "M-g t") 'emacsconf-go-to-talk) +(global-set-key (kbd "C-.") 'embark-act) +(global-set-key (kbd "C-c .") 'embark-act) +(global-set-key (kbd "C-;") 'embark-act) +(modus-themes-load-vivendi) +(org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (shell . t))) +(setq backup-directory-alist '(("." . "~/.emacs.d/backups"))) +(find-file "{{ emacsconf_private_dir }}/conf.org") +(split-window-horizontally) +(magit-status "{{ emacsconf_edit_wiki_dir }}") +(global-auto-revert-mode 1) +(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) +(projectile-mode +1) +(setq projectile-completion-system 'default) +(setq projectile-enable-caching t) +(setq projectile-indexing-method 'alien) +(add-to-list 'projectile-globally-ignored-files "node_modules") +(add-to-list 'projectile-globally-ignored-files ".cache") +(add-to-list 'projectile-globally-ignored-files "_cache") + +(setq completion-styles '(orderless)) +(setq completion-category-defaults nil) +(setq completion-category-overrides '((file (styles orderless)))) +(require 'ox-md) |