Browse Source

backend for orgmode slimmed down

master
Marc Pohling 6 years ago
parent
commit
1ba7a99e8b
1 changed files with 20 additions and 5 deletions
  1. 25
      config.org

25
config.org

@ -16,6 +16,9 @@
I want a pretty status bar! I want a pretty status bar!
- Company - 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 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 * Update config in a running config
Two options: 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.]] 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 Added a hook to complete org functions, company-capf is necessary for this
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package org (use-package org
:ensure org-plus-contrib :ensure org-plus-contrib
:init :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 #+end_src
@ -564,6 +564,21 @@ Common backends are:
) )
#+end_src #+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 Backend configuration for lisp-mode
#+begin_src emacs-lisp #+begin_src emacs-lisp

Loading…
Cancel
Save