180 lines
6.2 KiB
EmacsLisp
180 lines
6.2 KiB
EmacsLisp
;; PACKAGE
|
|
(require 'package)
|
|
|
|
|
|
(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
|
|
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
|
|
;;(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)
|
|
|
|
|
|
;; USE-PACKAGE
|
|
(require 'use-package)
|
|
(setq use-package-always-ensure t)
|
|
|
|
(use-package company
|
|
:init
|
|
(global-company-mode))
|
|
|
|
(use-package ivy
|
|
:bind (("C-s" . swiper))
|
|
:init
|
|
(ivy-mode 1))
|
|
|
|
(use-package nov
|
|
:config
|
|
(setq nov-text-width 80))
|
|
|
|
(use-package projectile
|
|
:init
|
|
(projectile-mode +1)
|
|
:config
|
|
(setq projectile-completion-system (quote ivy)))
|
|
|
|
(define-key projectile-mode-map (kbd "s-p") 'projectile-command-map)
|
|
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
|
|
|
(use-package elpy)
|
|
|
|
(use-package eglot
|
|
:hook ((python-mode . eglot-ensure) (c-mode . eglot-ensure)))
|
|
|
|
(use-package js2-mode
|
|
:interpreter (("node" . js2-mode))
|
|
:bind (:map js2-mode-map ("C-c C-p" . js2-print-json-path))
|
|
:mode "\\.\\(js\\|json\\)$"
|
|
:config
|
|
(add-hook 'js-mode-hook 'js2-minor-mode)
|
|
(setq js2-basic-offset 2
|
|
js2-highlight-level 3
|
|
js2-mode-show-parse-errors nil
|
|
js2-mode-show-strict-warnings nil))
|
|
|
|
(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
|
|
org-agenda-span 6
|
|
org-agenda-start-on-weekday nil
|
|
org-agenda-include-diary t
|
|
org-babel-shell-names (quote ("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh"))
|
|
org-adapt-indentation t
|
|
org-clock-persist t
|
|
org-confirm-babel-evaluate nil
|
|
org-html-doctype "html5"
|
|
org-html-html5-fancy t
|
|
org-html-htmlize-output-type nil
|
|
org-latex-listings t
|
|
org-log-done (quote time)
|
|
org-startup-folded t
|
|
org-startup-truncated nil
|
|
org-global-properties (quote (("EFFORT_ALL" . "1:00 2:00 3:00 5:00 8:00 13:00")))
|
|
org-todo-keywords (quote ((sequence "OPEN" "TODO" "DOING" "|" "DONE")))
|
|
org-export-backends (quote (ascii beamer html icalendar latex md))
|
|
org-duration-format (quote h:mm)
|
|
org-latex-pdf-process (quote ("latexmk -xelatex -shell-escape -quiet -f %f"))
|
|
org-latex-compiler "xelatex"
|
|
org-src-lang-modes (quote
|
|
(("bash" . sh)
|
|
("beamer" . latex)
|
|
("calc" . fundamental)
|
|
("dot" . fundamental)
|
|
("screen" . shell-script)
|
|
("shell" . sh)
|
|
("plantuml" . plantuml)))
|
|
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)
|
|
(dot . t)))
|
|
org-use-property-inheritance nil
|
|
org-export-with-sub-superscripts nil
|
|
org-capture-templates (quote
|
|
(("t" "Task" entry (file+headline "tasks.org" "Tasks")
|
|
"* OPEN %?\n\s %u\n\s %a")
|
|
("j" "Journal" entry (file+headline "journal.org" "Journal")
|
|
"* %<%Y-%m-%d %H:%M:%S %p %Z>\n\s %?")
|
|
("a" "Appointment today"
|
|
entry (file+headline "appointments.org" "Appointments")
|
|
"* %?\n\s %T\n")
|
|
("A" "Appointment"
|
|
entry (file+headline "appointments.org" "Appointments")
|
|
"* %?\n\s %u\n\s")))))
|
|
|
|
|
|
(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)
|
|
|
|
(use-package forge
|
|
:after magit)
|
|
|
|
(use-package powershell)
|
|
|
|
(use-package all-the-icons)
|
|
|
|
(use-package geiser
|
|
:config
|
|
(setq geiser-active-implementations '(guile)))
|