170 lines
4.9 KiB
EmacsLisp
170 lines
4.9 KiB
EmacsLisp
(load "server")
|
|
(unless (server-running-p) (server-start))
|
|
|
|
(setenv "PATH" (concat (getenv "PATH") ":todo!("))
|
|
(setq exec-path (append exec-path '("/run/current-system/sw/bin" "/nix/var/nix/profiles/default/bin")))
|
|
|
|
(add-to-list 'default-frame-alist '(font . "SAX2"))
|
|
(set-face-attribute 'default nil :height 150)
|
|
(load-theme 'wombat t)
|
|
|
|
(tool-bar-mode -1)
|
|
(pixel-scroll-mode 1)
|
|
(scroll-bar-mode -1)
|
|
(setq mac-option-modifier 'none)
|
|
(setq mac-right-option-modifier 'meta)
|
|
(setq frame-resize-pixelwise t)
|
|
|
|
(setq make-backup-files nil)
|
|
|
|
(setq-default indent-tabs-mode nil)
|
|
(setq-default tab-width 4)
|
|
(setq-default sgml-basic-offset 4)
|
|
(setq whitespace-style '(trailing tabs newline tab-mark))
|
|
(setq-default show-trailing-whitespace t)
|
|
|
|
(global-whitespace-mode)
|
|
|
|
(setq backup-directory-alist `(("." . "~/.emacs/saves")))
|
|
(setq backup-by-copying t)
|
|
|
|
(add-hook 'shell-mode-hook
|
|
(lambda ()
|
|
(local-set-key (kbd "C-p") 'comint-previous-input)
|
|
(local-set-key (kbd "C-n") 'comint-next-input)
|
|
))
|
|
|
|
(require 'agda2)
|
|
|
|
(require 'bind-key)
|
|
; (bind-key* "M-p" 'pixel-scroll-down)
|
|
; (bind-key* "M-n" 'pixel-scroll-up)
|
|
(bind-key* "s-a" 'other-window)
|
|
(bind-key* "s-q" 'save-buffers-kill-terminal)
|
|
(bind-key* "s-<right>" 'windmove-right)
|
|
(bind-key* "s-<left>" 'windmove-left)
|
|
(bind-key* "s-<up>" 'windmove-up)
|
|
(bind-key* "s-<down>" 'windmove-down)
|
|
|
|
(setq lsp-keymap-prefix "M-l")
|
|
(require 'lsp-mode)
|
|
|
|
(require 'company)
|
|
|
|
(require'meow)
|
|
(meow-global-mode 1)
|
|
(defun meow-setup ()
|
|
(setq meow-expand-hint-counts
|
|
'((word . 10)
|
|
(line . 10)
|
|
(block . 10)
|
|
(find . 10)
|
|
(till . 10))
|
|
)
|
|
(meow-leader-define-key
|
|
'("1" . meow-digit-argument)
|
|
'("2" . meow-digit-argument)
|
|
'("3" . meow-digit-argument)
|
|
'("4" . meow-digit-argument)
|
|
'("5" . meow-digit-argument)
|
|
'("6" . meow-digit-argument)
|
|
'("7" . meow-digit-argument)
|
|
'("8" . meow-digit-argument)
|
|
'("9" . meow-digit-argument)
|
|
'("0" . meow-digit-argument)
|
|
'("/" . meow-keypad-describe-key)
|
|
'("?" . meow-cheatsheet))
|
|
(meow-motion-overwrite-define-key
|
|
;; custom keybinding for motion state
|
|
'("<escape>" . ignore))
|
|
(meow-normal-define-key
|
|
'("0" . meow-expand-0)
|
|
'("9" . meow-expand-9)
|
|
'("8" . meow-expand-8)
|
|
'("7" . meow-expand-7)
|
|
'("6" . meow-expand-6)
|
|
'("5" . meow-expand-5)
|
|
'("4" . meow-expand-4)
|
|
'("3" . meow-expand-3)
|
|
'("2" . meow-expand-2)
|
|
'("1" . meow-expand-1)
|
|
'("-" . negative-argument)
|
|
'(";" . meow-reverse)
|
|
'("," . meow-inner-of-thing)
|
|
'("." . meow-bounds-of-thing)
|
|
'("<" . meow-beginning-of-thing)
|
|
'(">" . meow-end-of-thing)
|
|
'("a" . meow-append)
|
|
'("A" . meow-open-below)
|
|
'("b" . meow-back-word)
|
|
'("B" . meow-back-symbol)
|
|
'("c" . meow-change)
|
|
; '("d" . meow-delete)
|
|
; '("D" . meow-backward-delete)
|
|
'("d" . meow-kill)
|
|
'("e" . meow-line)
|
|
'("E" . meow-goto-line)
|
|
'("f" . meow-find)
|
|
'("g" . meow-cancel-selection)
|
|
'("G" . meow-grab)
|
|
'("h" . meow-left)
|
|
'("H" . meow-left-expand)
|
|
'("i" . meow-insert)
|
|
'("I" . meow-open-above)
|
|
; '("j" . meow-join)
|
|
'("j" . meow-next)
|
|
'("J" . meow-next-expand)
|
|
; '("k" . meow-kill)
|
|
'("k" . meow-prev)
|
|
'("K" . meow-prev-expand)
|
|
; '("l" . meow-till)
|
|
'("l" . meow-right)
|
|
'("L" . meow-right-expand)
|
|
'("m" . meow-mark-word)
|
|
'("M" . meow-mark-symbol)
|
|
; '("n" . meow-next)
|
|
; '("N" . meow-next-expand)
|
|
'("o" . meow-block)
|
|
'("O" . meow-to-block)
|
|
; '("p" . meow-prev)
|
|
; '("P" . meow-prev-expand)
|
|
; '("q" . meow-quit)
|
|
; '("Q" . meow-goto-line)
|
|
'("r" . meow-replace)
|
|
'("R" . meow-swap-grab)
|
|
'("s" . meow-search)
|
|
; '("t" . meow-right)
|
|
; '("T" . meow-right-expand)
|
|
'("t" . meow-till)
|
|
'("u" . undo)
|
|
'("U" . undo-redo)
|
|
'("v" . meow-visit)
|
|
'("w" . meow-next-word)
|
|
'("W" . meow-next-symbol)
|
|
'("x" . meow-save)
|
|
'("X" . meow-sync-grab)
|
|
'("y" . meow-yank)
|
|
'("z" . meow-pop-selection)
|
|
'("'" . repeat)
|
|
'("<escape>" . ignore)))
|
|
(meow-setup)
|
|
|
|
(setq mark-even-if-inactive nil)
|
|
(put 'downcase-region 'disabled nil)
|
|
(put 'upcase-region 'disabled nil)
|
|
(put 'narrow-to-region 'disabled nil)
|
|
|
|
(require 'agda-input)
|
|
|
|
(setq agda-input-tweak-all
|
|
'(agda-input-compose
|
|
(agda-input-prepend "!")
|
|
(agda-input-nonempty))
|
|
)
|
|
(agda-input-setup)
|
|
|
|
(setq default-input-method "Agda")
|
|
(add-to-list 'auto-mode-alist '("\\.lagda.md\\'" . agda2-mode))
|
|
|
|
; (setq ring-bell-function (lambda () (call-process "sh" nil 0 nil "-c" "find /Users/xenia/cloud/configs/resources -type f | egrep -v '/_' | shuf -n 1 | xargs afplay")))
|