No description
Find a file
2023-07-03 16:25:02 +02:00
readme-images Added readme file 2023-06-02 16:49:13 +02:00
cape-jinx-completion.el Fix completion symbol name in README 2023-07-03 16:24:10 +02:00
LICENSE Add LICENSE file 2023-07-03 16:11:40 +02:00
readme.org Fix to completion-at-point-function's name in READE 2023-07-03 16:25:02 +02:00

Completion At Point extensions using Jinx spell checking

Cape-jinx-completion package

Simple package providing completion-at-point extension using spell checking capabilities derived from Abiword's libenchant. All of the heavy lifting is done using jinx.el package - Enchanted Spell Checker.

Libenchant wraps several of the spell checkers. Jinx.el package provides on-the-fly spell checking and is a pleasure to configure, especially when using multiple dictionaries.

Picture is worth a thousand words

Completion candidates using spell checker:

/adam/cape-jinx-completion/media/commit/656e540d3dae86e9c1f1bdc8cc725cb912173dab/readme-images/cape-jinx.png

Installation instructions

Requirements

cape.el - Completion At Point Extensions. Jinx.el version at least 0.5 is required. Jinx requires libenchant installed in the system and at least one of the supported spell checkers (hunspell, Nuspell, GNU aspell) and dictionaries you want to use.

Using straight.el

  ;; First we need to configure jinx. You don't need to enable jinx-mode to use cape-jinx,
  ;; but you need to provide configuration and set up dictionaries to use.
  (use-package jinx
    :straight (:host github :repo "minad/jinx" :files ("*"))
    :config
    ;; Add unicode stuff I need to exclude from spell-checking (emojis, symbols, etc)
    (push "[\U00002600-\U0001ffff]"
          (alist-get t jinx-exclude-regexps))
    ;; set langauge dictionaries to use - the list is space seprated in a single string.
    (setq jinx-languages "pl en"))

  ;; Cape-jinx package and configuration:
  (use-package cape-jinx-completion
    :straight (:type git
                     :repo "https://code.bsdgeek.org/adam/cape-jinx-completion"
                     :files (:defaults "*.el"))
    :after jinx
    :config
    ;; add cape-jinx to completion-at-point functions list.
    (add-to-list 'completion-at-point-functions #'cape-jinx-completion))

Customization

Options available to customize are literally copied from cape-dict and work exactly the same way.

  • cape-jinx-case-replace Controls whether case of input be preserved.
  • cape-jinx-case-fold Controls whether case fold search should be used during search.

How to contribute

The latest source code is available at https://code.bsdgeek.org/adam/cape-jinx-completion

Issue reports, questions, comments and code patches are welcome you can send them to me over e-mail at adam at kruszewski dot name (please be patient as I'm not checking this account on a daily basis).

If you haven't sent code patches via e-mail yet and would like to learn how to work with an e-mail based workflow, you can read more at git format-patch man page or at git-send-email.io.