2020-11-01 02:56:34 +01:00
|
|
|
#+NAME: base
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
|
|
(use-package elcord
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(when (not (string= (system-name) "fractal"))
|
|
|
|
(elcord-mode))
|
|
|
|
)
|
|
|
|
|
|
|
|
(when (not (string= (system-name) "localhost"))
|
|
|
|
(use-package tree-sitter
|
|
|
|
:ensure t)
|
|
|
|
(use-package tree-sitter-langs
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
(global-tree-sitter-mode)
|
|
|
|
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode))
|
|
|
|
|
|
|
|
;; aligns annotation to the right hand side
|
|
|
|
(setq company-tooltip-align-annotations t)
|
|
|
|
|
|
|
|
(use-package edit-server
|
|
|
|
:ensure t
|
|
|
|
:commands edit-server-start
|
|
|
|
:init (if after-init-time
|
|
|
|
(edit-server-start)
|
|
|
|
(add-hook 'after-init-hook
|
|
|
|
#'(lambda() (edit-server-start))))
|
|
|
|
:config (setq edit-server-new-frame-alist
|
|
|
|
'((name . "Edit with Emacs FRAME")
|
|
|
|
(top . 200)
|
|
|
|
(left . 200)
|
|
|
|
(width . 80)
|
|
|
|
(height . 25)
|
|
|
|
(minibuffer . t)
|
|
|
|
(menu-bar-lines . t)
|
|
|
|
(window-system . x))))
|
|
|
|
|
|
|
|
(setq display-line-numbers-type 'relative)
|
|
|
|
|
|
|
|
(use-package impatient-mode
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
(defun markdown-html (buffer)
|
|
|
|
(princ (with-current-buffer buffer
|
|
|
|
(format "<!DOCTYPE html><html><title>Impatient Markdown</title><xmp theme=\"united\" style=\"display:none;\"> %s </xmp><script src=\"http://strapdownjs.com/v/0.2/strapdown.js\"></script></html>" (buffer-substring-no-properties (point-min) (point-max))))
|
|
|
|
(current-buffer)))
|
|
|
|
|
|
|
|
(httpd-start)
|
|
|
|
|
|
|
|
(use-package pdf-tools
|
|
|
|
:ensure t
|
|
|
|
:hook (('TeX-mode-hook . visual-line-mode))
|
|
|
|
:config
|
|
|
|
;; initialise
|
|
|
|
(pdf-tools-install)
|
|
|
|
(setq TeX-PDF-mode 1)
|
|
|
|
;; open pdfs scaled to fit page
|
|
|
|
(setq-default pdf-view-display-size 'fit-page)
|
|
|
|
;; automatically annotate highlights
|
|
|
|
(setq pdf-annot-activate-created-annotations t))
|
|
|
|
|
2020-11-02 01:46:06 +01:00
|
|
|
; (use-package auctex
|
|
|
|
; :ensure t)
|
2020-11-01 02:56:34 +01:00
|
|
|
|
|
|
|
(use-package vterm
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
(use-package w3m
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
(use-package all-the-icons
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
(use-package doom-modeline
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(doom-modeline-mode)
|
|
|
|
(make-variable-buffer-local 'doom-modeline-icon)
|
|
|
|
(add-hook 'after-make-frame-hook
|
|
|
|
(lambda ()
|
|
|
|
(setq doom-modeline-icon (display-graphic-p))))
|
|
|
|
)
|
|
|
|
|
|
|
|
(use-package chess
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
(use-package origami
|
|
|
|
:ensure t)
|
|
|
|
|
|
|
|
(use-package doom-themes
|
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
;; Global settings (defaults)
|
|
|
|
(setq doom-themes-enable-bold t ; if nil, bold is universally disabled
|
|
|
|
doom-themes-enable-italic t) ; if nil, italics is universally disabled
|
|
|
|
;; Enable flashing mode-line on errors
|
|
|
|
(doom-themes-visual-bell-config)
|
|
|
|
|
|
|
|
;; Enable custom neotree theme (all-the-icons must be installed!)
|
|
|
|
(doom-themes-neotree-config)
|
|
|
|
;; or for treemacs users
|
|
|
|
(setq doom-themes-treemacs-theme "doom-colors") ; use the colorful treemacs theme
|
|
|
|
(doom-themes-treemacs-config)
|
|
|
|
|
|
|
|
;; Corrects (and improves) org-mode's native fontification.
|
|
|
|
(doom-themes-org-config)
|
|
|
|
:after (hydra)
|
|
|
|
:config
|
|
|
|
(defhydra magic_rb/theme-select (:color blue)
|
|
|
|
("od" (progn
|
|
|
|
(load-theme 'doom-one t)
|
|
|
|
(set-frame-font "Fira Code 12" nil t)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
("ol" (progn
|
|
|
|
(load-theme 'doom-one-light t)
|
|
|
|
(set-frame-font "Fira Code 12" nil t)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
:bind ("<f6>" . magic_rb/theme-select/body))
|
|
|
|
|
|
|
|
(global-set-key (kbd "<f11>") 'fullscreen)
|
|
|
|
|
|
|
|
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
|
|
|
|
|
|
|
|
;; show matching parenthesis
|
|
|
|
(show-paren-mode 1)
|
|
|
|
|
|
|
|
(setq ispell-program-name "hunspell")
|
|
|
|
|
|
|
|
;; optimizations for emacs-lsp
|
|
|
|
(setq gc-cons-threshold 100000000)
|
|
|
|
(setq read-process-output-max (* 1024 1024))
|
|
|
|
|
|
|
|
;; enable ido
|
|
|
|
(setq ido-enable-flex-matching t)
|
|
|
|
(setq ido-everywhere t)
|
|
|
|
(ido-mode 1)
|
|
|
|
|
|
|
|
;; disable gtk stuff
|
|
|
|
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1)) ;; no toolbar
|
|
|
|
(menu-bar-mode -1) ;;no menubar
|
|
|
|
(scroll-bar-mode -1) ;; no scroll bar
|
|
|
|
|
|
|
|
;; set ont
|
|
|
|
(when (string= (system-name) "omen")
|
|
|
|
(set-frame-font "Fira Code 12" nil t))
|
|
|
|
(when (string= (system-name) "heater")
|
|
|
|
(set-frame-font "Fira Code 12" nil t))
|
|
|
|
(when (string= (system-name) "fractal")
|
|
|
|
(set-frame-font "Fira Code 12" nil t))
|
|
|
|
|
|
|
|
;; enable parenthesis and quotes pairing thing
|
|
|
|
(electric-pair-mode)
|
|
|
|
|
|
|
|
(add-hook 'after-make-frame-functions
|
|
|
|
(lambda (frame)
|
|
|
|
(select-frame frame)
|
|
|
|
(load-theme 'doom-one t)))
|
|
|
|
|
|
|
|
;; fullscreen
|
|
|
|
(defun fullscreen ()
|
|
|
|
(interactive)
|
|
|
|
(set-frame-parameter nil 'fullscreen
|
2020-11-02 01:44:18 +01:00
|
|
|
(if (frame-parameter nil 'fullscreen) nil 'fullboth)))
|
2020-11-01 02:56:34 +01:00
|
|
|
|
|
|
|
(setq backup-directory-alist
|
|
|
|
`(("." . ,(concat user-emacs-directory "backups"))))
|
|
|
|
|
|
|
|
;; compositor based transparency
|
|
|
|
(add-to-list 'default-frame-alist '(alpha 90 90))
|
|
|
|
|
|
|
|
;; set fill column indicator column number
|
|
|
|
(setq-default display-fill-column-indicator-column 100)
|
|
|
|
|
|
|
|
|
2020-11-02 01:46:06 +01:00
|
|
|
;(unless (server-running-p)
|
|
|
|
(server-start) ;)
|
2020-11-01 02:56:34 +01:00
|
|
|
#+END_SRC
|