From c95461ebdb8df93712d3dc2874082dd4c97c43bc Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Fri, 5 Apr 2024 18:35:26 +0100 Subject: [PATCH] Add aspell support --- lisp/fg42/deps.el | 1 + lisp/fg42/editor.el | 25 ++++++++++++++++++++----- nix/fg42.nix | 7 +++++-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/lisp/fg42/deps.el b/lisp/fg42/deps.el index adc84da..e405632 100644 --- a/lisp/fg42/deps.el +++ b/lisp/fg42/deps.el @@ -121,6 +121,7 @@ orderless eglot marginalia + nerd-icons ) (provide 'fg42/deps) diff --git a/lisp/fg42/editor.el b/lisp/fg42/editor.el index a883a59..8c941f3 100644 --- a/lisp/fg42/editor.el +++ b/lisp/fg42/editor.el @@ -199,17 +199,27 @@ match all of the components in any order." completion-category-defaults nil completion-category-overrides '((file (styles partial-completion))))) - (use! savehist - "Persist history over Emacs restarts. Vertico sorts by history position." - :init - (savehist-mode)) - (use! marginalia "Adds useful info to minibuffers completions." :commands marginalia-mode :hook (emacs-startup . marginalia-mode)) (when-not-wm + + (use! flyspell + "Spell checking on the fly" + :commands (flyspell-mode flyspell-prog-mode) + :init + (setq-default ispell-program-name "aspell") + (setq-default ispell-extra-args '("--sug-mode=ultra" + "--lang=en_US" + "--camel-case"))) + + (use! savehist + "Persist history over Emacs restarts. Vertico sorts by history position." + :init + (savehist-mode)) + ;; Minibuffer related stuff (use! ctrlf "Single buffer text search." @@ -226,6 +236,11 @@ match all of the components in any order." Emacs." :if (display-graphic-p)) + (use! nerd-icons + "A utility package to collect various Icon Fonts and propertize them within +Emacs." + :if (display-graphic-p)) + (use! yasnippet "A Snippet is a template system for Emacs. " :config diff --git a/nix/fg42.nix b/nix/fg42.nix index cbfc490..2b787b8 100644 --- a/nix/fg42.nix +++ b/nix/fg42.nix @@ -23,7 +23,8 @@ python311, python3Packages, # This is a set of system tools required for FG42 # to work. pyright, emacs, ripgrep, git, texinfo, vazir-fonts, fira-code, nerdfonts -, fira-mono, noto-fonts, gcc, ltex-ls, bash, tree-sitter, +, fira-mono, noto-fonts, gcc, ltex-ls, bash, tree-sitter +, aspellWithDicts, supportWM ? true, xorg, slock, @@ -40,7 +41,9 @@ let maintainers = import ./maintainers.nix; - runtimeBins = [ ripgrep git ltex-ls tree-sitter direnv nix nil ] + dicts = aspellWithDicts (dicts: with dicts; [ en en-computers en-science ]); + + runtimeBins = [ ripgrep git ltex-ls tree-sitter direnv nix nil dicts ] ++ (lib.optional supportPython [ python311 # Python deps