Is it possible to add my personal custom list of words to the company database. Kindly guide me in a simple way. I am not a programmer.
Yes, it is possible. I use the following.
(setq company-ispell-available t) (setq company-ispell-dictionary "/path/to/your/wordlist/file") (add-to-list 'company-backends 'company-ispell)
The other answers are valid alternatives, here we are passing a custom-populated file to
company to help auto-complete.
Can't give you an answer regarding Company, but I would assume that it provides that possibility.
Otherwise, the built-in, old but still very useful library
completion.el offers that possibility. From the doc (which is only in the file's
;; SAVING/LOADING COMPLETIONS ;; Completions are automatically saved from one session to another ;; (unless save-completions-flag or enable-completion is nil). ;; Activating this minor-mode (calling completion-initialize) loads ;; a completions database for a saved completions file ;; (default: ~/.completions). When you exit, Emacs saves a copy of the ;; completions that you often use. When you next start, Emacs loads in ;; the saved completion file.
I suppose you use
company-ispell to input plain words,
Insert below code into your
(defvar my-ispell-words '("helle1" "helle2" "word1" "word2")) (defadvice ispell-lookup-words (after ispell-lookup-words-after-hack activate) (let* ((word (car (ad-get-args 0))) (my-words (all-completions word my-ispell-words) )) (when my-words (setq ad-return-value (nconc my-words ad-return-value)))))