Browse Source

added beancount configuration

master
Marc Pohling 6 years ago
parent
commit
de2841f647
1 changed files with 66 additions and 2 deletions
  1. 68
      config.org

68
config.org

@ -53,7 +53,7 @@ Don't add the font in the work environment, which I am logged in as POH
** Material Theme ** Material Theme
The [[https://github.com/cpaulik/emacs-material-theme][Material Theme]] comes in a dark and a light variant. Not too dark The [[https://github.com/cpaulik/emacs-material-theme][Material Theme]] comes in a dark and a light variant. Not too dark
to be strenious though. to be strenious though.
b
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package material-theme (use-package material-theme
:if (window-system) :if (window-system)
@ -585,6 +585,60 @@ Requires counsel
) )
#+end_src #+end_src
Ok, maybe beancount is better.
Since there is no debian package, it is an option to install it via pip.
I picked /opt for the installation path
#+begin_src shell
sudo su
cd /opt
python3 -m venv beancount
source ./beancount/bin/activate
pip3 install wheel
pip3 install beancount
deactivate
#+end_src
When using beancount, it will automatically pick the created virtual environment.
Activate the beancount mode
#+begin_src emacs-lisp
(unless (string-equal user-login-name "POH")
;; (add-to-list 'package-archives
;; '("beancount" . "/opt/beancount/elisp") t)
(use-package beancount
:load-path "/opt/beancount/elisp/"
;; :ensure t
:mode ("\\.beancount$" . beancount-mode)
)
(setenv "PATH"
(concat
"/opt/beancount/bin:"
(getenv "PATH"))
)
(add-hook 'beancount-mode-hook 'company/beancount-mode-hook)
)
#+end_src
For a nice frontend fava seems nice
#+begin_src shell
sudo su
cd /opt
python3 -m venv vava
source ./vava/bin/activate
pip3 install wheel
pip3 install fava
deactivate
#+end_src
Start fava with
#+begin_src shell
fava my_file.beancount
#+end_src
It is accessable on this URL: [[http://127.0.0.1:5000][Fava]]
* Programming * Programming
** Common things ** Common things
List of plugins and settings which are shared between the language plugins List of plugins and settings which are shared between the language plugins
@ -745,7 +799,7 @@ Common backends are:
(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 '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) (add-hook 'org-mode-hook #'add-pcomplete-to-capf)
Backend for Orgmode Backend for Orgmode
#+begin_src emacs-lisp #+begin_src emacs-lisp
(defun company/org-mode-hook() (defun company/org-mode-hook()
@ -766,6 +820,16 @@ Backend configuration for lisp-mode
) )
#+end_src #+end_src
Backend configuration for beancount
#+begin_src emacs-lisp
(defun company/beancount-mode-hook()
(set (make-local-variable 'company-backends)
'((company-dabbrev) company-capf company-files))
(company-mode t)
)
#+end_src
*** Misc Company packages *** Misc Company packages
Addon to sort suggestions by usage Addon to sort suggestions by usage

Loading…
Cancel
Save