From 31d5eb6cfff0af850726eebe80490eae6b7c83d8 Mon Sep 17 00:00:00 2001 From: yannickreiss Date: Wed, 1 May 2024 08:32:08 +0200 Subject: [PATCH] Add spell check and suggestion --- custom.el | 23 ++++++++++++++++++----- init.el | 4 +++- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/custom.el b/custom.el index bfa83a0..d1c95c7 100644 --- a/custom.el +++ b/custom.el @@ -4,7 +4,7 @@ ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-selected-packages - '(auto-complete laas aas yasnippet evil editorconfig markdown-mode auctex rust-mode nasm-mode lua-mode ada-mode diff-hl magit corfu consult vertico))) + '(spell-fu helm-company company auto-complete laas aas yasnippet evil editorconfig markdown-mode auctex rust-mode nasm-mode lua-mode ada-mode diff-hl magit corfu consult vertico))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -151,8 +151,21 @@ :cond #'laas-object-on-left-condition "qq" (lambda () (interactive) (laas-wrap-previous-object "sqrt")))) -(unless (package-installed-p 'auto-complete) - (package-install 'auto-complete)) -(ac-config-default) - (global-hl-line-mode 1) + +(unless (package-installed-p 'company) + (package-install 'company)) +(add-hook 'after-init-hook 'global-company-mode) + +(unless (package-installed-p 'helm-company) + (package-install 'helm-company)) + +(unless (package-installed-p 'spell-fu) + (package-install 'spell-fu)) +(spell-fu-global-mode) + +(add-hook 'spell-fu-mode-hook + (lambda () + (spell-fu-dictionary-add (spell-fu-get-ispell-dictionary "de")) + (spell-fu-dictionary-add (spell-fu-get-ispell-dictionary "en")) +)) diff --git a/init.el b/init.el index 991e725..afe215b 100644 --- a/init.el +++ b/init.el @@ -19,7 +19,9 @@ (package-refresh-contents) ;; Load a custom theme -(load-theme 'adwaita t) +(unless (package-installed-p 'autumn-light-theme) + (package-install 'autumn-light-theme)) +(load-theme 'autumn-light t) ;; Disable the tool bar (tool-bar-mode -1)