summaryrefslogtreecommitdiff
path: root/pkgs
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2024-09-12 19:39:05 +0200
committerMiran Bastaja <miran.bastaja04@gmail.com>2024-09-12 19:50:37 +0200
commit8a0b76fa9de43857e2eb593995422b171c550b56 (patch)
tree1e04f6223aba4d429c006b84af75c0aec0034a84 /pkgs
parenta9c46973b8df2e0e27cb9e99e8e9512d436c01e1 (diff)
sorremacs: add corfu for completions and paredit
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/sorremacs/default.nix1
-rw-r--r--pkgs/sorremacs/emacs.el30
2 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/sorremacs/default.nix b/pkgs/sorremacs/default.nix
index eea70f5..05774f5 100644
--- a/pkgs/sorremacs/default.nix
+++ b/pkgs/sorremacs/default.nix
@@ -9,4 +9,5 @@ emacsWithPackagesFromUsePackage {
extraEmacsPackages = epkgs: [
epkgs.cask
];
+
}
diff --git a/pkgs/sorremacs/emacs.el b/pkgs/sorremacs/emacs.el
index e903b10..b24424a 100644
--- a/pkgs/sorremacs/emacs.el
+++ b/pkgs/sorremacs/emacs.el
@@ -132,6 +132,36 @@
helm-completion-in-region-fuzzy-match t)
(helm-mode 1))
+(use-package corfu
+ :custom
+ (corfu-cycle t)
+ (corfu-auto t) ;; Enable auto-completion
+
+ :init
+ (global-corfu-mode))
+
+(use-package emacs
+ :custom
+
+ ;; Enable indentation+completion using the TAB key.
+ ;; `completion-at-point' is often bound to M-TAB.
+ (tab-always-indent 'complete)
+
+ ;; Emacs 30 and newer: Disable Ispell completion function. As an alternative,
+ ;; try `cape-dict'.
+ (text-mode-ispell-word-completion nil)
+
+ ;; Emacs 28 and newer: Hide commands in M-x which do not apply to the current
+ ;; mode. Corfu commands are hidden, since they are not used via M-x. This
+ ;; setting is useful beyond Corfu.
+ (read-extended-command-predicate #'command-completion-default-include-p))
+
+(use-package paredit
+ :hook ((emacs-lisp-mode . enable-paredit-mode)
+ (lisp-mode . enable-paredit-mode)
+ (lisp-interaction-mode . enable-paredit-mode)
+ (ielm-mode . enable-paredit-mode)))
+
;;; --- Various major modes --- ;;;
(use-package nix-mode
:mode "\\.nix\\'")