diff --git a/config.org b/config.org index eb903b9..07c9ad5 100644 --- a/config.org +++ b/config.org @@ -16,6 +16,9 @@ I want a pretty status bar! - Company It's too active and autocompletes normal text (don't!). Also it completes on RET, which is annoying when I finish a sentence with RET and company "completes" it to a longer word + - Markdown mode + There might be more than one package for this. + * Update config in a running config Two options: @@ -176,15 +179,12 @@ Also auto refresh dired, but be quiet about it. [[http://whattheemacsd.com/sane- Although org mode ships with Emacs, the latest version can be installed externally. The configuration here follows the [[http://orgmode.org/elpa.html][Org mode ELPA Installation instructions.]] Added a hook to complete org functions, company-capf is necessary for this + #+begin_src emacs-lisp (use-package org :ensure org-plus-contrib :init - (add-hook 'org-mode-hook - (lambda () - (add-to-list 'company-backends 'company-capf) - (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t) - (company-mode t))) + (add-hook 'org-mode-hook 'company/org-mode-hook) ) #+end_src @@ -564,6 +564,21 @@ Common backends are: ) #+end_src + (defun add-pcomplete-to-capf () + (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t)) +;; (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t) + (add-hook 'org-mode-hook #'add-pcomplete-to-capf) + +Backend for Orgmode +#+begin_src emacs-lisp + (defun company/org-mode-hook() + (set (make-local-variable 'company-backends) + '(company-capf company-files)) + (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t) + (company-mode t) + ) +#+end_src + Backend configuration for lisp-mode #+begin_src emacs-lisp