From aa7650e975ac316a41373576fc78cd64422e7ad0 Mon Sep 17 00:00:00 2001 From: aciceri Date: Wed, 27 Oct 2021 01:21:39 +0200 Subject: [PATCH] Emacs haskell-mode, python3Full instead of python and org-roam util --- pkgs/emacs/default.nix | 3 ++- users/profiles/emacs/default.nix | 2 +- .../profiles/emacs/emacs.d/config/config-org.el | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/pkgs/emacs/default.nix b/pkgs/emacs/default.nix index 15ee47b..45dcf5c 100644 --- a/pkgs/emacs/default.nix +++ b/pkgs/emacs/default.nix @@ -15,6 +15,7 @@ emacsWithPackages ( evil evil-collection fira-code-mode + haskell-mode helm helm-ag helm-company @@ -48,6 +49,6 @@ emacsWithPackages ( minimap ] ) ++ ( - with pkgs; [] + with pkgs; [ ] ) ) diff --git a/users/profiles/emacs/default.nix b/users/profiles/emacs/default.nix index 016c750..e0bf69c 100644 --- a/users/profiles/emacs/default.nix +++ b/users/profiles/emacs/default.nix @@ -18,7 +18,7 @@ } else { }; home.packages = with pkgs; [ - python + python3Full fd ag nixpkgs-fmt diff --git a/users/profiles/emacs/emacs.d/config/config-org.el b/users/profiles/emacs/emacs.d/config/config-org.el index 753df6f..e586f1f 100644 --- a/users/profiles/emacs/emacs.d/config/config-org.el +++ b/users/profiles/emacs/emacs.d/config/config-org.el @@ -16,9 +16,15 @@ ("#+END_SRC" . "†") ("#+begin_src" . "λ") ("#+end_src" . "λ"))) + (org-babel-python-command "python3") + (org-src-preserve-indentation t) + :config + (org-babel-do-load-languages + 'org-babel-load-languages + '((python . t))) :hook ((org-mode . auto-fill-mode) ;refill-mode breaks org headings - (org-mode . org-num-mode) + ;(org-mode . org-num-mode) (org-mode . (lambda () (dolist (face '((org-level-1 1.5) (org-level-2 1.4) @@ -65,10 +71,18 @@ ("C-c n f" . org-roam-node-find) ("C-c n g" . org-roam-graph) ("C-c n i" . org-roam-node-insert) + ("C-c n I" . org-roam-node-insert-immediate) ("C-c n c" . org-roam-capture) ;; Dailies ("C-c n j" . org-roam-dailies-capture-today)) :config + (defun org-roam-node-insert-immediate (arg &rest args) + (interactive "P") + (let ((args (cons arg args)) + (org-roam-capture-templates (list (append (car org-roam-capture-templates) + '(:immediate-finish t))))) + (apply #'org-roam-node-insert args))) + (defun org-hide-properties () "Hide all org-mode headline property drawers in buffer. Could be slow if it has a lot of overlays." (interactive)