]> xn--ix-yja.es Git - alex.git/commitdiff
Initial emacs config
authoralex <alex@pdp7.net>
Tue, 13 Dec 2022 20:31:10 +0000 (21:31 +0100)
committeralex <alex@pdp7.net>
Tue, 13 Dec 2022 20:31:10 +0000 (21:31 +0100)
emacs/emacs.el [new file with mode: 0644]

diff --git a/emacs/emacs.el b/emacs/emacs.el
new file mode 100644 (file)
index 0000000..c93c714
--- /dev/null
@@ -0,0 +1,32 @@
+;; symlink this file to ~/.emacs
+
+(defvar bootstrap-version)
+(let ((bootstrap-file
+       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
+      (bootstrap-version 6))
+  (unless (file-exists-p bootstrap-file)
+    (with-current-buffer
+        (url-retrieve-synchronously
+         "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
+         'silent 'inhibit-cookies)
+      (goto-char (point-max))
+      (eval-print-last-sexp)))
+  (load bootstrap-file nil 'nomessage))
+
+(straight-use-package 'helm)
+(straight-use-package 'projectile)
+(straight-use-package 'adoc-mode)
+(straight-use-package
+ '(flymake-vale :type git :host github :repo "tpeacock19/flymake-vale"))
+
+(projectile-mode +1)
+(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
+
+(global-set-key (kbd "M-x") #'helm-M-x)
+(global-set-key (kbd "C-x r b") #'helm-filtered-bookmarks)
+(global-set-key (kbd "C-x C-f") #'helm-find-files)
+(helm-mode 1)
+
+(add-hook 'adoc-mode-hook #'flymake-vale-load)
+(add-hook 'find-file-hook 'flymake-vale-maybe-load)
+(add-hook 'adoc-mode-hook 'flymake-mode)