summaryrefslogtreecommitdiffstats
path: root/roles/edit/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--roles/edit/templates/emacsconf-edit.el52
1 files changed, 42 insertions, 10 deletions
diff --git a/roles/edit/templates/emacsconf-edit.el b/roles/edit/templates/emacsconf-edit.el
index 2e360c7..481892b 100644
--- a/roles/edit/templates/emacsconf-edit.el
+++ b/roles/edit/templates/emacsconf-edit.el
@@ -1,7 +1,10 @@
;; {{ ansible_managed }}
-(let ((packages '({% for package in emacsconf_edit_packages %}{{ package }}{% endfor %})))
- (mapc (lambda (package) (unless (package-installed-p package) (package-install package))) packages))
+(progn (require 'package)
+ (let ((packages (seq-remove #'package-installed-p '({% for package in emacsconf_edit_packages %}{{ package }} {% endfor %}))))
+ (when packages
+ (package-refresh-contents)
+ (mapc #'package-install packages))))
;; Configuration
(vertico-mode)
(show-paren-mode)
@@ -19,16 +22,45 @@
(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")
+(with-eval-after-load 'projectile
+ (projectile-mode +1)
+ (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
+ (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))))
+
+(defhydra hydra-emacsconf ()
+ ("e" embark-act "embark")
+ ("t" emacsconf-go-to-talk "talk")
+ ("c"
+ (find-file emacsconf-org-file) "conf.org")
+ ("C"
+ (let ((default-directory (file-name-directory emacsconf-org-file)))
+ (call-interactively #'projectile-find-file))
+ "org dir")
+ ("w"
+ (let ((default-directory emacsconf-directory))
+ (call-interactively #'projectile-find-file))
+ "wiki")
+ ("o" (find-file (expand-file-name (concat emacsconf-year "/organizers-notebook/index.org") emacsconf-directory))
+ "org notes")
+ ("a" (let ((default-directory emacsconf-ansible-directory))
+ (call-interactively #'projectile-find-file))
+ "ansible")
+ ("i" (switch-to-buffer (erc-get-buffer "#emacsconf-org")))
+ ("l" (let ((default-directory "{{ emacsconf_el_dir }}"))
+ (call-interactively #'projectile-find-file))
+ "lisp")
+ ("b" emacsconf-backstage-dired "backstage")
+ ("u" emacsconf-upload-dired "upload"))
+(global-set-key (kbd "C-c e") #'hydra-emacsconf/body)
+
(require 'ox-md)
+(server-start)