From 96b3a0c66c27b958ce1df8c3bdefa780eaacf807 Mon Sep 17 00:00:00 2001 From: Vladislav Slobodenyuk Date: Tue, 25 Feb 2025 20:26:51 +0900 Subject: [PATCH] Install ediprolog, enable dired-dwim-target. --- .config.d/05-basic.el | 5 +++++ .config.d/15-lsp.el | 22 +++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.config.d/05-basic.el b/.config.d/05-basic.el index 97be153..f1ab44a 100644 --- a/.config.d/05-basic.el +++ b/.config.d/05-basic.el @@ -108,4 +108,9 @@ (keymap-global-set "C-c l" 'compile) (keymap-global-set "C-c C-l" 'recompile) +;; When set to true, dired will try to guess the target directory. Use this by +;; first splitting the window in two, selecting the destination in a new buffer, +;; and use 'C' to copy the file/directory. +(setq dired-dwim-target t) + ;;; 05-basic.el ends here diff --git a/.config.d/15-lsp.el b/.config.d/15-lsp.el index bc5efb7..98a04cf 100644 --- a/.config.d/15-lsp.el +++ b/.config.d/15-lsp.el @@ -33,6 +33,8 @@ :defer t :commands (rust-mode)) +(add-hook 'rust-mode-hook #'eglot-ensure) + ;; This package provides integration with Prolog (SWI). (use-package sweeprolog :straight (sweeprolog :type git @@ -47,10 +49,24 @@ :commands (sweeprolog-mode sweeprolog-top-level) :init - (setq sweeprolog-swipl-path "swipl") - (add-to-list 'auto-mode-alist '("\\.plt?\\'" . sweeprolog-mode))) + (setq sweeprolog-swipl-path "swipl")) -(add-hook 'rust-mode-hook #'eglot-ensure) + +;; This package provides integration with Prolog (scryer) Note that editing +;; prolog is supported through built-in prolog-mode, this only allows actually +;; consulting prolog from within emacs. +(use-package ediprolog + :ensure t + :defer t + :commands (prolog-mode) + :init + (setq ediprolog-program "systemd-run") + (setq ediprolog-program-switches '("--user" "--scope" "-p" "MemoryMax=2G" "-p" "MemoryHigh=1.9G" "scryer-prolog"))) + +(with-eval-after-load "prolog" + (bind-key "C-c C-e" #'ediprolog-dwim prolog-mode-map)) + +(add-to-list 'auto-mode-alist '("\\.plt?\\'" . prolog-mode)) ;; Nix language (use-package nix-mode