From 135e3b791aa9aa319dce24d118037be9183bbfad Mon Sep 17 00:00:00 2001 From: Levi Date: Wed, 2 Oct 2024 09:35:28 +0200 Subject: [PATCH] marginalia, eglot --- emacs/feature/feature-completion.el | 3 ++- emacs/init.el | 1 - emacs/module/module-corfu.el | 29 +++++++++++++++++++++++++++++ emacs/module/module-eglot.el | 14 ++++++++++++++ emacs/module/module-marginalia.el | 1 + 5 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 emacs/module/module-corfu.el create mode 100644 emacs/module/module-eglot.el diff --git a/emacs/feature/feature-completion.el b/emacs/feature/feature-completion.el index 7f422e1..e6b91a8 100644 --- a/emacs/feature/feature-completion.el +++ b/emacs/feature/feature-completion.el @@ -9,7 +9,8 @@ (require 'module-orderless) (require 'module-snippets) (require 'module-marginalia) - +(require 'module-corfu) +(require 'module-eglot) (provide 'feature-completion) ;;; feature-completion.el ends here. diff --git a/emacs/init.el b/emacs/init.el index a9d804c..e6f2df9 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -46,7 +46,6 @@ (require 'feature-bsgen) ; bullshit generators (require 'feature-finance) ; damn that money! (require 'feature-email) ; because ya gotta... - (require 'server) (if (not (server-running-p)) (server-start)) diff --git a/emacs/module/module-corfu.el b/emacs/module/module-corfu.el new file mode 100644 index 0000000..1dcc65a --- /dev/null +++ b/emacs/module/module-corfu.el @@ -0,0 +1,29 @@ +;;; module-corfu.el --- Corfu module support +;; +;;; Commentary: +;; This module provides support for Corfu, a library that provides +;; inline completion. +;; +;;; Code: + +(require 'module-pkg) +(pkg/require 'corfu) + +(setq corfu-cycle t) ;; Enable cycling for `corfu-next/previous' +(setq corfu-auto t) ;; Enable auto completion +(setq corfu-separator ?\s) ;; Orderless field separator +;; (setq corfu-quit-at-boundary nil) ;; Never quit at completion boundary +(setq corfu-quit-no-match nil) ;; Never quit, even if there is no match +;; (setq corfu-preview-current nil) ;; Disable current candidate preview +;; (setqcorfu-preselect 'prompt) ;; Preselect the prompt +;; (setq corfu-on-exact-match nil) ;; Configure handling of exact matches +;; (setq corfu-scroll-margin 5) ;; Use scroll margin + + +(setq tab-always-indent 'complete) +(setq text-mode-ispell-word-completion nil) +(setq read-extended-command-predicate #'command-completion-default-include-p) +(global-corfu-mode) + +(provide 'module-corfu) +;;; module-corfu.el ends here diff --git a/emacs/module/module-eglot.el b/emacs/module/module-eglot.el new file mode 100644 index 0000000..6d35cd8 --- /dev/null +++ b/emacs/module/module-eglot.el @@ -0,0 +1,14 @@ +;;; module-eglot.el --- Eglot support for Emacs +;;; +;;; Commentary: This file provides basic functionality for using Eglot +;;; with Emacs. It's a starting point, not a complete implementation. + +;;; Code: + +(require 'module-pkg) +(pkg/require 'eglot) +(add-hook 'go-mode-hook 'eglot-ensure) +(add-hook 'c-mode-hook 'eglot-ensure) + +(provide 'module-eglot) +;;; module-eglot.el ends here diff --git a/emacs/module/module-marginalia.el b/emacs/module/module-marginalia.el index 7f69d2f..35677d7 100644 --- a/emacs/module/module-marginalia.el +++ b/emacs/module/module-marginalia.el @@ -11,4 +11,5 @@ (define-key minibuffer-local-map (kbd "M-A") 'marginalia-cycle) (marginalia-mode) +(provide 'module-marginalia) ;;; module-marginalia.el ends here