2020-07-26 14:36:43 +02:00
|
|
|
;; PACKAGE
|
|
|
|
(require 'package)
|
2020-10-07 14:32:54 +02:00
|
|
|
|
2020-09-29 16:32:31 +02:00
|
|
|
|
2020-07-26 14:36:43 +02:00
|
|
|
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
|
|
|
|
(not (gnutls-available-p))))
|
|
|
|
(proto (if no-ssl "http" "https")))
|
|
|
|
(when no-ssl
|
|
|
|
(warn "\
|
|
|
|
Your version of Emacs does not support SSL connections,
|
|
|
|
which is unsafe because it allows man-in-the-middle attacks.
|
|
|
|
There are two things you can do about this warning:
|
|
|
|
1. Install an Emacs version that does support SSL and be safe.
|
|
|
|
2. Remove this warning from your init file so you won't see it again."))
|
|
|
|
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
|
2021-02-23 09:44:37 +01:00
|
|
|
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
|
2020-07-26 14:36:43 +02:00
|
|
|
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
|
|
|
|
(when (< emacs-major-version 24)
|
|
|
|
;; For important compatibility libraries like cl-lib
|
|
|
|
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
|
|
|
|
(package-initialize)
|
2020-11-29 20:01:43 +01:00
|
|
|
(package-refresh-contents)
|
2020-07-26 14:36:43 +02:00
|
|
|
|
2020-09-29 16:32:31 +02:00
|
|
|
;; USE-PACKAGE
|
2020-10-07 14:32:54 +02:00
|
|
|
(require 'use-package)
|
2020-09-29 16:32:31 +02:00
|
|
|
(setq use-package-always-ensure t)
|
|
|
|
|
2020-07-26 14:36:43 +02:00
|
|
|
(use-package company
|
|
|
|
:init
|
|
|
|
(global-company-mode))
|
|
|
|
|
|
|
|
(use-package ivy
|
2020-09-29 16:44:20 +02:00
|
|
|
:bind (("C-s" . swiper))
|
2020-07-26 14:36:43 +02:00
|
|
|
:init
|
|
|
|
(ivy-mode 1))
|
|
|
|
|
2021-01-01 11:37:51 +01:00
|
|
|
(use-package olivetti
|
|
|
|
:custom (olivetti-body-width 82))
|
|
|
|
|
2020-07-26 14:36:43 +02:00
|
|
|
(use-package nov
|
2021-01-01 11:37:51 +01:00
|
|
|
:config (setq nov-text-width nil nov-variable-pitch nil)
|
2021-01-18 09:05:57 +01:00
|
|
|
;;:hook (nov-mode . olivetti-mode))
|
|
|
|
)
|
2020-07-26 14:36:43 +02:00
|
|
|
|
|
|
|
(use-package projectile
|
|
|
|
:init
|
2020-11-25 21:26:37 +01:00
|
|
|
(projectile-mode +1)
|
|
|
|
:config
|
|
|
|
(setq projectile-completion-system (quote ivy)))
|
2020-07-26 14:36:43 +02:00
|
|
|
|
|
|
|
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
|
|
|
|
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
|
|
|
|
2021-01-01 11:37:51 +01:00
|
|
|
(use-package elpy
|
|
|
|
:config (setq elpy-modules
|
|
|
|
'(elpy-module-autodoc
|
|
|
|
elpy-module-company
|
|
|
|
elpy-module-eldoc
|
|
|
|
elpy-module-pyvenv
|
|
|
|
elpy-module-yasnippet)
|
|
|
|
elpy-test-pytest-runner-command '("pytest")))
|
|
|
|
|
2020-12-02 17:24:45 +01:00
|
|
|
(use-package pyvenv
|
|
|
|
:init (pyvenv-mode 1))
|
2020-07-26 14:36:43 +02:00
|
|
|
|
|
|
|
(use-package eglot
|
2020-11-28 09:33:03 +01:00
|
|
|
:hook ((python-mode . eglot-ensure) (c-mode . eglot-ensure)))
|
2020-07-26 14:36:43 +02:00
|
|
|
|
|
|
|
(use-package web-mode
|
|
|
|
:mode "\\.html?\\'"
|
|
|
|
:init
|
|
|
|
(dolist (hook '(emmet-mode ac-emmet-html-setup ac-emmet-css-setup))
|
|
|
|
(add-hook 'web-mode-hook hook))
|
|
|
|
:config
|
|
|
|
(setq web-mode-markup-indent-offset 2
|
|
|
|
web-mode-css-indent-offset 2
|
|
|
|
web-mode-code-indent-offset 2
|
|
|
|
web-mode-enable-auto-pairing nil
|
|
|
|
web-mode-enable-auto-closing t
|
|
|
|
web-mode-enable-current-element-highlight t
|
|
|
|
web-mode-enable-current-column-highlight t
|
|
|
|
web-mode-ac-sources-alist
|
|
|
|
'(("css" . (ac-source-css-property ac-source-emmet-css-snippets))
|
|
|
|
("html" . (ac-source-emmet-html-aliases
|
|
|
|
ac-source-emmet-html-snippets))))
|
|
|
|
(add-hook 'web-mode-before-auto-complete-hooks
|
|
|
|
'(lambda ()
|
|
|
|
(let ((web-mode-cur-language (web-mode-language-at-pos)))
|
|
|
|
(if (string= web-mode-cur-language "css")
|
|
|
|
(setq emmet-use-css-transform t)
|
|
|
|
(setq emmet-use-css-transform nil))))))
|
|
|
|
|
|
|
|
(use-package slime
|
|
|
|
:config (setq inferior-lisp-program (executable-find "sbcl")))
|
|
|
|
|
|
|
|
(use-package org
|
|
|
|
:config
|
|
|
|
(setq org-agenda-dim-blocked-tasks nil
|
|
|
|
org-agenda-inhibit-startup nil
|
2021-01-10 10:14:26 +01:00
|
|
|
org-agenda-span 14
|
2020-10-21 13:58:25 +02:00
|
|
|
org-agenda-start-on-weekday nil
|
2020-11-25 21:26:37 +01:00
|
|
|
org-agenda-include-diary t
|
2020-07-26 14:36:43 +02:00
|
|
|
org-babel-shell-names (quote ("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh"))
|
2020-11-25 21:26:37 +01:00
|
|
|
org-adapt-indentation t
|
2020-07-26 14:36:43 +02:00
|
|
|
org-clock-persist t
|
|
|
|
org-confirm-babel-evaluate nil
|
|
|
|
org-html-doctype "html5"
|
|
|
|
org-html-html5-fancy t
|
2020-10-10 12:27:23 +02:00
|
|
|
org-html-htmlize-output-type nil
|
2020-10-17 14:36:39 +02:00
|
|
|
org-latex-listings t
|
2020-07-26 14:36:43 +02:00
|
|
|
org-log-done (quote time)
|
|
|
|
org-startup-folded t
|
|
|
|
org-startup-truncated nil
|
2020-11-17 18:21:57 +01:00
|
|
|
org-global-properties (quote (("EFFORT_ALL" . "1:00 2:00 3:00 5:00 8:00 13:00")))
|
2020-11-15 12:58:31 +01:00
|
|
|
org-todo-keywords (quote ((sequence "OPEN" "TODO" "DOING" "|" "DONE")))
|
2021-02-01 12:43:42 +01:00
|
|
|
org-export-backends (quote (ascii beamer html icalendar latex md odt confluence))
|
2020-10-14 17:29:21 +02:00
|
|
|
org-duration-format (quote h:mm)
|
|
|
|
org-latex-pdf-process (quote ("latexmk -xelatex -shell-escape -quiet -f %f"))
|
2020-10-24 12:24:38 +02:00
|
|
|
org-latex-compiler "xelatex"
|
2020-10-19 08:47:58 +02:00
|
|
|
org-src-lang-modes (quote
|
|
|
|
(("bash" . sh)
|
|
|
|
("beamer" . latex)
|
|
|
|
("calc" . fundamental)
|
|
|
|
("dot" . fundamental)
|
|
|
|
("screen" . shell-script)
|
|
|
|
("shell" . sh)
|
2020-11-29 11:51:12 +01:00
|
|
|
("C" . c)
|
2021-01-01 11:37:51 +01:00
|
|
|
("sqlite" . sql)
|
2020-11-18 17:47:35 +01:00
|
|
|
("plantuml" . plantuml)))
|
2020-10-10 12:24:05 +02:00
|
|
|
org-use-property-inheritance nil
|
2020-11-15 12:58:31 +01:00
|
|
|
org-export-with-sub-superscripts nil
|
|
|
|
org-capture-templates (quote
|
2020-11-23 21:51:13 +01:00
|
|
|
(("t" "Task" entry (file+headline "tasks.org" "Tasks")
|
2020-11-15 12:58:31 +01:00
|
|
|
"* OPEN %?\n\s %u\n\s %a")
|
2020-11-23 21:51:13 +01:00
|
|
|
("j" "Journal" entry (file+headline "journal.org" "Journal")
|
2020-11-15 12:58:31 +01:00
|
|
|
"* %<%Y-%m-%d %H:%M:%S %p %Z>\n\s %?")
|
2020-11-15 13:41:20 +01:00
|
|
|
("a" "Appointment today"
|
2020-11-23 21:51:13 +01:00
|
|
|
entry (file+headline "appointments.org" "Appointments")
|
2020-11-15 13:41:20 +01:00
|
|
|
"* %?\n\s %T\n")
|
|
|
|
("A" "Appointment"
|
2020-11-23 21:51:13 +01:00
|
|
|
entry (file+headline "appointments.org" "Appointments")
|
2020-11-29 11:51:12 +01:00
|
|
|
"* %?\n\s %u\n\s"))))
|
|
|
|
(org-babel-do-load-languages
|
|
|
|
'org-babel-load-languages (quote
|
|
|
|
((js . t)
|
|
|
|
(gnuplot . t)
|
|
|
|
(emacs-lisp . t)
|
|
|
|
(python . t)
|
|
|
|
(sqlite . t)
|
|
|
|
(lisp . t)
|
|
|
|
(shell . t)
|
|
|
|
(css . t)
|
|
|
|
(calc . t)
|
|
|
|
(plantuml . t)
|
|
|
|
(C . t)
|
|
|
|
(dot . t)))))
|
2020-11-15 12:58:31 +01:00
|
|
|
|
2020-09-29 16:32:31 +02:00
|
|
|
|
|
|
|
(use-package helpful
|
|
|
|
:bind (("C-h f" . #'helpful-callable)
|
|
|
|
("C-h v" . #'helpful-variable)
|
|
|
|
("C-h k" . #'helpful-key)
|
|
|
|
("C-c C-d" . #'helpful-at-point)
|
|
|
|
("C-h F" . #'helpful-function)
|
|
|
|
("C-h C" . #'helpful-command)))
|
|
|
|
|
|
|
|
(use-package counsel
|
|
|
|
:bind (("M-x" . counsel-M-x)
|
|
|
|
("C-x b" . counsel-ibuffer)
|
|
|
|
("C-x C-f" . counsel-find-file)
|
|
|
|
:map minibuffer-local-map
|
|
|
|
("C-r" . 'counsel-minibuffer-history)))
|
|
|
|
|
|
|
|
(use-package ox-reveal)
|
2020-11-23 08:38:17 +01:00
|
|
|
|
2020-11-25 09:36:17 +01:00
|
|
|
(use-package powershell)
|
2020-11-26 17:51:51 +01:00
|
|
|
|
|
|
|
(use-package all-the-icons)
|
2020-11-26 17:57:36 +01:00
|
|
|
|
|
|
|
(use-package geiser
|
|
|
|
:config
|
|
|
|
(setq geiser-active-implementations '(guile)))
|